mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +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
@@ -0,0 +1,134 @@
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %_GLF_color
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpSource ESSL 310
|
||||
OpName %main "main"
|
||||
OpName %i "i"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "injectionSwitch"
|
||||
OpName %_ ""
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpDecorate %i RelaxedPrecision
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %buf0 Block
|
||||
OpDecorate %_ DescriptorSet 0
|
||||
OpDecorate %_ Binding 0
|
||||
OpDecorate %7 RelaxedPrecision
|
||||
OpDecorate %8 RelaxedPrecision
|
||||
OpDecorate %9 RelaxedPrecision
|
||||
OpDecorate %10 RelaxedPrecision
|
||||
OpDecorate %11 RelaxedPrecision
|
||||
OpDecorate %12 RelaxedPrecision
|
||||
OpDecorate %13 RelaxedPrecision
|
||||
OpDecorate %14 RelaxedPrecision
|
||||
OpDecorate %15 RelaxedPrecision
|
||||
OpDecorate %16 RelaxedPrecision
|
||||
OpDecorate %17 RelaxedPrecision
|
||||
OpDecorate %18 RelaxedPrecision
|
||||
OpDecorate %19 RelaxedPrecision
|
||||
OpDecorate %20 RelaxedPrecision
|
||||
OpDecorate %21 RelaxedPrecision
|
||||
OpDecorate %22 RelaxedPrecision
|
||||
OpDecorate %_GLF_color Location 0
|
||||
%void = OpTypeVoid
|
||||
%24 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%buf0 = OpTypeStruct %v2float
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_5 = OpConstant %int 5
|
||||
%int_7 = OpConstant %int 7
|
||||
%int_200 = OpConstant %int 200
|
||||
%bool = OpTypeBool
|
||||
%int_100 = OpConstant %int 100
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_n2 = OpConstant %int -2
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%47 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%48 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
|
||||
%main = OpFunction %void None %24
|
||||
%49 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_int Function
|
||||
%50 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_0
|
||||
%51 = OpLoad %float %50
|
||||
%7 = OpConvertFToS %int %51
|
||||
OpStore %i %7
|
||||
%8 = OpLoad %int %i
|
||||
OpSelectionMerge %52 None
|
||||
OpSwitch %8 %53 0 %54
|
||||
%53 = OpLabel
|
||||
%20 = OpLoad %int %i
|
||||
%21 = OpISub %int %20 %int_3
|
||||
OpStore %i %21
|
||||
OpBranch %52
|
||||
%54 = OpLabel
|
||||
OpBranch %55
|
||||
%55 = OpLabel
|
||||
OpLoopMerge %56 %57 None
|
||||
OpBranch %58
|
||||
%58 = OpLabel
|
||||
%9 = OpLoad %int %i
|
||||
%10 = OpIAdd %int %9 %int_1
|
||||
OpStore %i %10
|
||||
%11 = OpLoad %int %i
|
||||
OpSelectionMerge %59 None
|
||||
OpSwitch %11 %60 1 %61 2 %62
|
||||
%60 = OpLabel
|
||||
%14 = OpLoad %int %i
|
||||
%15 = OpIAdd %int %14 %int_7
|
||||
OpStore %i %15
|
||||
OpBranch %59
|
||||
%61 = OpLabel
|
||||
OpBranch %57
|
||||
%62 = OpLabel
|
||||
%12 = OpLoad %int %i
|
||||
%13 = OpIAdd %int %12 %int_5
|
||||
OpStore %i %13
|
||||
OpBranch %59
|
||||
%59 = OpLabel
|
||||
OpBranch %57
|
||||
%57 = OpLabel
|
||||
%16 = OpLoad %int %i
|
||||
%63 = OpSGreaterThan %bool %16 %int_200
|
||||
OpBranchConditional %63 %55 %56
|
||||
%56 = OpLabel
|
||||
%17 = OpLoad %int %i
|
||||
%64 = OpSGreaterThan %bool %17 %int_100
|
||||
OpSelectionMerge %65 None
|
||||
OpBranchConditional %64 %66 %65
|
||||
%66 = OpLabel
|
||||
%18 = OpLoad %int %i
|
||||
%19 = OpISub %int %18 %int_2
|
||||
OpStore %i %19
|
||||
OpBranch %52
|
||||
%65 = OpLabel
|
||||
OpBranch %53
|
||||
%52 = OpLabel
|
||||
%22 = OpLoad %int %i
|
||||
%67 = OpIEqual %bool %22 %int_n2
|
||||
OpSelectionMerge %68 None
|
||||
OpBranchConditional %67 %69 %70
|
||||
%69 = OpLabel
|
||||
OpStore %_GLF_color %47
|
||||
OpBranch %68
|
||||
%70 = OpLabel
|
||||
OpStore %_GLF_color %48
|
||||
OpBranch %68
|
||||
%68 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,86 @@
|
||||
SKIP: FAILED
|
||||
|
||||
cbuffer cbuffer_x_6 : register(b0, space0) {
|
||||
uint4 x_6[1];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
int i = 0;
|
||||
const float x_51 = asfloat(x_6[0].x);
|
||||
i = int(x_51);
|
||||
switch(i) {
|
||||
case 0: {
|
||||
[loop] while (true) {
|
||||
i = (i + 1);
|
||||
switch(i) {
|
||||
case 2: {
|
||||
i = (i + 5);
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
{
|
||||
if ((i > 200)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
i = (i + 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
{
|
||||
if ((i > 200)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((i > 100)) {
|
||||
i = (i - 2);
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
{
|
||||
i = (i - 3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
i = (i - 3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((i == -2)) {
|
||||
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
} else {
|
||||
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol {
|
||||
float4 x_GLF_color_1 : SV_Target0;
|
||||
};
|
||||
|
||||
main_out main_inner() {
|
||||
main_1();
|
||||
const main_out tint_symbol_2 = {x_GLF_color};
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
tint_symbol main() {
|
||||
const main_out inner_result = main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
C:\src\tint\test\Shader@0x0000013B8CBD6FE0(26,13-21): error X3708: continue cannot be used in a switch
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
struct buf0 {
|
||||
injectionSwitch : vec2<f32>;
|
||||
};
|
||||
|
||||
@group(0) @binding(0) var<uniform> x_6 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var i : i32;
|
||||
let x_51 : f32 = x_6.injectionSwitch.x;
|
||||
i = i32(x_51);
|
||||
let x_8 : i32 = i;
|
||||
switch(x_8) {
|
||||
case 0: {
|
||||
loop {
|
||||
let x_9 : i32 = i;
|
||||
i = (x_9 + 1);
|
||||
let x_11 : i32 = i;
|
||||
switch(x_11) {
|
||||
case 2: {
|
||||
let x_12 : i32 = i;
|
||||
i = (x_12 + 5);
|
||||
}
|
||||
case 1: {
|
||||
continue;
|
||||
}
|
||||
default: {
|
||||
let x_14 : i32 = i;
|
||||
i = (x_14 + 7);
|
||||
}
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_16 : i32 = i;
|
||||
if ((x_16 > 200)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
let x_17 : i32 = i;
|
||||
if ((x_17 > 100)) {
|
||||
let x_18 : i32 = i;
|
||||
i = (x_18 - 2);
|
||||
break;
|
||||
}
|
||||
fallthrough;
|
||||
}
|
||||
default: {
|
||||
let x_20 : i32 = i;
|
||||
i = (x_20 - 3);
|
||||
}
|
||||
}
|
||||
let x_22 : i32 = i;
|
||||
if ((x_22 == -2)) {
|
||||
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
||||
} else {
|
||||
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 1.0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
@location(0)
|
||||
x_GLF_color_1 : vec4<f32>;
|
||||
};
|
||||
|
||||
@stage(fragment)
|
||||
fn main() -> main_out {
|
||||
main_1();
|
||||
return main_out(x_GLF_color);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
SKIP: FAILED
|
||||
|
||||
cbuffer cbuffer_x_6 : register(b0, space0) {
|
||||
uint4 x_6[1];
|
||||
};
|
||||
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
int i = 0;
|
||||
const float x_51 = asfloat(x_6[0].x);
|
||||
i = int(x_51);
|
||||
switch(i) {
|
||||
case 0: {
|
||||
[loop] while (true) {
|
||||
i = (i + 1);
|
||||
switch(i) {
|
||||
case 2: {
|
||||
i = (i + 5);
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
{
|
||||
if ((i > 200)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
i = (i + 7);
|
||||
break;
|
||||
}
|
||||
}
|
||||
{
|
||||
if ((i > 200)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((i > 100)) {
|
||||
i = (i - 2);
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
{
|
||||
i = (i - 3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
i = (i - 3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((i == -2)) {
|
||||
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
} else {
|
||||
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
float4 x_GLF_color_1;
|
||||
};
|
||||
struct tint_symbol {
|
||||
float4 x_GLF_color_1 : SV_Target0;
|
||||
};
|
||||
|
||||
main_out main_inner() {
|
||||
main_1();
|
||||
const main_out tint_symbol_2 = {x_GLF_color};
|
||||
return tint_symbol_2;
|
||||
}
|
||||
|
||||
tint_symbol main() {
|
||||
const main_out inner_result = main_inner();
|
||||
tint_symbol wrapper_result = (tint_symbol)0;
|
||||
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
C:\src\tint\test\Shader@0x0000019C85DE9DB0(26,13-21): error X3708: continue cannot be used in a switch
|
||||
|
||||
Reference in New Issue
Block a user