mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +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,267 @@
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %_GLF_color
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpSource ESSL 320
|
||||
OpName %main "main"
|
||||
OpName %_GLF_global_loop_count "_GLF_global_loop_count"
|
||||
OpName %m "m"
|
||||
OpName %buf1 "buf1"
|
||||
OpMemberName %buf1 0 "_GLF_uniform_float_values"
|
||||
OpName %_ ""
|
||||
OpName %v "v"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "_GLF_uniform_int_values"
|
||||
OpName %__0 ""
|
||||
OpName %b "b"
|
||||
OpName %buf2 "buf2"
|
||||
OpMemberName %buf2 0 "one"
|
||||
OpName %__1 ""
|
||||
OpName %zero "zero"
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpDecorate %_arr_float_uint_18 ArrayStride 16
|
||||
OpMemberDecorate %buf1 0 Offset 0
|
||||
OpDecorate %buf1 Block
|
||||
OpDecorate %_ DescriptorSet 0
|
||||
OpDecorate %_ Binding 1
|
||||
OpDecorate %_arr_int_uint_4 ArrayStride 16
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %buf0 Block
|
||||
OpDecorate %__0 DescriptorSet 0
|
||||
OpDecorate %__0 Binding 0
|
||||
OpMemberDecorate %buf2 0 Offset 0
|
||||
OpDecorate %buf2 Block
|
||||
OpDecorate %__1 DescriptorSet 0
|
||||
OpDecorate %__1 Binding 2
|
||||
OpDecorate %_GLF_color Location 0
|
||||
%void = OpTypeVoid
|
||||
%20 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Private_int = OpTypePointer Private %int
|
||||
%_GLF_global_loop_count = OpVariable %_ptr_Private_int Private
|
||||
%int_0 = OpConstant %int 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat4v4float = OpTypeMatrix %v4float 4
|
||||
%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_18 = OpConstant %uint 18
|
||||
%_arr_float_uint_18 = OpTypeArray %float %uint_18
|
||||
%buf1 = OpTypeStruct %_arr_float_uint_18
|
||||
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
|
||||
%_ = OpVariable %_ptr_Uniform_buf1 Uniform
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_4 = OpConstant %int 4
|
||||
%int_5 = OpConstant %int 5
|
||||
%int_6 = OpConstant %int 6
|
||||
%int_7 = OpConstant %int 7
|
||||
%int_8 = OpConstant %int 8
|
||||
%int_9 = OpConstant %int 9
|
||||
%int_10 = OpConstant %int 10
|
||||
%int_11 = OpConstant %int 11
|
||||
%int_12 = OpConstant %int 12
|
||||
%int_13 = OpConstant %int 13
|
||||
%int_14 = OpConstant %int 14
|
||||
%int_15 = OpConstant %int 15
|
||||
%int_16 = OpConstant %int 16
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_int_uint_4 = OpTypeArray %int %uint_4
|
||||
%buf0 = OpTypeStruct %_arr_int_uint_4
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%__0 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%bool = OpTypeBool
|
||||
%buf2 = OpTypeStruct %int
|
||||
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
|
||||
%__1 = OpVariable %_ptr_Uniform_buf2 Uniform
|
||||
%int_17 = OpConstant %int 17
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%main = OpFunction %void None %20
|
||||
%60 = OpLabel
|
||||
%m = OpVariable %_ptr_Function_mat4v4float Function
|
||||
%v = OpVariable %_ptr_Function_v4float Function
|
||||
%f = OpVariable %_ptr_Function_float Function
|
||||
%a = OpVariable %_ptr_Function_int Function
|
||||
%b = OpVariable %_ptr_Function_int Function
|
||||
%zero = OpVariable %_ptr_Function_float Function
|
||||
OpStore %_GLF_global_loop_count %int_0
|
||||
%61 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%62 = OpLoad %float %61
|
||||
%63 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_2
|
||||
%64 = OpLoad %float %63
|
||||
%65 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_3
|
||||
%66 = OpLoad %float %65
|
||||
%67 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_4
|
||||
%68 = OpLoad %float %67
|
||||
%69 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_5
|
||||
%70 = OpLoad %float %69
|
||||
%71 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_6
|
||||
%72 = OpLoad %float %71
|
||||
%73 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_7
|
||||
%74 = OpLoad %float %73
|
||||
%75 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_8
|
||||
%76 = OpLoad %float %75
|
||||
%77 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_9
|
||||
%78 = OpLoad %float %77
|
||||
%79 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_10
|
||||
%80 = OpLoad %float %79
|
||||
%81 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_11
|
||||
%82 = OpLoad %float %81
|
||||
%83 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_12
|
||||
%84 = OpLoad %float %83
|
||||
%85 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_13
|
||||
%86 = OpLoad %float %85
|
||||
%87 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_14
|
||||
%88 = OpLoad %float %87
|
||||
%89 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_15
|
||||
%90 = OpLoad %float %89
|
||||
%91 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_16
|
||||
%92 = OpLoad %float %91
|
||||
%93 = OpCompositeConstruct %v4float %62 %64 %66 %68
|
||||
%94 = OpCompositeConstruct %v4float %70 %72 %74 %76
|
||||
%95 = OpCompositeConstruct %v4float %78 %80 %82 %84
|
||||
%96 = OpCompositeConstruct %v4float %86 %88 %90 %92
|
||||
%97 = OpCompositeConstruct %mat4v4float %93 %94 %95 %96
|
||||
OpStore %m %97
|
||||
%98 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%99 = OpLoad %float %98
|
||||
%100 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_2
|
||||
%101 = OpLoad %float %100
|
||||
%102 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_3
|
||||
%103 = OpLoad %float %102
|
||||
%104 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_4
|
||||
%105 = OpLoad %float %104
|
||||
%106 = OpCompositeConstruct %v4float %99 %101 %103 %105
|
||||
OpStore %v %106
|
||||
%107 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%108 = OpLoad %float %107
|
||||
OpStore %f %108
|
||||
%109 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%110 = OpLoad %int %109
|
||||
OpStore %a %110
|
||||
OpBranch %111
|
||||
%111 = OpLabel
|
||||
OpLoopMerge %112 %113 None
|
||||
OpBranch %114
|
||||
%114 = OpLabel
|
||||
%115 = OpLoad %int %_GLF_global_loop_count
|
||||
%116 = OpSLessThan %bool %115 %int_10
|
||||
OpBranchConditional %116 %117 %112
|
||||
%117 = OpLabel
|
||||
%118 = OpLoad %int %_GLF_global_loop_count
|
||||
%119 = OpIAdd %int %118 %int_1
|
||||
OpStore %_GLF_global_loop_count %119
|
||||
%120 = OpLoad %int %a
|
||||
%121 = OpExtInst %int %1 SClamp %120 %int_0 %int_3
|
||||
%122 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%123 = OpLoad %float %122
|
||||
%124 = OpAccessChain %_ptr_Function_float %v %121
|
||||
%125 = OpLoad %float %124
|
||||
%126 = OpFAdd %float %125 %123
|
||||
%127 = OpAccessChain %_ptr_Function_float %v %121
|
||||
OpStore %127 %126
|
||||
%128 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2
|
||||
%129 = OpLoad %int %128
|
||||
OpStore %b %129
|
||||
OpBranch %130
|
||||
%130 = OpLabel
|
||||
OpLoopMerge %131 %132 None
|
||||
OpBranch %133
|
||||
%133 = OpLabel
|
||||
%134 = OpLoad %int %_GLF_global_loop_count
|
||||
%135 = OpSLessThan %bool %134 %int_10
|
||||
OpBranchConditional %135 %136 %131
|
||||
%136 = OpLabel
|
||||
%137 = OpLoad %int %_GLF_global_loop_count
|
||||
%138 = OpIAdd %int %137 %int_1
|
||||
OpStore %_GLF_global_loop_count %138
|
||||
%139 = OpLoad %int %b
|
||||
%140 = OpExtInst %int %1 SClamp %139 %int_0 %int_3
|
||||
%141 = OpAccessChain %_ptr_Function_float %v %140
|
||||
%142 = OpLoad %float %141
|
||||
%143 = OpLoad %int %b
|
||||
%144 = OpExtInst %int %1 SClamp %143 %int_0 %int_3
|
||||
%145 = OpLoad %int %a
|
||||
%146 = OpAccessChain %_ptr_Function_float %m %144 %145
|
||||
%147 = OpLoad %float %146
|
||||
%148 = OpFMul %float %142 %147
|
||||
%149 = OpLoad %float %f
|
||||
%150 = OpFAdd %float %149 %148
|
||||
OpStore %f %150
|
||||
OpBranch %132
|
||||
%132 = OpLabel
|
||||
%151 = OpLoad %int %b
|
||||
%152 = OpISub %int %151 %int_1
|
||||
OpStore %b %152
|
||||
OpBranch %130
|
||||
%131 = OpLabel
|
||||
%153 = OpLoad %int %a
|
||||
%154 = OpExtInst %int %1 SClamp %153 %int_0 %int_3
|
||||
%155 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%156 = OpLoad %float %155
|
||||
%157 = OpAccessChain %_ptr_Function_float %m %int_1 %154
|
||||
OpStore %157 %156
|
||||
%158 = OpAccessChain %_ptr_Uniform_int %__1 %int_0
|
||||
%159 = OpLoad %int %158
|
||||
%160 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%161 = OpLoad %int %160
|
||||
%162 = OpIEqual %bool %159 %161
|
||||
OpSelectionMerge %163 None
|
||||
OpBranchConditional %162 %164 %163
|
||||
%164 = OpLabel
|
||||
OpKill
|
||||
%163 = OpLabel
|
||||
%165 = OpAccessChain %_ptr_Uniform_int %__1 %int_0
|
||||
%166 = OpLoad %int %165
|
||||
%167 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%168 = OpLoad %int %167
|
||||
%169 = OpIEqual %bool %166 %168
|
||||
OpSelectionMerge %170 None
|
||||
OpBranchConditional %169 %171 %170
|
||||
%171 = OpLabel
|
||||
OpKill
|
||||
%170 = OpLabel
|
||||
OpBranch %113
|
||||
%113 = OpLabel
|
||||
%172 = OpLoad %int %a
|
||||
%173 = OpIAdd %int %172 %int_1
|
||||
OpStore %a %173
|
||||
OpBranch %111
|
||||
%112 = OpLabel
|
||||
%174 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
|
||||
%175 = OpLoad %float %174
|
||||
OpStore %zero %175
|
||||
%176 = OpLoad %float %f
|
||||
%177 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_17
|
||||
%178 = OpLoad %float %177
|
||||
%179 = OpFUnordNotEqual %bool %176 %178
|
||||
OpSelectionMerge %180 None
|
||||
OpBranchConditional %179 %181 %180
|
||||
%181 = OpLabel
|
||||
%182 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%183 = OpLoad %float %182
|
||||
OpStore %zero %183
|
||||
OpBranch %180
|
||||
%180 = OpLabel
|
||||
%184 = OpLoad %float %f
|
||||
%185 = OpLoad %float %zero
|
||||
%186 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%187 = OpLoad %int %186
|
||||
%188 = OpConvertSToF %float %187
|
||||
%189 = OpLoad %float %f
|
||||
%190 = OpCompositeConstruct %v4float %184 %185 %188 %189
|
||||
OpStore %_GLF_color %190
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,141 @@
|
||||
type Arr = @stride(16) array<f32, 18>;
|
||||
|
||||
struct buf1 {
|
||||
x_GLF_uniform_float_values : Arr;
|
||||
};
|
||||
|
||||
type Arr_1 = @stride(16) array<i32, 4>;
|
||||
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr_1;
|
||||
};
|
||||
|
||||
struct buf2 {
|
||||
one : i32;
|
||||
};
|
||||
|
||||
var<private> x_GLF_global_loop_count : i32;
|
||||
|
||||
@group(0) @binding(1) var<uniform> x_7 : buf1;
|
||||
|
||||
@group(0) @binding(0) var<uniform> x_12 : buf0;
|
||||
|
||||
@group(0) @binding(2) var<uniform> x_15 : buf2;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var m : mat4x4<f32>;
|
||||
var v : vec4<f32>;
|
||||
var f : f32;
|
||||
var a : i32;
|
||||
var b : i32;
|
||||
var zero : f32;
|
||||
x_GLF_global_loop_count = 0;
|
||||
let x_62 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
let x_64 : f32 = x_7.x_GLF_uniform_float_values[2];
|
||||
let x_66 : f32 = x_7.x_GLF_uniform_float_values[3];
|
||||
let x_68 : f32 = x_7.x_GLF_uniform_float_values[4];
|
||||
let x_70 : f32 = x_7.x_GLF_uniform_float_values[5];
|
||||
let x_72 : f32 = x_7.x_GLF_uniform_float_values[6];
|
||||
let x_74 : f32 = x_7.x_GLF_uniform_float_values[7];
|
||||
let x_76 : f32 = x_7.x_GLF_uniform_float_values[8];
|
||||
let x_78 : f32 = x_7.x_GLF_uniform_float_values[9];
|
||||
let x_80 : f32 = x_7.x_GLF_uniform_float_values[10];
|
||||
let x_82 : f32 = x_7.x_GLF_uniform_float_values[11];
|
||||
let x_84 : f32 = x_7.x_GLF_uniform_float_values[12];
|
||||
let x_86 : f32 = x_7.x_GLF_uniform_float_values[13];
|
||||
let x_88 : f32 = x_7.x_GLF_uniform_float_values[14];
|
||||
let x_90 : f32 = x_7.x_GLF_uniform_float_values[15];
|
||||
let x_92 : f32 = x_7.x_GLF_uniform_float_values[16];
|
||||
m = mat4x4<f32>(vec4<f32>(x_62, x_64, x_66, x_68), vec4<f32>(x_70, x_72, x_74, x_76), vec4<f32>(x_78, x_80, x_82, x_84), vec4<f32>(x_86, x_88, x_90, x_92));
|
||||
let x_99 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
let x_101 : f32 = x_7.x_GLF_uniform_float_values[2];
|
||||
let x_103 : f32 = x_7.x_GLF_uniform_float_values[3];
|
||||
let x_105 : f32 = x_7.x_GLF_uniform_float_values[4];
|
||||
v = vec4<f32>(x_99, x_101, x_103, x_105);
|
||||
let x_108 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
f = x_108;
|
||||
let x_110 : i32 = x_12.x_GLF_uniform_int_values[0];
|
||||
a = x_110;
|
||||
loop {
|
||||
let x_115 : i32 = x_GLF_global_loop_count;
|
||||
if ((x_115 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_118 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_118 + 1);
|
||||
let x_120 : i32 = a;
|
||||
let x_121 : i32 = clamp(x_120, 0, 3);
|
||||
let x_123 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
let x_125 : f32 = v[x_121];
|
||||
v[x_121] = (x_125 + x_123);
|
||||
let x_129 : i32 = x_12.x_GLF_uniform_int_values[2];
|
||||
b = x_129;
|
||||
loop {
|
||||
let x_134 : i32 = x_GLF_global_loop_count;
|
||||
if ((x_134 < 10)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_137 : i32 = x_GLF_global_loop_count;
|
||||
x_GLF_global_loop_count = (x_137 + 1);
|
||||
let x_139 : i32 = b;
|
||||
let x_142 : f32 = v[clamp(x_139, 0, 3)];
|
||||
let x_143 : i32 = b;
|
||||
let x_145 : i32 = a;
|
||||
let x_147 : f32 = m[clamp(x_143, 0, 3)][x_145];
|
||||
let x_149 : f32 = f;
|
||||
f = (x_149 + (x_142 * x_147));
|
||||
|
||||
continuing {
|
||||
let x_151 : i32 = b;
|
||||
b = (x_151 - 1);
|
||||
}
|
||||
}
|
||||
let x_153 : i32 = a;
|
||||
let x_156 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
m[1][clamp(x_153, 0, 3)] = x_156;
|
||||
let x_159 : i32 = x_15.one;
|
||||
let x_161 : i32 = x_12.x_GLF_uniform_int_values[0];
|
||||
if ((x_159 == x_161)) {
|
||||
discard;
|
||||
}
|
||||
let x_166 : i32 = x_15.one;
|
||||
let x_168 : i32 = x_12.x_GLF_uniform_int_values[1];
|
||||
if ((x_166 == x_168)) {
|
||||
discard;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_172 : i32 = a;
|
||||
a = (x_172 + 1);
|
||||
}
|
||||
}
|
||||
let x_175 : f32 = x_7.x_GLF_uniform_float_values[0];
|
||||
zero = x_175;
|
||||
let x_176 : f32 = f;
|
||||
let x_178 : f32 = x_7.x_GLF_uniform_float_values[17];
|
||||
if (!((x_176 == x_178))) {
|
||||
let x_183 : f32 = x_7.x_GLF_uniform_float_values[1];
|
||||
zero = x_183;
|
||||
}
|
||||
let x_184 : f32 = f;
|
||||
let x_185 : f32 = zero;
|
||||
let x_187 : i32 = x_12.x_GLF_uniform_int_values[0];
|
||||
let x_189 : f32 = f;
|
||||
x_GLF_color = vec4<f32>(x_184, x_185, f32(x_187), x_189);
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user