mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
tint->dawn: Shuffle source tree in preperation of merging repos
docs/ -> docs/tint/ fuzzers/ -> src/tint/fuzzers/ samples/ -> src/tint/cmd/ src/ -> src/tint/ test/ -> test/tint/ BUG=tint:1418,tint:1433 Change-Id: Id2aa79f989aef3245b80ef4aa37a27ff16cd700b Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/80482 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
committed by
Tint LUCI CQ
parent
38f1e9c75c
commit
dbc13af287
3
test/tint/statements/for/initializer/array_ctor.wgsl
Normal file
3
test/tint/statements/for/initializer/array_ctor.wgsl
Normal file
@@ -0,0 +1,3 @@
|
||||
fn f() {
|
||||
for (var i : i32 = array<i32, 1>(1)[0]; false;) {}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#version 310 es
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
void f() {
|
||||
int tint_symbol[1] = int[1](1);
|
||||
{
|
||||
for(int i = tint_symbol[0]; false; ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
void f() {
|
||||
const int tint_symbol[1] = {1};
|
||||
{
|
||||
[loop] for(int i = tint_symbol[0]; false; ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct tint_array_wrapper {
|
||||
int arr[1];
|
||||
};
|
||||
|
||||
void f() {
|
||||
tint_array_wrapper const tint_symbol = {.arr={1}};
|
||||
for(int i = tint_symbol.arr[0]; false; ) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 27
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
|
||||
OpExecutionMode %unused_entry_point LocalSize 1 1 1
|
||||
OpName %unused_entry_point "unused_entry_point"
|
||||
OpName %f "f"
|
||||
OpName %i "i"
|
||||
OpDecorate %_arr_int_uint_1 ArrayStride 4
|
||||
%void = OpTypeVoid
|
||||
%1 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_int_uint_1 = OpTypeArray %int %uint_1
|
||||
%int_1 = OpConstant %int 1
|
||||
%12 = OpConstantComposite %_arr_int_uint_1 %int_1
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%17 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%unused_entry_point = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %1
|
||||
%6 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_int Function %17
|
||||
%14 = OpCompositeExtract %int %12 0
|
||||
OpStore %i %14
|
||||
OpBranch %18
|
||||
%18 = OpLabel
|
||||
OpLoopMerge %19 %20 None
|
||||
OpBranch %21
|
||||
%21 = OpLabel
|
||||
%22 = OpLogicalNot %bool %false
|
||||
OpSelectionMerge %25 None
|
||||
OpBranchConditional %22 %26 %25
|
||||
%26 = OpLabel
|
||||
OpBranch %19
|
||||
%25 = OpLabel
|
||||
OpBranch %20
|
||||
%20 = OpLabel
|
||||
OpBranch %18
|
||||
%19 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,4 @@
|
||||
fn f() {
|
||||
for(var i : i32 = array<i32, 1>(1)[0]; false; ) {
|
||||
}
|
||||
}
|
||||
3
test/tint/statements/for/initializer/basic.wgsl
Normal file
3
test/tint/statements/for/initializer/basic.wgsl
Normal file
@@ -0,0 +1,3 @@
|
||||
fn f() {
|
||||
for (var i : i32 = 0; false;) {}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#version 310 es
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
void f() {
|
||||
{
|
||||
for(int i = 0; false; ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
void f() {
|
||||
{
|
||||
[loop] for(int i = 0; false; ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
void f() {
|
||||
for(int i = 0; false; ) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 21
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
|
||||
OpExecutionMode %unused_entry_point LocalSize 1 1 1
|
||||
OpName %unused_entry_point "unused_entry_point"
|
||||
OpName %f "f"
|
||||
OpName %i "i"
|
||||
%void = OpTypeVoid
|
||||
%1 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%11 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%unused_entry_point = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %1
|
||||
%6 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_int Function %11
|
||||
OpStore %i %int_0
|
||||
OpBranch %12
|
||||
%12 = OpLabel
|
||||
OpLoopMerge %13 %14 None
|
||||
OpBranch %15
|
||||
%15 = OpLabel
|
||||
%16 = OpLogicalNot %bool %false
|
||||
OpSelectionMerge %19 None
|
||||
OpBranchConditional %16 %20 %19
|
||||
%20 = OpLabel
|
||||
OpBranch %13
|
||||
%19 = OpLabel
|
||||
OpBranch %14
|
||||
%14 = OpLabel
|
||||
OpBranch %12
|
||||
%13 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,4 @@
|
||||
fn f() {
|
||||
for(var i : i32 = 0; false; ) {
|
||||
}
|
||||
}
|
||||
7
test/tint/statements/for/initializer/struct_ctor.wgsl
Normal file
7
test/tint/statements/for/initializer/struct_ctor.wgsl
Normal file
@@ -0,0 +1,7 @@
|
||||
struct S {
|
||||
i : i32;
|
||||
};
|
||||
|
||||
fn f() {
|
||||
for (var i : i32 = S(1).i; false;) {}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#version 310 es
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
struct S {
|
||||
int i;
|
||||
};
|
||||
|
||||
void f() {
|
||||
S tint_symbol = S(1);
|
||||
{
|
||||
for(int i = tint_symbol.i; false; ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct S {
|
||||
int i;
|
||||
};
|
||||
|
||||
void f() {
|
||||
const S tint_symbol = {1};
|
||||
{
|
||||
[loop] for(int i = tint_symbol.i; false; ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
struct S {
|
||||
int i;
|
||||
};
|
||||
|
||||
void f() {
|
||||
S const tint_symbol = {.i=1};
|
||||
for(int i = tint_symbol.i; false; ) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 24
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
|
||||
OpExecutionMode %unused_entry_point LocalSize 1 1 1
|
||||
OpName %unused_entry_point "unused_entry_point"
|
||||
OpName %f "f"
|
||||
OpName %S "S"
|
||||
OpMemberName %S 0 "i"
|
||||
OpName %i "i"
|
||||
OpMemberDecorate %S 0 Offset 0
|
||||
%void = OpTypeVoid
|
||||
%1 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%S = OpTypeStruct %int
|
||||
%int_1 = OpConstant %int 1
|
||||
%10 = OpConstantComposite %S %int_1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%14 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%false = OpConstantFalse %bool
|
||||
%unused_entry_point = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %1
|
||||
%6 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_int Function %14
|
||||
%11 = OpCompositeExtract %int %10 0
|
||||
OpStore %i %11
|
||||
OpBranch %15
|
||||
%15 = OpLabel
|
||||
OpLoopMerge %16 %17 None
|
||||
OpBranch %18
|
||||
%18 = OpLabel
|
||||
%19 = OpLogicalNot %bool %false
|
||||
OpSelectionMerge %22 None
|
||||
OpBranchConditional %19 %23 %22
|
||||
%23 = OpLabel
|
||||
OpBranch %16
|
||||
%22 = OpLabel
|
||||
OpBranch %17
|
||||
%17 = OpLabel
|
||||
OpBranch %15
|
||||
%16 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,8 @@
|
||||
struct S {
|
||||
i : i32;
|
||||
}
|
||||
|
||||
fn f() {
|
||||
for(var i : i32 = S(1).i; false; ) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user