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,148 @@
|
||||
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 %sums "sums"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "_GLF_uniform_float_values"
|
||||
OpName %_ ""
|
||||
OpName %i "i"
|
||||
OpName %buf1 "buf1"
|
||||
OpMemberName %buf1 0 "_GLF_uniform_int_values"
|
||||
OpName %__0 ""
|
||||
OpName %indexable "indexable"
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpDecorate %_arr_float_uint_2 ArrayStride 16
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %buf0 Block
|
||||
OpDecorate %_ DescriptorSet 0
|
||||
OpDecorate %_ Binding 0
|
||||
OpDecorate %_arr_int_uint_3 ArrayStride 16
|
||||
OpMemberDecorate %buf1 0 Offset 0
|
||||
OpDecorate %buf1 Block
|
||||
OpDecorate %__0 DescriptorSet 0
|
||||
OpDecorate %__0 Binding 1
|
||||
OpDecorate %_GLF_color Location 0
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%_arr_float_uint_3 = OpTypeArray %float %uint_3
|
||||
%_ptr_Function__arr_float_uint_3 = OpTypePointer Function %_arr_float_uint_3
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%_arr_float_uint_2 = OpTypeArray %float %uint_2
|
||||
%buf0 = OpTypeStruct %_arr_float_uint_2
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%_arr_int_uint_3 = OpTypeArray %int %uint_3
|
||||
%buf1 = OpTypeStruct %_arr_int_uint_3
|
||||
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
|
||||
%__0 = OpVariable %_ptr_Uniform_buf1 Uniform
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%bool = OpTypeBool
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat2v4float = OpTypeMatrix %v4float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%main = OpFunction %void None %14
|
||||
%38 = OpLabel
|
||||
%sums = OpVariable %_ptr_Function__arr_float_uint_3 Function
|
||||
%i = OpVariable %_ptr_Function_int Function
|
||||
%indexable = OpVariable %_ptr_Function_mat2v4float Function
|
||||
%39 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
|
||||
%40 = OpLoad %float %39
|
||||
%41 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
|
||||
%42 = OpLoad %float %41
|
||||
%43 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
|
||||
%44 = OpLoad %float %43
|
||||
%45 = OpCompositeConstruct %_arr_float_uint_3 %40 %42 %44
|
||||
OpStore %sums %45
|
||||
OpStore %i %int_0
|
||||
OpBranch %46
|
||||
%46 = OpLabel
|
||||
OpLoopMerge %47 %48 None
|
||||
OpBranch %49
|
||||
%49 = OpLabel
|
||||
%50 = OpLoad %int %i
|
||||
%51 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%52 = OpLoad %int %51
|
||||
%53 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%54 = OpLoad %int %53
|
||||
%55 = OpExtInst %int %1 SClamp %52 %54 %int_2
|
||||
%56 = OpSLessThan %bool %50 %55
|
||||
OpBranchConditional %56 %57 %47
|
||||
%57 = OpLabel
|
||||
%58 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2
|
||||
%59 = OpLoad %int %58
|
||||
%60 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
|
||||
%61 = OpLoad %float %60
|
||||
%62 = OpCompositeConstruct %v4float %61 %float_0 %float_0 %float_0
|
||||
%63 = OpCompositeConstruct %v4float %float_0 %61 %float_0 %float_0
|
||||
%64 = OpCompositeConstruct %mat2v4float %62 %63
|
||||
%65 = OpLoad %int %i
|
||||
%66 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%67 = OpLoad %int %66
|
||||
OpStore %indexable %64
|
||||
%68 = OpAccessChain %_ptr_Function_float %indexable %65 %67
|
||||
%69 = OpLoad %float %68
|
||||
%70 = OpAccessChain %_ptr_Function_float %sums %59
|
||||
%71 = OpLoad %float %70
|
||||
%72 = OpFAdd %float %71 %69
|
||||
%73 = OpAccessChain %_ptr_Function_float %sums %59
|
||||
OpStore %73 %72
|
||||
OpBranch %48
|
||||
%48 = OpLabel
|
||||
%74 = OpLoad %int %i
|
||||
%75 = OpIAdd %int %74 %int_1
|
||||
OpStore %i %75
|
||||
OpBranch %46
|
||||
%47 = OpLabel
|
||||
%76 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2
|
||||
%77 = OpLoad %int %76
|
||||
%78 = OpAccessChain %_ptr_Function_float %sums %77
|
||||
%79 = OpLoad %float %78
|
||||
%80 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%81 = OpLoad %float %80
|
||||
%82 = OpFOrdEqual %bool %79 %81
|
||||
OpSelectionMerge %83 None
|
||||
OpBranchConditional %82 %84 %85
|
||||
%84 = OpLabel
|
||||
%86 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%87 = OpLoad %int %86
|
||||
%88 = OpConvertSToF %float %87
|
||||
%89 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%90 = OpLoad %int %89
|
||||
%91 = OpConvertSToF %float %90
|
||||
%92 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%93 = OpLoad %int %92
|
||||
%94 = OpConvertSToF %float %93
|
||||
%95 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%96 = OpLoad %int %95
|
||||
%97 = OpConvertSToF %float %96
|
||||
%98 = OpCompositeConstruct %v4float %88 %91 %94 %97
|
||||
OpStore %_GLF_color %98
|
||||
OpBranch %83
|
||||
%85 = OpLabel
|
||||
%99 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%100 = OpLoad %int %99
|
||||
%101 = OpConvertSToF %float %100
|
||||
%102 = OpCompositeConstruct %v4float %101 %101 %101 %101
|
||||
OpStore %_GLF_color %102
|
||||
OpBranch %83
|
||||
%83 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,76 @@
|
||||
type Arr = @stride(16) array<f32, 2>;
|
||||
|
||||
struct buf0 {
|
||||
x_GLF_uniform_float_values : Arr;
|
||||
};
|
||||
|
||||
type Arr_1 = @stride(16) array<i32, 3>;
|
||||
|
||||
struct buf1 {
|
||||
x_GLF_uniform_int_values : Arr_1;
|
||||
};
|
||||
|
||||
@group(0) @binding(0) var<uniform> x_6 : buf0;
|
||||
|
||||
@group(0) @binding(1) var<uniform> x_9 : buf1;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var sums : array<f32, 3>;
|
||||
var i : i32;
|
||||
var indexable : mat2x4<f32>;
|
||||
let x_40 : f32 = x_6.x_GLF_uniform_float_values[0];
|
||||
let x_42 : f32 = x_6.x_GLF_uniform_float_values[0];
|
||||
let x_44 : f32 = x_6.x_GLF_uniform_float_values[0];
|
||||
sums = array<f32, 3>(x_40, x_42, x_44);
|
||||
i = 0;
|
||||
loop {
|
||||
let x_50 : i32 = i;
|
||||
let x_52 : i32 = x_9.x_GLF_uniform_int_values[0];
|
||||
let x_54 : i32 = x_9.x_GLF_uniform_int_values[0];
|
||||
if ((x_50 < clamp(x_52, x_54, 2))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_59 : i32 = x_9.x_GLF_uniform_int_values[2];
|
||||
let x_61 : f32 = x_6.x_GLF_uniform_float_values[0];
|
||||
let x_65 : i32 = i;
|
||||
let x_67 : i32 = x_9.x_GLF_uniform_int_values[1];
|
||||
indexable = mat2x4<f32>(vec4<f32>(x_61, 0.0, 0.0, 0.0), vec4<f32>(0.0, x_61, 0.0, 0.0));
|
||||
let x_69 : f32 = indexable[x_65][x_67];
|
||||
let x_71 : f32 = sums[x_59];
|
||||
sums[x_59] = (x_71 + x_69);
|
||||
|
||||
continuing {
|
||||
let x_74 : i32 = i;
|
||||
i = (x_74 + 1);
|
||||
}
|
||||
}
|
||||
let x_77 : i32 = x_9.x_GLF_uniform_int_values[2];
|
||||
let x_79 : f32 = sums[x_77];
|
||||
let x_81 : f32 = x_6.x_GLF_uniform_float_values[1];
|
||||
if ((x_79 == x_81)) {
|
||||
let x_87 : i32 = x_9.x_GLF_uniform_int_values[0];
|
||||
let x_90 : i32 = x_9.x_GLF_uniform_int_values[1];
|
||||
let x_93 : i32 = x_9.x_GLF_uniform_int_values[1];
|
||||
let x_96 : i32 = x_9.x_GLF_uniform_int_values[0];
|
||||
x_GLF_color = vec4<f32>(f32(x_87), f32(x_90), f32(x_93), f32(x_96));
|
||||
} else {
|
||||
let x_100 : i32 = x_9.x_GLF_uniform_int_values[1];
|
||||
let x_101 : f32 = f32(x_100);
|
||||
x_GLF_color = vec4<f32>(x_101, x_101, x_101, x_101);
|
||||
}
|
||||
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