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:
Ryan Harrison
2022-02-21 15:19:07 +00:00
committed by Tint LUCI CQ
parent 38f1e9c75c
commit dbc13af287
12231 changed files with 4897 additions and 4871 deletions

View File

@@ -0,0 +1,246 @@
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord %_GLF_color
OpExecutionMode %main OriginUpperLeft
OpSource ESSL 320
OpName %main "main"
OpName %func0_i1_ "func0(i1;"
OpName %x "x"
OpName %func1_ "func1("
OpName %m "m"
OpName %buf2 "buf2"
OpMemberName %buf2 0 "one"
OpName %_ ""
OpName %buf0 "buf0"
OpMemberName %buf0 0 "_GLF_uniform_float_values"
OpName %__0 ""
OpName %i "i"
OpName %gl_FragCoord "gl_FragCoord"
OpName %param "param"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "_GLF_uniform_int_values"
OpName %__1 ""
OpName %_GLF_color "_GLF_color"
OpMemberDecorate %buf2 0 Offset 0
OpDecorate %buf2 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 2
OpDecorate %_arr_float_uint_1 ArrayStride 16
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %__0 DescriptorSet 0
OpDecorate %__0 Binding 0
OpDecorate %gl_FragCoord BuiltIn FragCoord
OpDecorate %_arr_int_uint_4 ArrayStride 16
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %buf1 Block
OpDecorate %__1 DescriptorSet 0
OpDecorate %__1 Binding 1
OpDecorate %_GLF_color Location 0
%void = OpTypeVoid
%20 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%23 = OpTypeFunction %void %_ptr_Function_int
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%mat4v2float = OpTypeMatrix %v2float 4
%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float
%m = OpVariable %_ptr_Private_mat4v2float Private
%float_0 = OpConstant %float 0
%29 = OpConstantComposite %v2float %float_0 %float_0
%30 = OpConstantComposite %mat4v2float %29 %29 %29 %29
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%buf2 = OpTypeStruct %float
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
%_ = OpVariable %_ptr_Uniform_buf2 Uniform
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf0 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%__0 = OpVariable %_ptr_Uniform_buf0 Uniform
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%_ptr_Private_float = OpTypePointer Private %float
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input
%_ptr_Input_float = OpTypePointer Input %float
%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
%__1 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Uniform_int = OpTypePointer Uniform %int
%float_1 = OpConstant %float 1
%v2bool = OpTypeVector %bool 2
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %20
%51 = OpLabel
OpStore %m %30
%52 = OpFunctionCall %void %func1_
%53 = OpFunctionCall %void %func1_
%54 = OpLoad %mat4v2float %m
%55 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_0
%56 = OpLoad %int %55
%57 = OpConvertSToF %float %56
%58 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_0
%59 = OpLoad %int %58
%60 = OpConvertSToF %float %59
%61 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_1
%62 = OpLoad %int %61
%63 = OpConvertSToF %float %62
%64 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_1
%65 = OpLoad %int %64
%66 = OpConvertSToF %float %65
%67 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_0
%68 = OpLoad %int %67
%69 = OpConvertSToF %float %68
%70 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_0
%71 = OpLoad %int %70
%72 = OpConvertSToF %float %71
%73 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_0
%74 = OpLoad %int %73
%75 = OpConvertSToF %float %74
%76 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_0
%77 = OpLoad %int %76
%78 = OpConvertSToF %float %77
%79 = OpCompositeConstruct %v2float %57 %60
%80 = OpCompositeConstruct %v2float %63 %66
%81 = OpCompositeConstruct %v2float %69 %72
%82 = OpCompositeConstruct %v2float %75 %78
%83 = OpCompositeConstruct %mat4v2float %79 %80 %81 %82
%84 = OpCompositeExtract %v2float %54 0
%85 = OpCompositeExtract %v2float %83 0
%86 = OpFOrdEqual %v2bool %84 %85
%87 = OpAll %bool %86
%88 = OpCompositeExtract %v2float %54 1
%89 = OpCompositeExtract %v2float %83 1
%90 = OpFOrdEqual %v2bool %88 %89
%91 = OpAll %bool %90
%92 = OpLogicalAnd %bool %87 %91
%93 = OpCompositeExtract %v2float %54 2
%94 = OpCompositeExtract %v2float %83 2
%95 = OpFOrdEqual %v2bool %93 %94
%96 = OpAll %bool %95
%97 = OpLogicalAnd %bool %92 %96
%98 = OpCompositeExtract %v2float %54 3
%99 = OpCompositeExtract %v2float %83 3
%100 = OpFOrdEqual %v2bool %98 %99
%101 = OpAll %bool %100
%102 = OpLogicalAnd %bool %97 %101
OpSelectionMerge %103 None
OpBranchConditional %102 %104 %105
%104 = OpLabel
%106 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_3
%107 = OpLoad %int %106
%108 = OpConvertSToF %float %107
%109 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_0
%110 = OpLoad %int %109
%111 = OpConvertSToF %float %110
%112 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_0
%113 = OpLoad %int %112
%114 = OpConvertSToF %float %113
%115 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_3
%116 = OpLoad %int %115
%117 = OpConvertSToF %float %116
%118 = OpCompositeConstruct %v4float %108 %111 %114 %117
OpStore %_GLF_color %118
OpBranch %103
%105 = OpLabel
%119 = OpAccessChain %_ptr_Uniform_int %__1 %int_0 %int_0
%120 = OpLoad %int %119
%121 = OpConvertSToF %float %120
%122 = OpCompositeConstruct %v4float %121 %121 %121 %121
OpStore %_GLF_color %122
OpBranch %103
%103 = OpLabel
OpReturn
OpFunctionEnd
%func0_i1_ = OpFunction %void None %23
%x = OpFunctionParameter %_ptr_Function_int
%123 = OpLabel
%i = OpVariable %_ptr_Function_int Function
%124 = OpLoad %int %x
%125 = OpSLessThan %bool %124 %int_1
%126 = OpLogicalNot %bool %125
OpSelectionMerge %127 None
OpBranchConditional %126 %128 %127
%128 = OpLabel
%129 = OpLoad %int %x
%130 = OpSGreaterThan %bool %129 %int_1
OpSelectionMerge %131 None
OpBranchConditional %130 %132 %131
%132 = OpLabel
%133 = OpAccessChain %_ptr_Uniform_float %_ %int_0
%134 = OpLoad %float %133
%135 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0
%136 = OpLoad %float %135
%137 = OpFOrdGreaterThan %bool %134 %136
OpBranch %131
%131 = OpLabel
%138 = OpPhi %bool %130 %128 %137 %132
OpBranch %127
%127 = OpLabel
%139 = OpPhi %bool %125 %123 %138 %131
OpSelectionMerge %140 None
OpBranchConditional %139 %141 %140
%141 = OpLabel
OpReturn
%140 = OpLabel
%142 = OpAccessChain %_ptr_Uniform_float %_ %int_0
%143 = OpLoad %float %142
%144 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0
%145 = OpLoad %float %144
%146 = OpFOrdEqual %bool %143 %145
OpSelectionMerge %147 None
OpBranchConditional %146 %148 %147
%148 = OpLabel
OpStore %i %int_0
OpBranch %149
%149 = OpLabel
%150 = OpLoad %int %i
%151 = OpSLessThan %bool %150 %int_2
OpLoopMerge %152 %153 None
OpBranchConditional %151 %153 %152
%153 = OpLabel
%154 = OpLoad %int %x
%155 = OpExtInst %int %1 SClamp %154 %int_0 %int_3
%156 = OpLoad %int %i
%157 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %int_0
%158 = OpLoad %float %157
%159 = OpAccessChain %_ptr_Private_float %m %155 %156
%160 = OpLoad %float %159
%161 = OpFAdd %float %160 %158
%162 = OpAccessChain %_ptr_Private_float %m %155 %156
OpStore %162 %161
%163 = OpLoad %int %i
%164 = OpIAdd %int %163 %int_1
OpStore %i %164
OpBranch %149
%152 = OpLabel
OpBranch %147
%147 = OpLabel
OpReturn
OpFunctionEnd
%func1_ = OpFunction %void None %20
%165 = OpLabel
%param = OpVariable %_ptr_Function_int Function
%166 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1
%167 = OpLoad %float %166
%168 = OpFOrdLessThan %bool %167 %float_0
OpSelectionMerge %169 None
OpBranchConditional %168 %170 %169
%170 = OpLabel
OpReturn
%169 = OpLabel
OpStore %param %int_1
%171 = OpFunctionCall %void %func0_i1_ %param
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,130 @@
struct buf2 {
one : f32;
};
type Arr = @stride(16) array<f32, 1>;
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;
};
var<private> m : mat4x2<f32>;
@group(0) @binding(2) var<uniform> x_10 : buf2;
@group(0) @binding(0) var<uniform> x_12 : buf0;
var<private> gl_FragCoord : vec4<f32>;
@group(0) @binding(1) var<uniform> x_16 : buf1;
var<private> x_GLF_color : vec4<f32>;
fn func0_i1_(x : ptr<function, i32>) {
var i : i32;
var x_137 : bool;
var x_138 : bool;
var x_138_phi : bool;
var x_139_phi : bool;
let x_124 : i32 = *(x);
let x_125 : bool = (x_124 < 1);
x_139_phi = x_125;
if (!(x_125)) {
let x_129 : i32 = *(x);
let x_130 : bool = (x_129 > 1);
x_138_phi = x_130;
if (x_130) {
let x_134 : f32 = x_10.one;
let x_136 : f32 = x_12.x_GLF_uniform_float_values[0];
x_137 = (x_134 > x_136);
x_138_phi = x_137;
}
x_138 = x_138_phi;
x_139_phi = x_138;
}
let x_139 : bool = x_139_phi;
if (x_139) {
return;
}
let x_143 : f32 = x_10.one;
let x_145 : f32 = x_12.x_GLF_uniform_float_values[0];
if ((x_143 == x_145)) {
i = 0;
loop {
let x_150 : i32 = i;
if ((x_150 < 2)) {
} else {
break;
}
continuing {
let x_154 : i32 = *(x);
let x_155 : i32 = clamp(x_154, 0, 3);
let x_156 : i32 = i;
let x_158 : f32 = x_12.x_GLF_uniform_float_values[0];
let x_160 : f32 = m[x_155][x_156];
m[x_155][x_156] = (x_160 + x_158);
let x_163 : i32 = i;
i = (x_163 + 1);
}
}
}
return;
}
fn func1_() {
var param : i32;
let x_167 : f32 = gl_FragCoord.y;
if ((x_167 < 0.0)) {
return;
}
param = 1;
func0_i1_(&(param));
return;
}
fn main_1() {
m = mat4x2<f32>(vec2<f32>(0.0, 0.0), vec2<f32>(0.0, 0.0), vec2<f32>(0.0, 0.0), vec2<f32>(0.0, 0.0));
func1_();
func1_();
let x_54 : mat4x2<f32> = m;
let x_56 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_59 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_62 : i32 = x_16.x_GLF_uniform_int_values[1];
let x_65 : i32 = x_16.x_GLF_uniform_int_values[1];
let x_68 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_71 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_74 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_77 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_83 : mat4x2<f32> = mat4x2<f32>(vec2<f32>(f32(x_56), f32(x_59)), vec2<f32>(f32(x_62), f32(x_65)), vec2<f32>(f32(x_68), f32(x_71)), vec2<f32>(f32(x_74), f32(x_77)));
if ((((all((x_54[0u] == x_83[0u])) && all((x_54[1u] == x_83[1u]))) && all((x_54[2u] == x_83[2u]))) && all((x_54[3u] == x_83[3u])))) {
let x_107 : i32 = x_16.x_GLF_uniform_int_values[3];
let x_110 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_113 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_116 : i32 = x_16.x_GLF_uniform_int_values[3];
x_GLF_color = vec4<f32>(f32(x_107), f32(x_110), f32(x_113), f32(x_116));
} else {
let x_120 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_121 : f32 = f32(x_120);
x_GLF_color = vec4<f32>(x_121, x_121, x_121, x_121);
}
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);
}