mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 22:56:09 +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,194 @@
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %gl_FragCoord %_GLF_color
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpSource ESSL 310
|
||||
OpName %main "main"
|
||||
OpName %func_i1_ "func(i1;"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
OpName %data "data"
|
||||
OpName %gl_FragCoord "gl_FragCoord"
|
||||
OpName %temp "temp"
|
||||
OpName %i "i"
|
||||
OpName %i_0 "i"
|
||||
OpName %param "param"
|
||||
OpName %param_0 "param"
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpDecorate %gl_FragCoord BuiltIn FragCoord
|
||||
OpDecorate %_GLF_color Location 0
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%float = OpTypeFloat 32
|
||||
%19 = OpTypeFunction %float %_ptr_Function_int
|
||||
%int_0 = OpConstant %int 0
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_9 = OpConstant %uint 9
|
||||
%_arr_int_uint_9 = OpTypeArray %int %uint_9
|
||||
%_ptr_Private__arr_int_uint_9 = OpTypePointer Private %_arr_int_uint_9
|
||||
%data = OpVariable %_ptr_Private__arr_int_uint_9 Private
|
||||
%int_5 = OpConstant %int 5
|
||||
%_ptr_Private_int = OpTypePointer Private %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_4 = OpConstant %int 4
|
||||
%int_6 = OpConstant %int 6
|
||||
%int_8 = OpConstant %int 8
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Input_v4float = OpTypePointer Input %v4float
|
||||
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Input_float = OpTypePointer Input %float
|
||||
%float_0 = OpConstant %float 0
|
||||
%bool = OpTypeBool
|
||||
%uint_7 = OpConstant %uint 7
|
||||
%_arr_int_uint_7 = OpTypeArray %int %uint_7
|
||||
%_ptr_Private__arr_int_uint_7 = OpTypePointer Private %_arr_int_uint_7
|
||||
%temp = OpVariable %_ptr_Private__arr_int_uint_7 Private
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_1 = OpConstant %int 1
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%44 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%45 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%main = OpFunction %void None %15
|
||||
%46 = OpLabel
|
||||
%i_0 = OpVariable %_ptr_Function_int Function
|
||||
%param = OpVariable %_ptr_Function_int Function
|
||||
%param_0 = OpVariable %_ptr_Function_int Function
|
||||
OpStore %i_0 %int_0
|
||||
OpBranch %47
|
||||
%47 = OpLabel
|
||||
OpLoopMerge %48 %49 None
|
||||
OpBranch %50
|
||||
%50 = OpLabel
|
||||
%51 = OpLoad %int %i_0
|
||||
%52 = OpSLessThan %bool %51 %int_6
|
||||
OpBranchConditional %52 %53 %48
|
||||
%53 = OpLabel
|
||||
%54 = OpLoad %int %i_0
|
||||
OpStore %param %54
|
||||
%55 = OpFunctionCall %float %func_i1_ %param
|
||||
%56 = OpLoad %int %i_0
|
||||
OpStore %param_0 %56
|
||||
%57 = OpFunctionCall %float %func_i1_ %param_0
|
||||
%58 = OpFOrdEqual %bool %57 %float_1
|
||||
OpSelectionMerge %59 None
|
||||
OpBranchConditional %58 %60 %61
|
||||
%60 = OpLabel
|
||||
OpStore %_GLF_color %44
|
||||
OpBranch %59
|
||||
%61 = OpLabel
|
||||
OpStore %_GLF_color %45
|
||||
OpBranch %59
|
||||
%59 = OpLabel
|
||||
OpBranch %49
|
||||
%49 = OpLabel
|
||||
%62 = OpLoad %int %i_0
|
||||
%63 = OpIAdd %int %62 %int_1
|
||||
OpStore %i_0 %63
|
||||
OpBranch %47
|
||||
%48 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%func_i1_ = OpFunction %float None %19
|
||||
%a = OpFunctionParameter %_ptr_Function_int
|
||||
%64 = OpLabel
|
||||
%b = OpVariable %_ptr_Function_int Function
|
||||
%i = OpVariable %_ptr_Function_int Function
|
||||
OpStore %b %int_0
|
||||
%65 = OpAccessChain %_ptr_Private_int %data %int_0
|
||||
OpStore %65 %int_5
|
||||
%66 = OpAccessChain %_ptr_Private_int %data %int_2
|
||||
OpStore %66 %int_0
|
||||
%67 = OpAccessChain %_ptr_Private_int %data %int_4
|
||||
OpStore %67 %int_0
|
||||
%68 = OpAccessChain %_ptr_Private_int %data %int_6
|
||||
OpStore %68 %int_0
|
||||
%69 = OpAccessChain %_ptr_Private_int %data %int_8
|
||||
OpStore %69 %int_0
|
||||
%70 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0
|
||||
%71 = OpLoad %float %70
|
||||
%72 = OpFOrdGreaterThanEqual %bool %71 %float_0
|
||||
OpSelectionMerge %73 None
|
||||
OpBranchConditional %72 %74 %73
|
||||
%74 = OpLabel
|
||||
OpBranch %75
|
||||
%75 = OpLabel
|
||||
OpLoopMerge %76 %77 None
|
||||
OpBranch %78
|
||||
%78 = OpLabel
|
||||
%79 = OpLoad %int %b
|
||||
%80 = OpLoad %int %a
|
||||
%81 = OpSLessThanEqual %bool %79 %80
|
||||
OpBranchConditional %81 %82 %76
|
||||
%82 = OpLabel
|
||||
%83 = OpLoad %int %b
|
||||
%84 = OpSLessThanEqual %bool %83 %int_5
|
||||
OpSelectionMerge %85 None
|
||||
OpBranchConditional %84 %86 %85
|
||||
%86 = OpLabel
|
||||
%87 = OpLoad %int %b
|
||||
%88 = OpLoad %int %b
|
||||
%89 = OpAccessChain %_ptr_Private_int %data %88
|
||||
%90 = OpLoad %int %89
|
||||
%91 = OpAccessChain %_ptr_Private_int %temp %87
|
||||
OpStore %91 %90
|
||||
%92 = OpLoad %int %b
|
||||
%93 = OpIAdd %int %92 %int_2
|
||||
OpStore %b %93
|
||||
OpBranch %85
|
||||
%85 = OpLabel
|
||||
OpBranch %77
|
||||
%77 = OpLabel
|
||||
OpBranch %75
|
||||
%76 = OpLabel
|
||||
OpBranch %73
|
||||
%73 = OpLabel
|
||||
OpStore %i %int_0
|
||||
OpBranch %94
|
||||
%94 = OpLabel
|
||||
OpLoopMerge %95 %96 None
|
||||
OpBranch %97
|
||||
%97 = OpLabel
|
||||
%98 = OpLoad %int %i
|
||||
%99 = OpSLessThan %bool %98 %int_3
|
||||
OpBranchConditional %99 %100 %95
|
||||
%100 = OpLabel
|
||||
%101 = OpLoad %int %i
|
||||
%102 = OpAccessChain %_ptr_Private_int %temp %int_0
|
||||
%103 = OpLoad %int %102
|
||||
%104 = OpIAdd %int %103 %int_1
|
||||
%105 = OpAccessChain %_ptr_Private_int %data %101
|
||||
OpStore %105 %104
|
||||
OpBranch %96
|
||||
%96 = OpLabel
|
||||
%106 = OpLoad %int %i
|
||||
%107 = OpIAdd %int %106 %int_1
|
||||
OpStore %i %107
|
||||
OpBranch %94
|
||||
%95 = OpLabel
|
||||
%108 = OpAccessChain %_ptr_Private_int %temp %int_0
|
||||
%109 = OpLoad %int %108
|
||||
%110 = OpIEqual %bool %109 %int_5
|
||||
OpSelectionMerge %111 None
|
||||
OpBranchConditional %110 %112 %111
|
||||
%112 = OpLabel
|
||||
%113 = OpAccessChain %_ptr_Private_int %data %int_0
|
||||
%114 = OpLoad %int %113
|
||||
%115 = OpIEqual %bool %114 %int_6
|
||||
OpBranch %111
|
||||
%111 = OpLabel
|
||||
%116 = OpPhi %bool %110 %95 %115 %112
|
||||
OpSelectionMerge %117 None
|
||||
OpBranchConditional %116 %118 %119
|
||||
%118 = OpLabel
|
||||
OpReturnValue %float_1
|
||||
%119 = OpLabel
|
||||
OpReturnValue %float_0
|
||||
%117 = OpLabel
|
||||
OpUnreachable
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,114 @@
|
||||
var<private> data : array<i32, 9>;
|
||||
|
||||
var<private> gl_FragCoord : vec4<f32>;
|
||||
|
||||
var<private> temp : array<i32, 7>;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn func_i1_(a : ptr<function, i32>) -> f32 {
|
||||
var b : i32;
|
||||
var i : i32;
|
||||
var x_115 : bool;
|
||||
var x_116_phi : bool;
|
||||
b = 0;
|
||||
data[0] = 5;
|
||||
data[2] = 0;
|
||||
data[4] = 0;
|
||||
data[6] = 0;
|
||||
data[8] = 0;
|
||||
let x_71 : f32 = gl_FragCoord.x;
|
||||
if ((x_71 >= 0.0)) {
|
||||
loop {
|
||||
let x_79 : i32 = b;
|
||||
let x_80 : i32 = *(a);
|
||||
if ((x_79 <= x_80)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_83 : i32 = b;
|
||||
if ((x_83 <= 5)) {
|
||||
let x_87 : i32 = b;
|
||||
let x_88 : i32 = b;
|
||||
let x_90 : i32 = data[x_88];
|
||||
temp[x_87] = x_90;
|
||||
let x_92 : i32 = b;
|
||||
b = (x_92 + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
loop {
|
||||
let x_98 : i32 = i;
|
||||
if ((x_98 < 3)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_101 : i32 = i;
|
||||
let x_103 : i32 = temp[0];
|
||||
data[x_101] = (x_103 + 1);
|
||||
|
||||
continuing {
|
||||
let x_106 : i32 = i;
|
||||
i = (x_106 + 1);
|
||||
}
|
||||
}
|
||||
let x_109 : i32 = temp[0];
|
||||
let x_110 : bool = (x_109 == 5);
|
||||
x_116_phi = x_110;
|
||||
if (x_110) {
|
||||
let x_114 : i32 = data[0];
|
||||
x_115 = (x_114 == 6);
|
||||
x_116_phi = x_115;
|
||||
}
|
||||
let x_116 : bool = x_116_phi;
|
||||
if (x_116) {
|
||||
return 1.0;
|
||||
} else {
|
||||
return 0.0;
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
fn main_1() {
|
||||
var i_1 : i32;
|
||||
var param : i32;
|
||||
var param_1 : i32;
|
||||
i_1 = 0;
|
||||
loop {
|
||||
let x_51 : i32 = i_1;
|
||||
if ((x_51 < 6)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
let x_54 : i32 = i_1;
|
||||
param = x_54;
|
||||
let x_55 : f32 = func_i1_(&(param));
|
||||
let x_56 : i32 = i_1;
|
||||
param_1 = x_56;
|
||||
let x_57 : f32 = func_i1_(&(param_1));
|
||||
if ((x_57 == 1.0)) {
|
||||
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
||||
} else {
|
||||
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_62 : i32 = i_1;
|
||||
i_1 = (x_62 + 1);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
@location(0)
|
||||
x_GLF_color_1 : vec4<f32>;
|
||||
};
|
||||
|
||||
@stage(fragment)
|
||||
fn main(@builtin(position) gl_FragCoord_param : vec4<f32>) -> main_out {
|
||||
gl_FragCoord = gl_FragCoord_param;
|
||||
main_1();
|
||||
return main_out(x_GLF_color);
|
||||
}
|
||||
Reference in New Issue
Block a user