mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +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,132 @@
|
||||
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 %arr "arr"
|
||||
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 %_GLF_color "_GLF_color"
|
||||
OpDecorate %_arr_float_uint_4 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
|
||||
%13 = 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_4 = OpConstant %uint 4
|
||||
%_arr_float_uint_4 = OpTypeArray %float %uint_4
|
||||
%buf0 = OpTypeStruct %_arr_float_uint_4
|
||||
%_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
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%_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_3 = OpConstant %int 3
|
||||
%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 %13
|
||||
%34 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_float_uint_3 Function
|
||||
%i = OpVariable %_ptr_Function_int Function
|
||||
%35 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
|
||||
%36 = OpLoad %float %35
|
||||
%37 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%38 = OpLoad %float %37
|
||||
%39 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_2
|
||||
%40 = OpLoad %float %39
|
||||
%41 = OpCompositeConstruct %_arr_float_uint_3 %36 %38 %40
|
||||
OpStore %arr %41
|
||||
OpStore %i %int_1
|
||||
OpBranch %42
|
||||
%42 = OpLabel
|
||||
OpLoopMerge %43 %44 None
|
||||
OpBranch %45
|
||||
%45 = OpLabel
|
||||
%46 = OpLoad %int %i
|
||||
%47 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2
|
||||
%48 = OpLoad %int %47
|
||||
%49 = OpExtInst %int %1 SMin %48 %int_3
|
||||
%50 = OpSLessThan %bool %46 %49
|
||||
OpBranchConditional %50 %51 %43
|
||||
%51 = OpLabel
|
||||
%52 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2
|
||||
%53 = OpLoad %int %52
|
||||
%54 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
|
||||
%55 = OpLoad %float %54
|
||||
%56 = OpAccessChain %_ptr_Function_float %arr %53
|
||||
%57 = OpLoad %float %56
|
||||
%58 = OpFAdd %float %57 %55
|
||||
%59 = OpAccessChain %_ptr_Function_float %arr %53
|
||||
OpStore %59 %58
|
||||
OpBranch %44
|
||||
%44 = OpLabel
|
||||
%60 = OpLoad %int %i
|
||||
%61 = OpIAdd %int %60 %int_1
|
||||
OpStore %i %61
|
||||
OpBranch %42
|
||||
%43 = OpLabel
|
||||
%62 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2
|
||||
%63 = OpLoad %int %62
|
||||
%64 = OpAccessChain %_ptr_Function_float %arr %63
|
||||
%65 = OpLoad %float %64
|
||||
%66 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_3
|
||||
%67 = OpLoad %float %66
|
||||
%68 = OpFOrdEqual %bool %65 %67
|
||||
OpSelectionMerge %69 None
|
||||
OpBranchConditional %68 %70 %71
|
||||
%70 = OpLabel
|
||||
%72 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%73 = OpLoad %int %72
|
||||
%74 = OpConvertSToF %float %73
|
||||
%75 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%76 = OpLoad %int %75
|
||||
%77 = OpConvertSToF %float %76
|
||||
%78 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%79 = OpLoad %int %78
|
||||
%80 = OpConvertSToF %float %79
|
||||
%81 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%82 = OpLoad %int %81
|
||||
%83 = OpConvertSToF %float %82
|
||||
%84 = OpCompositeConstruct %v4float %74 %77 %80 %83
|
||||
OpStore %_GLF_color %84
|
||||
OpBranch %69
|
||||
%71 = OpLabel
|
||||
%85 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%86 = OpLoad %int %85
|
||||
%87 = OpConvertSToF %float %86
|
||||
%88 = OpCompositeConstruct %v4float %87 %87 %87 %87
|
||||
OpStore %_GLF_color %88
|
||||
OpBranch %69
|
||||
%69 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,70 @@
|
||||
type Arr = @stride(16) array<f32, 4>;
|
||||
|
||||
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 arr : array<f32, 3>;
|
||||
var i : i32;
|
||||
let x_36 : f32 = x_6.x_GLF_uniform_float_values[0];
|
||||
let x_38 : f32 = x_6.x_GLF_uniform_float_values[1];
|
||||
let x_40 : f32 = x_6.x_GLF_uniform_float_values[2];
|
||||
arr = array<f32, 3>(x_36, x_38, x_40);
|
||||
i = 1;
|
||||
loop {
|
||||
let x_46 : i32 = i;
|
||||
let x_48 : i32 = x_9.x_GLF_uniform_int_values[2];
|
||||
if ((x_46 < min(x_48, 3))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_53 : i32 = x_9.x_GLF_uniform_int_values[2];
|
||||
let x_55 : f32 = x_6.x_GLF_uniform_float_values[0];
|
||||
let x_57 : f32 = arr[x_53];
|
||||
arr[x_53] = (x_57 + x_55);
|
||||
|
||||
continuing {
|
||||
let x_60 : i32 = i;
|
||||
i = (x_60 + 1);
|
||||
}
|
||||
}
|
||||
let x_63 : i32 = x_9.x_GLF_uniform_int_values[2];
|
||||
let x_65 : f32 = arr[x_63];
|
||||
let x_67 : f32 = x_6.x_GLF_uniform_float_values[3];
|
||||
if ((x_65 == x_67)) {
|
||||
let x_73 : i32 = x_9.x_GLF_uniform_int_values[1];
|
||||
let x_76 : i32 = x_9.x_GLF_uniform_int_values[0];
|
||||
let x_79 : i32 = x_9.x_GLF_uniform_int_values[0];
|
||||
let x_82 : i32 = x_9.x_GLF_uniform_int_values[1];
|
||||
x_GLF_color = vec4<f32>(f32(x_73), f32(x_76), f32(x_79), f32(x_82));
|
||||
} else {
|
||||
let x_86 : i32 = x_9.x_GLF_uniform_int_values[0];
|
||||
let x_87 : f32 = f32(x_86);
|
||||
x_GLF_color = vec4<f32>(x_87, x_87, x_87, x_87);
|
||||
}
|
||||
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