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,184 @@
|
||||
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 %v "v"
|
||||
OpName %buf1 "buf1"
|
||||
OpMemberName %buf1 0 "_GLF_uniform_int_values"
|
||||
OpName %_ ""
|
||||
OpName %i "i"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "_GLF_uniform_float_values"
|
||||
OpName %__0 ""
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpDecorate %_arr_int_uint_5 ArrayStride 16
|
||||
OpMemberDecorate %buf1 0 Offset 0
|
||||
OpDecorate %buf1 Block
|
||||
OpDecorate %_ DescriptorSet 0
|
||||
OpDecorate %_ Binding 1
|
||||
OpDecorate %_arr_float_uint_2 ArrayStride 16
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %buf0 Block
|
||||
OpDecorate %__0 DescriptorSet 0
|
||||
OpDecorate %__0 Binding 0
|
||||
OpDecorate %_GLF_color Location 0
|
||||
%void = OpTypeVoid
|
||||
%13 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%int = OpTypeInt 32 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_5 = OpConstant %uint 5
|
||||
%_arr_int_uint_5 = OpTypeArray %int %uint_5
|
||||
%buf1 = OpTypeStruct %_arr_int_uint_5
|
||||
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
|
||||
%_ = OpVariable %_ptr_Uniform_buf1 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%int_4 = OpConstant %int 4
|
||||
%bool = OpTypeBool
|
||||
%mat4v4float = OpTypeMatrix %v4float 4
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%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
|
||||
%__0 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%v4bool = OpTypeVector %bool 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%main = OpFunction %void None %13
|
||||
%38 = OpLabel
|
||||
%v = OpVariable %_ptr_Function_v4float Function
|
||||
%i = OpVariable %_ptr_Function_int Function
|
||||
%39 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%40 = OpLoad %int %39
|
||||
%41 = OpConvertSToF %float %40
|
||||
%42 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%43 = OpLoad %int %42
|
||||
%44 = OpConvertSToF %float %43
|
||||
%45 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_3
|
||||
%46 = OpLoad %int %45
|
||||
%47 = OpConvertSToF %float %46
|
||||
%48 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
|
||||
%49 = OpLoad %int %48
|
||||
%50 = OpConvertSToF %float %49
|
||||
%51 = OpCompositeConstruct %v4float %41 %44 %47 %50
|
||||
OpStore %v %51
|
||||
%52 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_4
|
||||
%53 = OpLoad %int %52
|
||||
OpStore %i %53
|
||||
OpBranch %54
|
||||
%54 = OpLabel
|
||||
OpLoopMerge %55 %56 None
|
||||
OpBranch %57
|
||||
%57 = OpLabel
|
||||
%58 = OpLoad %int %i
|
||||
%59 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
|
||||
%60 = OpLoad %int %59
|
||||
%61 = OpSLessThan %bool %58 %60
|
||||
OpBranchConditional %61 %62 %55
|
||||
%62 = OpLabel
|
||||
%63 = OpLoad %v4float %v
|
||||
%64 = OpLoad %v4float %v
|
||||
%65 = OpLoad %v4float %v
|
||||
%66 = OpLoad %v4float %v
|
||||
%67 = OpCompositeExtract %float %63 0
|
||||
%68 = OpCompositeExtract %float %63 1
|
||||
%69 = OpCompositeExtract %float %63 2
|
||||
%70 = OpCompositeExtract %float %63 3
|
||||
%71 = OpCompositeExtract %float %64 0
|
||||
%72 = OpCompositeExtract %float %64 1
|
||||
%73 = OpCompositeExtract %float %64 2
|
||||
%74 = OpCompositeExtract %float %64 3
|
||||
%75 = OpCompositeExtract %float %65 0
|
||||
%76 = OpCompositeExtract %float %65 1
|
||||
%77 = OpCompositeExtract %float %65 2
|
||||
%78 = OpCompositeExtract %float %65 3
|
||||
%79 = OpCompositeExtract %float %66 0
|
||||
%80 = OpCompositeExtract %float %66 1
|
||||
%81 = OpCompositeExtract %float %66 2
|
||||
%82 = OpCompositeExtract %float %66 3
|
||||
%83 = OpCompositeConstruct %v4float %67 %68 %69 %70
|
||||
%84 = OpCompositeConstruct %v4float %71 %72 %73 %74
|
||||
%85 = OpCompositeConstruct %v4float %75 %76 %77 %78
|
||||
%86 = OpCompositeConstruct %v4float %79 %80 %81 %82
|
||||
%87 = OpCompositeConstruct %mat4v4float %83 %84 %85 %86
|
||||
%88 = OpLoad %int %i
|
||||
%89 = OpCompositeExtract %v4float %87 0
|
||||
%90 = OpVectorExtractDynamic %float %89 %88
|
||||
%91 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0
|
||||
%92 = OpLoad %float %91
|
||||
%93 = OpFOrdGreaterThan %bool %90 %92
|
||||
OpSelectionMerge %94 None
|
||||
OpBranchConditional %93 %95 %94
|
||||
%95 = OpLabel
|
||||
%96 = OpLoad %int %i
|
||||
%97 = OpLoad %v4float %v
|
||||
%98 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_1
|
||||
%99 = OpLoad %float %98
|
||||
%100 = OpCompositeConstruct %v4float %99 %99 %99 %99
|
||||
%101 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0
|
||||
%102 = OpLoad %float %101
|
||||
%103 = OpCompositeConstruct %v4float %102 %102 %102 %102
|
||||
%104 = OpExtInst %v4float %1 FClamp %97 %100 %103
|
||||
%105 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%106 = OpLoad %int %105
|
||||
%107 = OpVectorExtractDynamic %float %104 %106
|
||||
%108 = OpAccessChain %_ptr_Function_float %v %96
|
||||
OpStore %108 %107
|
||||
OpBranch %94
|
||||
%94 = OpLabel
|
||||
OpBranch %56
|
||||
%56 = OpLabel
|
||||
%109 = OpLoad %int %i
|
||||
%110 = OpIAdd %int %109 %int_1
|
||||
OpStore %i %110
|
||||
OpBranch %54
|
||||
%55 = OpLabel
|
||||
%111 = OpLoad %v4float %v
|
||||
%112 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%113 = OpLoad %int %112
|
||||
%114 = OpConvertSToF %float %113
|
||||
%115 = OpCompositeConstruct %v4float %114 %114 %114 %114
|
||||
%116 = OpFOrdEqual %v4bool %111 %115
|
||||
%117 = OpAll %bool %116
|
||||
OpSelectionMerge %118 None
|
||||
OpBranchConditional %117 %119 %120
|
||||
%119 = OpLabel
|
||||
%121 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%122 = OpLoad %int %121
|
||||
%123 = OpConvertSToF %float %122
|
||||
%124 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_4
|
||||
%125 = OpLoad %int %124
|
||||
%126 = OpConvertSToF %float %125
|
||||
%127 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_4
|
||||
%128 = OpLoad %int %127
|
||||
%129 = OpConvertSToF %float %128
|
||||
%130 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%131 = OpLoad %int %130
|
||||
%132 = OpConvertSToF %float %131
|
||||
%133 = OpCompositeConstruct %v4float %123 %126 %129 %132
|
||||
OpStore %_GLF_color %133
|
||||
OpBranch %118
|
||||
%120 = OpLabel
|
||||
%134 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_4
|
||||
%135 = OpLoad %int %134
|
||||
%136 = OpConvertSToF %float %135
|
||||
%137 = OpCompositeConstruct %v4float %136 %136 %136 %136
|
||||
OpStore %_GLF_color %137
|
||||
OpBranch %118
|
||||
%118 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,82 @@
|
||||
type Arr = @stride(16) array<i32, 5>;
|
||||
|
||||
struct buf1 {
|
||||
x_GLF_uniform_int_values : Arr;
|
||||
};
|
||||
|
||||
type Arr_1 = @stride(16) array<f32, 2>;
|
||||
|
||||
struct buf0 {
|
||||
x_GLF_uniform_float_values : Arr_1;
|
||||
};
|
||||
|
||||
@group(0) @binding(1) var<uniform> x_6 : buf1;
|
||||
|
||||
@group(0) @binding(0) var<uniform> x_9 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var v : vec4<f32>;
|
||||
var i : i32;
|
||||
let x_40 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
let x_43 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_46 : i32 = x_6.x_GLF_uniform_int_values[3];
|
||||
let x_49 : i32 = x_6.x_GLF_uniform_int_values[0];
|
||||
v = vec4<f32>(f32(x_40), f32(x_43), f32(x_46), f32(x_49));
|
||||
let x_53 : i32 = x_6.x_GLF_uniform_int_values[4];
|
||||
i = x_53;
|
||||
loop {
|
||||
let x_58 : i32 = i;
|
||||
let x_60 : i32 = x_6.x_GLF_uniform_int_values[0];
|
||||
if ((x_58 < x_60)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_63 : vec4<f32> = v;
|
||||
let x_64 : vec4<f32> = v;
|
||||
let x_65 : vec4<f32> = v;
|
||||
let x_66 : vec4<f32> = v;
|
||||
let x_88 : i32 = i;
|
||||
let x_92 : f32 = x_9.x_GLF_uniform_float_values[0];
|
||||
if ((mat4x4<f32>(vec4<f32>(x_63.x, x_63.y, x_63.z, x_63.w), vec4<f32>(x_64.x, x_64.y, x_64.z, x_64.w), vec4<f32>(x_65.x, x_65.y, x_65.z, x_65.w), vec4<f32>(x_66.x, x_66.y, x_66.z, x_66.w))[0u][x_88] > x_92)) {
|
||||
let x_96 : i32 = i;
|
||||
let x_97 : vec4<f32> = v;
|
||||
let x_99 : f32 = x_9.x_GLF_uniform_float_values[1];
|
||||
let x_102 : f32 = x_9.x_GLF_uniform_float_values[0];
|
||||
let x_106 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
v[x_96] = clamp(x_97, vec4<f32>(x_99, x_99, x_99, x_99), vec4<f32>(x_102, x_102, x_102, x_102))[x_106];
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_109 : i32 = i;
|
||||
i = (x_109 + 1);
|
||||
}
|
||||
}
|
||||
let x_111 : vec4<f32> = v;
|
||||
let x_113 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
let x_114 : f32 = f32(x_113);
|
||||
if (all((x_111 == vec4<f32>(x_114, x_114, x_114, x_114)))) {
|
||||
let x_122 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
let x_125 : i32 = x_6.x_GLF_uniform_int_values[4];
|
||||
let x_128 : i32 = x_6.x_GLF_uniform_int_values[4];
|
||||
let x_131 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
x_GLF_color = vec4<f32>(f32(x_122), f32(x_125), f32(x_128), f32(x_131));
|
||||
} else {
|
||||
let x_135 : i32 = x_6.x_GLF_uniform_int_values[4];
|
||||
let x_136 : f32 = f32(x_135);
|
||||
x_GLF_color = vec4<f32>(x_136, x_136, x_136, x_136);
|
||||
}
|
||||
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