mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 16:37:08 +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,133 @@
|
||||
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 %numbers "numbers"
|
||||
OpName %buf1 "buf1"
|
||||
OpMemberName %buf1 0 "_GLF_uniform_int_values"
|
||||
OpName %_ ""
|
||||
OpName %a "a"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "_GLF_uniform_float_values"
|
||||
OpName %__0 ""
|
||||
OpName %b "b"
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpDecorate %_arr_int_uint_3_0 ArrayStride 16
|
||||
OpMemberDecorate %buf1 0 Offset 0
|
||||
OpDecorate %buf1 Block
|
||||
OpDecorate %_ DescriptorSet 0
|
||||
OpDecorate %_ Binding 1
|
||||
OpDecorate %_arr_float_uint_3 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
|
||||
%14 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%_arr_int_uint_3 = OpTypeArray %int %uint_3
|
||||
%_ptr_Function__arr_int_uint_3 = OpTypePointer Function %_arr_int_uint_3
|
||||
%_arr_int_uint_3_0 = OpTypeArray %int %uint_3
|
||||
%buf1 = OpTypeStruct %_arr_int_uint_3_0
|
||||
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
|
||||
%_ = OpVariable %_ptr_Uniform_buf1 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%float_0 = OpConstant %float 0
|
||||
%_arr_float_uint_3 = OpTypeArray %float %uint_3
|
||||
%buf0 = OpTypeStruct %_arr_float_uint_3
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%__0 = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%main = OpFunction %void None %14
|
||||
%36 = OpLabel
|
||||
%numbers = OpVariable %_ptr_Function__arr_int_uint_3 Function
|
||||
%a = OpVariable %_ptr_Function_v2float Function
|
||||
%b = OpVariable %_ptr_Function_float Function
|
||||
%37 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
|
||||
%38 = OpLoad %int %37
|
||||
%39 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
|
||||
%40 = OpLoad %int %39
|
||||
%41 = OpAccessChain %_ptr_Function_int %numbers %38
|
||||
OpStore %41 %40
|
||||
%42 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%43 = OpLoad %int %42
|
||||
%44 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%45 = OpLoad %int %44
|
||||
%46 = OpAccessChain %_ptr_Function_int %numbers %43
|
||||
OpStore %46 %45
|
||||
%47 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%48 = OpLoad %int %47
|
||||
%49 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%50 = OpLoad %int %49
|
||||
%51 = OpAccessChain %_ptr_Function_int %numbers %48
|
||||
OpStore %51 %50
|
||||
%52 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
|
||||
%53 = OpLoad %int %52
|
||||
%54 = OpConvertSToF %float %53
|
||||
%55 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_2
|
||||
%56 = OpLoad %float %55
|
||||
%57 = OpFOrdLessThan %bool %float_0 %56
|
||||
%58 = OpSelect %int %57 %int_1 %int_2
|
||||
%59 = OpAccessChain %_ptr_Function_int %numbers %58
|
||||
%60 = OpLoad %int %59
|
||||
%61 = OpConvertSToF %float %60
|
||||
%62 = OpCompositeConstruct %v2float %54 %61
|
||||
OpStore %a %62
|
||||
%63 = OpLoad %v2float %a
|
||||
%64 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_1
|
||||
%65 = OpLoad %float %64
|
||||
%66 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_1
|
||||
%67 = OpLoad %float %66
|
||||
%68 = OpCompositeConstruct %v2float %65 %67
|
||||
%69 = OpDot %float %63 %68
|
||||
OpStore %b %69
|
||||
%70 = OpLoad %float %b
|
||||
%71 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0
|
||||
%72 = OpLoad %float %71
|
||||
%73 = OpFOrdEqual %bool %70 %72
|
||||
OpSelectionMerge %74 None
|
||||
OpBranchConditional %73 %75 %76
|
||||
%75 = OpLabel
|
||||
%77 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%78 = OpLoad %int %77
|
||||
%79 = OpConvertSToF %float %78
|
||||
%80 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
|
||||
%81 = OpLoad %int %80
|
||||
%82 = OpConvertSToF %float %81
|
||||
%83 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
|
||||
%84 = OpLoad %int %83
|
||||
%85 = OpConvertSToF %float %84
|
||||
%86 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%87 = OpLoad %int %86
|
||||
%88 = OpConvertSToF %float %87
|
||||
%89 = OpCompositeConstruct %v4float %79 %82 %85 %88
|
||||
OpStore %_GLF_color %89
|
||||
OpBranch %74
|
||||
%76 = OpLabel
|
||||
%90 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
|
||||
%91 = OpLoad %int %90
|
||||
%92 = OpConvertSToF %float %91
|
||||
%93 = OpCompositeConstruct %v4float %92 %92 %92 %92
|
||||
OpStore %_GLF_color %93
|
||||
OpBranch %74
|
||||
%74 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,65 @@
|
||||
type Arr = @stride(16) array<i32, 3>;
|
||||
|
||||
struct buf1 {
|
||||
x_GLF_uniform_int_values : Arr;
|
||||
};
|
||||
|
||||
type Arr_1 = @stride(16) array<f32, 3>;
|
||||
|
||||
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 numbers : array<i32, 3>;
|
||||
var a : vec2<f32>;
|
||||
var b : f32;
|
||||
let x_38 : i32 = x_6.x_GLF_uniform_int_values[0];
|
||||
let x_40 : i32 = x_6.x_GLF_uniform_int_values[0];
|
||||
numbers[x_38] = x_40;
|
||||
let x_43 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
let x_45 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
numbers[x_43] = x_45;
|
||||
let x_48 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
let x_50 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
numbers[x_48] = x_50;
|
||||
let x_53 : i32 = x_6.x_GLF_uniform_int_values[0];
|
||||
let x_56 : f32 = x_9.x_GLF_uniform_float_values[2];
|
||||
let x_60 : i32 = numbers[select(2, 1, (0.0 < x_56))];
|
||||
a = vec2<f32>(f32(x_53), f32(x_60));
|
||||
let x_63 : vec2<f32> = a;
|
||||
let x_65 : f32 = x_9.x_GLF_uniform_float_values[1];
|
||||
let x_67 : f32 = x_9.x_GLF_uniform_float_values[1];
|
||||
b = dot(x_63, vec2<f32>(x_65, x_67));
|
||||
let x_70 : f32 = b;
|
||||
let x_72 : f32 = x_9.x_GLF_uniform_float_values[0];
|
||||
if ((x_70 == x_72)) {
|
||||
let x_78 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
let x_81 : i32 = x_6.x_GLF_uniform_int_values[0];
|
||||
let x_84 : i32 = x_6.x_GLF_uniform_int_values[0];
|
||||
let x_87 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
x_GLF_color = vec4<f32>(f32(x_78), f32(x_81), f32(x_84), f32(x_87));
|
||||
} else {
|
||||
let x_91 : i32 = x_6.x_GLF_uniform_int_values[0];
|
||||
let x_92 : f32 = f32(x_91);
|
||||
x_GLF_color = vec4<f32>(x_92, x_92, x_92, x_92);
|
||||
}
|
||||
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