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,183 @@
|
||||
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 %v0 "v0"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "_GLF_uniform_float_values"
|
||||
OpName %_ ""
|
||||
OpName %v1 "v1"
|
||||
OpName %a "a"
|
||||
OpName %buf1 "buf1"
|
||||
OpMemberName %buf1 0 "_GLF_uniform_int_values"
|
||||
OpName %__0 ""
|
||||
OpName %c "c"
|
||||
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_4 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
|
||||
%15 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%uint = OpTypeInt 32 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
|
||||
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%_arr_int_uint_4 = OpTypeArray %int %uint_4
|
||||
%buf1 = OpTypeStruct %_arr_int_uint_4
|
||||
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
|
||||
%__0 = OpVariable %_ptr_Uniform_buf1 Uniform
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%bool = OpTypeBool
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_1 = OpConstant %float 1
|
||||
%36 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%main = OpFunction %void None %15
|
||||
%39 = OpLabel
|
||||
%v0 = OpVariable %_ptr_Function_v4float Function
|
||||
%v1 = OpVariable %_ptr_Function_v4float Function
|
||||
%a = OpVariable %_ptr_Function_int Function
|
||||
%c = OpVariable %_ptr_Function_int Function
|
||||
%40 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%41 = OpLoad %float %40
|
||||
%42 = OpCompositeConstruct %v4float %41 %41 %41 %41
|
||||
OpStore %v0 %42
|
||||
%43 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
|
||||
%44 = OpLoad %float %43
|
||||
%45 = OpCompositeConstruct %v4float %44 %44 %44 %44
|
||||
OpStore %v1 %45
|
||||
%46 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%47 = OpLoad %int %46
|
||||
OpStore %a %47
|
||||
OpBranch %48
|
||||
%48 = OpLabel
|
||||
OpLoopMerge %49 %50 None
|
||||
OpBranch %51
|
||||
%51 = OpLabel
|
||||
%52 = OpLoad %int %a
|
||||
%53 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_0
|
||||
%54 = OpLoad %int %53
|
||||
%55 = OpSLessThan %bool %52 %54
|
||||
OpBranchConditional %55 %56 %49
|
||||
%56 = OpLabel
|
||||
%57 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_3
|
||||
%58 = OpLoad %int %57
|
||||
OpStore %c %58
|
||||
OpBranch %59
|
||||
%59 = OpLabel
|
||||
OpLoopMerge %60 %61 None
|
||||
OpBranch %62
|
||||
%62 = OpLabel
|
||||
%63 = OpLoad %int %c
|
||||
%64 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_2
|
||||
%65 = OpLoad %int %64
|
||||
%66 = OpSLessThan %bool %63 %65
|
||||
OpBranchConditional %66 %67 %60
|
||||
%67 = OpLabel
|
||||
%68 = OpLoad %int %c
|
||||
%69 = OpExtInst %int %1 SClamp %68 %int_0 %int_3
|
||||
%70 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%71 = OpLoad %float %70
|
||||
%72 = OpAccessChain %_ptr_Function_float %v0 %69
|
||||
%73 = OpLoad %float %72
|
||||
%74 = OpFSub %float %73 %71
|
||||
%75 = OpAccessChain %_ptr_Function_float %v0 %69
|
||||
OpStore %75 %74
|
||||
%76 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%77 = OpLoad %int %76
|
||||
%78 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_3
|
||||
%79 = OpLoad %int %78
|
||||
%80 = OpIEqual %bool %77 %79
|
||||
OpSelectionMerge %81 None
|
||||
OpBranchConditional %80 %82 %81
|
||||
%82 = OpLabel
|
||||
%83 = OpLoad %int %a
|
||||
%84 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%85 = OpLoad %float %84
|
||||
%86 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%87 = OpLoad %float %86
|
||||
%88 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
|
||||
%89 = OpLoad %float %88
|
||||
%90 = OpCompositeConstruct %v4float %85 %87 %89 %float_3
|
||||
%91 = OpLoad %v4float %v0
|
||||
%92 = OpExtInst %v4float %1 SmoothStep %90 %36 %91
|
||||
%93 = OpLoad %int %a
|
||||
%94 = OpVectorExtractDynamic %float %92 %93
|
||||
%95 = OpAccessChain %_ptr_Function_float %v1 %83
|
||||
OpStore %95 %94
|
||||
OpBranch %81
|
||||
%81 = OpLabel
|
||||
OpBranch %61
|
||||
%61 = OpLabel
|
||||
%96 = OpLoad %int %c
|
||||
%97 = OpIAdd %int %96 %int_1
|
||||
OpStore %c %97
|
||||
OpBranch %59
|
||||
%60 = OpLabel
|
||||
OpBranch %50
|
||||
%50 = OpLabel
|
||||
%98 = OpLoad %int %a
|
||||
%99 = OpIAdd %int %98 %int_1
|
||||
OpStore %a %99
|
||||
OpBranch %48
|
||||
%49 = OpLabel
|
||||
%100 = OpAccessChain %_ptr_Function_float %v1 %uint_0
|
||||
%101 = OpLoad %float %100
|
||||
%102 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
|
||||
%103 = OpLoad %float %102
|
||||
%104 = OpFOrdEqual %bool %101 %103
|
||||
OpSelectionMerge %105 None
|
||||
OpBranchConditional %104 %106 %107
|
||||
%106 = OpLabel
|
||||
%108 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%109 = OpLoad %int %108
|
||||
%110 = OpConvertSToF %float %109
|
||||
%111 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_3
|
||||
%112 = OpLoad %int %111
|
||||
%113 = OpConvertSToF %float %112
|
||||
%114 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_3
|
||||
%115 = OpLoad %int %114
|
||||
%116 = OpConvertSToF %float %115
|
||||
%117 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_1
|
||||
%118 = OpLoad %int %117
|
||||
%119 = OpConvertSToF %float %118
|
||||
%120 = OpCompositeConstruct %v4float %110 %113 %116 %119
|
||||
OpStore %_GLF_color %120
|
||||
OpBranch %105
|
||||
%107 = OpLabel
|
||||
%121 = OpAccessChain %_ptr_Uniform_int %__0 %int_0 %int_3
|
||||
%122 = OpLoad %int %121
|
||||
%123 = OpConvertSToF %float %122
|
||||
%124 = OpCompositeConstruct %v4float %123 %123 %123 %123
|
||||
OpStore %_GLF_color %124
|
||||
OpBranch %105
|
||||
%105 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,99 @@
|
||||
type Arr = @stride(16) array<f32, 2>;
|
||||
|
||||
struct buf0 {
|
||||
x_GLF_uniform_float_values : Arr;
|
||||
};
|
||||
|
||||
type Arr_1 = @stride(16) array<i32, 4>;
|
||||
|
||||
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_10 : buf1;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var v0 : vec4<f32>;
|
||||
var v1 : vec4<f32>;
|
||||
var a : i32;
|
||||
var c : i32;
|
||||
let x_41 : f32 = x_6.x_GLF_uniform_float_values[1];
|
||||
v0 = vec4<f32>(x_41, x_41, x_41, x_41);
|
||||
let x_44 : f32 = x_6.x_GLF_uniform_float_values[0];
|
||||
v1 = vec4<f32>(x_44, x_44, x_44, x_44);
|
||||
let x_47 : i32 = x_10.x_GLF_uniform_int_values[1];
|
||||
a = x_47;
|
||||
loop {
|
||||
let x_52 : i32 = a;
|
||||
let x_54 : i32 = x_10.x_GLF_uniform_int_values[0];
|
||||
if ((x_52 < x_54)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_58 : i32 = x_10.x_GLF_uniform_int_values[3];
|
||||
c = x_58;
|
||||
loop {
|
||||
let x_63 : i32 = c;
|
||||
let x_65 : i32 = x_10.x_GLF_uniform_int_values[2];
|
||||
if ((x_63 < x_65)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_68 : i32 = c;
|
||||
let x_69 : i32 = clamp(x_68, 0, 3);
|
||||
let x_71 : f32 = x_6.x_GLF_uniform_float_values[1];
|
||||
let x_73 : f32 = v0[x_69];
|
||||
v0[x_69] = (x_73 - x_71);
|
||||
let x_77 : i32 = x_10.x_GLF_uniform_int_values[1];
|
||||
let x_79 : i32 = x_10.x_GLF_uniform_int_values[3];
|
||||
if ((x_77 == x_79)) {
|
||||
let x_83 : i32 = a;
|
||||
let x_85 : f32 = x_6.x_GLF_uniform_float_values[1];
|
||||
let x_87 : f32 = x_6.x_GLF_uniform_float_values[1];
|
||||
let x_89 : f32 = x_6.x_GLF_uniform_float_values[1];
|
||||
let x_91 : vec4<f32> = v0;
|
||||
let x_93 : i32 = a;
|
||||
v1[x_83] = smoothStep(vec4<f32>(x_85, x_87, x_89, 3.0), vec4<f32>(1.0, 1.0, 1.0, 1.0), x_91)[x_93];
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_96 : i32 = c;
|
||||
c = (x_96 + 1);
|
||||
}
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_98 : i32 = a;
|
||||
a = (x_98 + 1);
|
||||
}
|
||||
}
|
||||
let x_101 : f32 = v1.x;
|
||||
let x_103 : f32 = x_6.x_GLF_uniform_float_values[0];
|
||||
if ((x_101 == x_103)) {
|
||||
let x_109 : i32 = x_10.x_GLF_uniform_int_values[1];
|
||||
let x_112 : i32 = x_10.x_GLF_uniform_int_values[3];
|
||||
let x_115 : i32 = x_10.x_GLF_uniform_int_values[3];
|
||||
let x_118 : i32 = x_10.x_GLF_uniform_int_values[1];
|
||||
x_GLF_color = vec4<f32>(f32(x_109), f32(x_112), f32(x_115), f32(x_118));
|
||||
} else {
|
||||
let x_122 : i32 = x_10.x_GLF_uniform_int_values[3];
|
||||
let x_123 : f32 = f32(x_122);
|
||||
x_GLF_color = vec4<f32>(x_123, x_123, x_123, x_123);
|
||||
}
|
||||
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