mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +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
257
test/tint/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm
Normal file
257
test/tint/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm
Normal file
@@ -0,0 +1,257 @@
|
||||
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 %yieldsZero_ "yieldsZero("
|
||||
OpName %globalNumbers "globalNumbers"
|
||||
OpName %i "i"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "one"
|
||||
OpName %_ ""
|
||||
OpName %acc "acc"
|
||||
OpName %i_0 "i"
|
||||
OpName %localNumbers "localNumbers"
|
||||
OpName %param "param"
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpDecorate %yieldsZero_ RelaxedPrecision
|
||||
OpDecorate %globalNumbers RelaxedPrecision
|
||||
OpDecorate %i RelaxedPrecision
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %buf0 Block
|
||||
OpDecorate %_ DescriptorSet 0
|
||||
OpDecorate %_ Binding 0
|
||||
OpDecorate %acc RelaxedPrecision
|
||||
OpDecorate %i_0 RelaxedPrecision
|
||||
OpDecorate %localNumbers RelaxedPrecision
|
||||
OpDecorate %13 RelaxedPrecision
|
||||
OpDecorate %14 RelaxedPrecision
|
||||
OpDecorate %15 RelaxedPrecision
|
||||
OpDecorate %16 RelaxedPrecision
|
||||
OpDecorate %_GLF_color Location 0
|
||||
OpDecorate %17 RelaxedPrecision
|
||||
OpDecorate %18 RelaxedPrecision
|
||||
OpDecorate %19 RelaxedPrecision
|
||||
OpDecorate %20 RelaxedPrecision
|
||||
OpDecorate %21 RelaxedPrecision
|
||||
OpDecorate %22 RelaxedPrecision
|
||||
OpDecorate %23 RelaxedPrecision
|
||||
OpDecorate %24 RelaxedPrecision
|
||||
OpDecorate %25 RelaxedPrecision
|
||||
OpDecorate %26 RelaxedPrecision
|
||||
OpDecorate %27 RelaxedPrecision
|
||||
OpDecorate %28 RelaxedPrecision
|
||||
OpDecorate %29 RelaxedPrecision
|
||||
OpDecorate %30 RelaxedPrecision
|
||||
OpDecorate %31 RelaxedPrecision
|
||||
OpDecorate %32 RelaxedPrecision
|
||||
OpDecorate %33 RelaxedPrecision
|
||||
OpDecorate %34 RelaxedPrecision
|
||||
%void = OpTypeVoid
|
||||
%36 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%39 = OpTypeFunction %int
|
||||
%int_0 = OpConstant %int 0
|
||||
%bool = OpTypeBool
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_10 = OpConstant %uint 10
|
||||
%_arr_int_uint_10 = OpTypeArray %int %uint_10
|
||||
%_ptr_Private__arr_int_uint_10 = OpTypePointer Private %_arr_int_uint_10
|
||||
%_ptr_Private_int = OpTypePointer Private %int
|
||||
%int_1 = OpConstant %int 1
|
||||
%float = OpTypeFloat 32
|
||||
%buf0 = OpTypeStruct %float
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%int_4 = OpConstant %int 4
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_int_uint_2 = OpTypeArray %int %uint_2
|
||||
%_ptr_Function__arr_int_uint_2 = OpTypePointer Function %_arr_int_uint_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
|
||||
%59 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%60 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
|
||||
%false = OpConstantFalse %bool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%true = OpConstantTrue %bool
|
||||
%_ptr_Function__arr_int_uint_10 = OpTypePointer Function %_arr_int_uint_10
|
||||
%65 = OpUndef %int
|
||||
%66 = OpUndef %bool
|
||||
%main = OpFunction %void None %36
|
||||
%67 = OpLabel
|
||||
%68 = OpVariable %_ptr_Function_bool Function %false
|
||||
%29 = OpVariable %_ptr_Function_int Function
|
||||
%30 = OpVariable %_ptr_Function_int Function
|
||||
%31 = OpVariable %_ptr_Function_int Function
|
||||
%globalNumbers = OpVariable %_ptr_Function__arr_int_uint_10 Function
|
||||
%17 = OpVariable %_ptr_Function_int Function
|
||||
%acc = OpVariable %_ptr_Function_int Function
|
||||
%i_0 = OpVariable %_ptr_Function_int Function
|
||||
%localNumbers = OpVariable %_ptr_Function__arr_int_uint_2 Function
|
||||
%param = OpVariable %_ptr_Function_int Function
|
||||
OpStore %acc %int_0
|
||||
OpStore %i_0 %int_0
|
||||
OpBranch %69
|
||||
%69 = OpLabel
|
||||
%24 = OpPhi %int %int_0 %67 %15 %70
|
||||
%23 = OpPhi %int %int_0 %67 %16 %70
|
||||
OpLoopMerge %71 %70 None
|
||||
OpBranch %72
|
||||
%72 = OpLabel
|
||||
%73 = OpSLessThan %bool %23 %int_4
|
||||
OpBranchConditional %73 %74 %71
|
||||
%74 = OpLabel
|
||||
OpStore %68 %false
|
||||
OpBranch %75
|
||||
%75 = OpLabel
|
||||
%76 = OpPhi %bool %false %74 %66 %77
|
||||
OpLoopMerge %78 %77 None
|
||||
OpBranch %79
|
||||
%79 = OpLabel
|
||||
OpStore %30 %int_0
|
||||
OpBranch %80
|
||||
%80 = OpLabel
|
||||
%81 = OpPhi %bool %76 %79 %66 %82
|
||||
%32 = OpPhi %int %int_0 %79 %65 %82
|
||||
OpLoopMerge %83 %82 None
|
||||
OpBranch %84
|
||||
%84 = OpLabel
|
||||
%85 = OpAccessChain %_ptr_Uniform_float %_ %int_0
|
||||
%86 = OpLoad %float %85
|
||||
%87 = OpConvertFToS %int %86
|
||||
%88 = OpSLessThan %bool %32 %87
|
||||
OpBranchConditional %88 %89 %83
|
||||
%89 = OpLabel
|
||||
OpStore %68 %true
|
||||
OpStore %29 %32
|
||||
OpBranch %83
|
||||
%82 = OpLabel
|
||||
OpBranch %80
|
||||
%83 = OpLabel
|
||||
%33 = OpPhi %int %65 %84 %32 %89
|
||||
%90 = OpPhi %bool %81 %84 %true %89
|
||||
OpSelectionMerge %91 None
|
||||
OpBranchConditional %90 %78 %91
|
||||
%91 = OpLabel
|
||||
%92 = OpUndef %int
|
||||
OpStore %68 %true
|
||||
OpStore %29 %92
|
||||
OpBranch %78
|
||||
%77 = OpLabel
|
||||
OpBranch %75
|
||||
%78 = OpLabel
|
||||
%34 = OpPhi %int %33 %83 %92 %91
|
||||
OpStore %31 %34
|
||||
%93 = OpLoad %int %31
|
||||
%21 = OpLoad %_arr_int_uint_2 %localNumbers
|
||||
%22 = OpCompositeInsert %_arr_int_uint_2 %93 %21 1
|
||||
OpStore %localNumbers %22
|
||||
%94 = OpAccessChain %_ptr_Function_int %globalNumbers %int_0
|
||||
OpStore %94 %int_0
|
||||
%95 = OpAccessChain %_ptr_Function_int %localNumbers %int_1
|
||||
%13 = OpCompositeExtract %int %22 1
|
||||
OpStore %param %13
|
||||
OpStore %17 %int_0
|
||||
OpBranch %96
|
||||
%96 = OpLabel
|
||||
%25 = OpPhi %int %int_0 %78 %19 %97
|
||||
OpLoopMerge %98 %97 None
|
||||
OpBranch %99
|
||||
%99 = OpLabel
|
||||
%100 = OpSLessThanEqual %bool %25 %13
|
||||
OpBranchConditional %100 %101 %98
|
||||
%101 = OpLabel
|
||||
%102 = OpAccessChain %_ptr_Function_int %globalNumbers %13
|
||||
%18 = OpLoad %int %102
|
||||
%103 = OpSLessThanEqual %bool %18 %int_1
|
||||
OpSelectionMerge %104 None
|
||||
OpBranchConditional %103 %105 %104
|
||||
%105 = OpLabel
|
||||
OpStore %102 %int_1
|
||||
OpBranch %104
|
||||
%104 = OpLabel
|
||||
OpBranch %97
|
||||
%97 = OpLabel
|
||||
%19 = OpIAdd %int %25 %int_1
|
||||
OpStore %17 %19
|
||||
OpBranch %96
|
||||
%98 = OpLabel
|
||||
%106 = OpAccessChain %_ptr_Uniform_float %_ %int_0
|
||||
%107 = OpLoad %float %106
|
||||
%108 = OpConvertFToS %int %107
|
||||
%109 = OpISub %int %108 %int_1
|
||||
%110 = OpAccessChain %_ptr_Function_int %globalNumbers %109
|
||||
%14 = OpLoad %int %110
|
||||
%15 = OpIAdd %int %24 %14
|
||||
OpStore %acc %15
|
||||
OpBranch %70
|
||||
%70 = OpLabel
|
||||
%16 = OpIAdd %int %23 %int_1
|
||||
OpStore %i_0 %16
|
||||
OpBranch %69
|
||||
%71 = OpLabel
|
||||
%111 = OpIEqual %bool %24 %int_4
|
||||
OpSelectionMerge %112 None
|
||||
OpBranchConditional %111 %113 %114
|
||||
%113 = OpLabel
|
||||
OpStore %_GLF_color %59
|
||||
OpBranch %112
|
||||
%114 = OpLabel
|
||||
OpStore %_GLF_color %60
|
||||
OpBranch %112
|
||||
%112 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%yieldsZero_ = OpFunction %int None %39
|
||||
%115 = OpLabel
|
||||
%116 = OpVariable %_ptr_Function_bool Function %false
|
||||
%20 = OpVariable %_ptr_Function_int Function
|
||||
%i = OpVariable %_ptr_Function_int Function
|
||||
OpBranch %117
|
||||
%117 = OpLabel
|
||||
%118 = OpPhi %bool %false %115 %66 %119
|
||||
OpLoopMerge %120 %119 None
|
||||
OpBranch %121
|
||||
%121 = OpLabel
|
||||
OpStore %i %int_0
|
||||
OpBranch %122
|
||||
%122 = OpLabel
|
||||
%123 = OpPhi %bool %118 %121 %66 %124
|
||||
%28 = OpPhi %int %int_0 %121 %65 %124
|
||||
OpLoopMerge %125 %124 None
|
||||
OpBranch %126
|
||||
%126 = OpLabel
|
||||
%127 = OpAccessChain %_ptr_Uniform_float %_ %int_0
|
||||
%128 = OpLoad %float %127
|
||||
%129 = OpConvertFToS %int %128
|
||||
%130 = OpSLessThan %bool %28 %129
|
||||
OpBranchConditional %130 %131 %125
|
||||
%131 = OpLabel
|
||||
OpStore %116 %true
|
||||
OpStore %20 %28
|
||||
OpBranch %125
|
||||
%124 = OpLabel
|
||||
OpBranch %122
|
||||
%125 = OpLabel
|
||||
%26 = OpPhi %int %65 %126 %28 %131
|
||||
%132 = OpPhi %bool %123 %126 %true %131
|
||||
OpSelectionMerge %133 None
|
||||
OpBranchConditional %132 %120 %133
|
||||
%133 = OpLabel
|
||||
%134 = OpUndef %int
|
||||
OpStore %116 %true
|
||||
OpStore %20 %134
|
||||
OpBranch %120
|
||||
%119 = OpLabel
|
||||
OpBranch %117
|
||||
%120 = OpLabel
|
||||
%27 = OpPhi %int %26 %125 %134 %133
|
||||
OpReturnValue %27
|
||||
OpFunctionEnd
|
||||
211
test/tint/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl
Normal file
211
test/tint/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl
Normal file
@@ -0,0 +1,211 @@
|
||||
struct buf0 {
|
||||
one : f32;
|
||||
};
|
||||
|
||||
@group(0) @binding(0) var<uniform> x_8 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var x_68 : bool = false;
|
||||
var x_29 : i32;
|
||||
var x_30 : i32;
|
||||
var x_31 : i32;
|
||||
var globalNumbers : array<i32, 10>;
|
||||
var x_17 : i32;
|
||||
var acc : i32;
|
||||
var i_1 : i32;
|
||||
var localNumbers : array<i32, 2>;
|
||||
var param : i32;
|
||||
var x_24 : i32;
|
||||
var x_24_phi : i32;
|
||||
var x_23_phi : i32;
|
||||
acc = 0;
|
||||
i_1 = 0;
|
||||
x_24_phi = 0;
|
||||
x_23_phi = 0;
|
||||
loop {
|
||||
var x_33 : i32;
|
||||
var x_92 : i32;
|
||||
var x_76_phi : bool;
|
||||
var x_34_phi : i32;
|
||||
var x_25_phi : i32;
|
||||
x_24 = x_24_phi;
|
||||
let x_23 : i32 = x_23_phi;
|
||||
if ((x_23 < 4)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
x_68 = false;
|
||||
x_76_phi = false;
|
||||
loop {
|
||||
var x_81 : bool;
|
||||
var x_32 : i32;
|
||||
var x_81_phi : bool;
|
||||
var x_32_phi : i32;
|
||||
var x_33_phi : i32;
|
||||
var x_90_phi : bool;
|
||||
let x_76 : bool = x_76_phi;
|
||||
x_30 = 0;
|
||||
x_81_phi = x_76;
|
||||
x_32_phi = 0;
|
||||
loop {
|
||||
x_81 = x_81_phi;
|
||||
x_32 = x_32_phi;
|
||||
let x_86 : f32 = x_8.one;
|
||||
x_33_phi = 0;
|
||||
x_90_phi = x_81;
|
||||
if ((x_32 < i32(x_86))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
x_68 = true;
|
||||
x_29 = x_32;
|
||||
x_33_phi = x_32;
|
||||
x_90_phi = true;
|
||||
break;
|
||||
|
||||
continuing {
|
||||
x_81_phi = false;
|
||||
x_32_phi = 0;
|
||||
}
|
||||
}
|
||||
x_33 = x_33_phi;
|
||||
let x_90 : bool = x_90_phi;
|
||||
x_34_phi = x_33;
|
||||
if (x_90) {
|
||||
break;
|
||||
}
|
||||
x_92 = 0;
|
||||
x_68 = true;
|
||||
x_29 = x_92;
|
||||
x_34_phi = x_92;
|
||||
break;
|
||||
|
||||
continuing {
|
||||
x_76_phi = false;
|
||||
}
|
||||
}
|
||||
let x_34 : i32 = x_34_phi;
|
||||
x_31 = x_34;
|
||||
let x_93 : i32 = x_31;
|
||||
let x_21 : array<i32, 2> = localNumbers;
|
||||
var x_22_1 : array<i32, 2> = x_21;
|
||||
x_22_1[1u] = x_93;
|
||||
let x_22 : array<i32, 2> = x_22_1;
|
||||
localNumbers = x_22;
|
||||
globalNumbers[0] = 0;
|
||||
let x_95 : ptr<function, i32> = &(localNumbers[1]);
|
||||
let x_13 : i32 = x_22[1u];
|
||||
param = x_13;
|
||||
x_17 = 0;
|
||||
x_25_phi = 0;
|
||||
loop {
|
||||
let x_25 : i32 = x_25_phi;
|
||||
if ((x_25 <= x_13)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_102 : ptr<function, i32> = &(globalNumbers[x_13]);
|
||||
let x_18 : i32 = *(x_102);
|
||||
if ((x_18 <= 1)) {
|
||||
*(x_102) = 1;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_19 : i32 = (x_25 + 1);
|
||||
x_17 = x_19;
|
||||
x_25_phi = x_19;
|
||||
}
|
||||
}
|
||||
let x_107 : f32 = x_8.one;
|
||||
let x_14 : i32 = globalNumbers[(i32(x_107) - 1)];
|
||||
let x_15 : i32 = bitcast<i32>((x_24 + bitcast<i32>(x_14)));
|
||||
acc = x_15;
|
||||
|
||||
continuing {
|
||||
let x_16 : i32 = (x_23 + 1);
|
||||
i_1 = x_16;
|
||||
x_24_phi = x_15;
|
||||
x_23_phi = x_16;
|
||||
}
|
||||
}
|
||||
if ((x_24 == bitcast<i32>(4))) {
|
||||
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);
|
||||
}
|
||||
|
||||
fn yieldsZero_() -> i32 {
|
||||
var x_116 : bool = false;
|
||||
var x_20 : i32;
|
||||
var i : i32;
|
||||
var x_26 : i32;
|
||||
var x_134 : i32;
|
||||
var x_118_phi : bool;
|
||||
var x_27_phi : i32;
|
||||
x_118_phi = false;
|
||||
loop {
|
||||
var x_123 : bool;
|
||||
var x_28 : i32;
|
||||
var x_123_phi : bool;
|
||||
var x_28_phi : i32;
|
||||
var x_26_phi : i32;
|
||||
var x_132_phi : bool;
|
||||
let x_118 : bool = x_118_phi;
|
||||
i = 0;
|
||||
x_123_phi = x_118;
|
||||
x_28_phi = 0;
|
||||
loop {
|
||||
x_123 = x_123_phi;
|
||||
x_28 = x_28_phi;
|
||||
let x_128 : f32 = x_8.one;
|
||||
x_26_phi = 0;
|
||||
x_132_phi = x_123;
|
||||
if ((x_28 < i32(x_128))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
x_116 = true;
|
||||
x_20 = x_28;
|
||||
x_26_phi = x_28;
|
||||
x_132_phi = true;
|
||||
break;
|
||||
|
||||
continuing {
|
||||
x_123_phi = false;
|
||||
x_28_phi = 0;
|
||||
}
|
||||
}
|
||||
x_26 = x_26_phi;
|
||||
let x_132 : bool = x_132_phi;
|
||||
x_27_phi = x_26;
|
||||
if (x_132) {
|
||||
break;
|
||||
}
|
||||
x_134 = 0;
|
||||
x_116 = true;
|
||||
x_20 = x_134;
|
||||
x_27_phi = x_134;
|
||||
break;
|
||||
|
||||
continuing {
|
||||
x_118_phi = false;
|
||||
}
|
||||
}
|
||||
let x_27 : i32 = x_27_phi;
|
||||
return x_27;
|
||||
}
|
||||
Reference in New Issue
Block a user