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,173 @@
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 %S "S"
OpMemberName %S 0 "numbers"
OpName %obj "obj"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "_GLF_uniform_float_values"
OpName %_ ""
OpName %buf2 "buf2"
OpMemberName %buf2 0 "zeroVec"
OpName %__0 ""
OpName %a "a"
OpName %buf3 "buf3"
OpMemberName %buf3 0 "oneVec"
OpName %__1 ""
OpName %b "b"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "_GLF_uniform_int_values"
OpName %__2 ""
OpName %_GLF_color "_GLF_color"
OpDecorate %_arr_float_uint_5 ArrayStride 16
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %buf1 Block
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 1
OpMemberDecorate %buf2 0 Offset 0
OpDecorate %buf2 Block
OpDecorate %__0 DescriptorSet 0
OpDecorate %__0 Binding 2
OpMemberDecorate %buf3 0 Offset 0
OpDecorate %buf3 Block
OpDecorate %__1 DescriptorSet 0
OpDecorate %__1 Binding 3
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %buf0 Block
OpDecorate %__2 DescriptorSet 0
OpDecorate %__2 Binding 0
OpDecorate %_GLF_color Location 0
%void = OpTypeVoid
%19 = OpTypeFunction %void
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_3 = OpConstant %uint 3
%_arr_float_uint_3 = OpTypeArray %float %uint_3
%S = OpTypeStruct %_arr_float_uint_3
%_ptr_Function_S = OpTypePointer Function %S
%uint_5 = OpConstant %uint 5
%_arr_float_uint_5 = OpTypeArray %float %uint_5
%buf1 = OpTypeStruct %_arr_float_uint_5
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%_ = OpVariable %_ptr_Uniform_buf1 Uniform
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%int_3 = OpConstant %int 3
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_2 = OpConstant %int 2
%int_4 = OpConstant %int 4
%v2float = OpTypeVector %float 2
%buf2 = OpTypeStruct %v2float
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
%__0 = OpVariable %_ptr_Uniform_buf2 Uniform
%uint_0 = OpConstant %uint 0
%_ptr_Function_float = OpTypePointer Function %float
%bool = OpTypeBool
%_ptr_Function_v2float = OpTypePointer Function %v2float
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%buf3 = OpTypeStruct %v2float
%_ptr_Uniform_buf3 = OpTypePointer Uniform %buf3
%__1 = OpVariable %_ptr_Uniform_buf3 Uniform
%uint_1 = OpConstant %uint 1
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%__2 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_GLF_color = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %19
%48 = OpLabel
%obj = OpVariable %_ptr_Function_S Function
%a = OpVariable %_ptr_Function_float Function
%49 = OpVariable %_ptr_Function_v2float Function
%b = OpVariable %_ptr_Function_float Function
%50 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_3
%51 = OpLoad %float %50
%52 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_2
%53 = OpLoad %float %52
%54 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_4
%55 = OpLoad %float %54
%56 = OpCompositeConstruct %_arr_float_uint_3 %51 %53 %55
%57 = OpCompositeConstruct %S %56
OpStore %obj %57
%58 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %uint_0
%59 = OpLoad %float %58
%60 = OpConvertFToS %int %59
%61 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
%62 = OpLoad %float %61
%63 = OpAccessChain %_ptr_Function_float %obj %int_0 %60
OpStore %63 %62
%64 = OpAccessChain %_ptr_Uniform_float %__0 %int_0 %uint_0
%65 = OpLoad %float %64
%66 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
%67 = OpLoad %float %66
%68 = OpFOrdGreaterThan %bool %65 %67
OpSelectionMerge %69 None
OpBranchConditional %68 %70 %71
%70 = OpLabel
%72 = OpAccessChain %_ptr_Uniform_v2float %__0 %int_0
%73 = OpLoad %v2float %72
OpStore %49 %73
OpBranch %69
%71 = OpLabel
%74 = OpAccessChain %_ptr_Uniform_v2float %__1 %int_0
%75 = OpLoad %v2float %74
OpStore %49 %75
OpBranch %69
%69 = OpLabel
%76 = OpAccessChain %_ptr_Function_float %49 %uint_1
%77 = OpLoad %float %76
OpStore %a %77
%78 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_0
%79 = OpLoad %float %78
%80 = OpLoad %float %a
%81 = OpAccessChain %_ptr_Uniform_int %__2 %int_0 %int_0
%82 = OpLoad %int %81
%83 = OpAccessChain %_ptr_Function_float %obj %int_0 %82
%84 = OpLoad %float %83
%85 = OpExtInst %float %1 FMix %79 %80 %84
OpStore %b %85
%86 = OpLoad %float %b
%87 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_2
%88 = OpLoad %float %87
%89 = OpExtInst %float %1 Distance %86 %88
%90 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %int_1
%91 = OpLoad %float %90
%92 = OpFOrdLessThan %bool %89 %91
OpSelectionMerge %93 None
OpBranchConditional %92 %94 %95
%94 = OpLabel
%96 = OpAccessChain %_ptr_Uniform_int %__2 %int_0 %int_0
%97 = OpLoad %int %96
%98 = OpConvertSToF %float %97
%99 = OpAccessChain %_ptr_Uniform_int %__2 %int_0 %int_1
%100 = OpLoad %int %99
%101 = OpConvertSToF %float %100
%102 = OpAccessChain %_ptr_Uniform_int %__2 %int_0 %int_1
%103 = OpLoad %int %102
%104 = OpConvertSToF %float %103
%105 = OpAccessChain %_ptr_Uniform_int %__2 %int_0 %int_0
%106 = OpLoad %int %105
%107 = OpConvertSToF %float %106
%108 = OpCompositeConstruct %v4float %98 %101 %104 %107
OpStore %_GLF_color %108
OpBranch %93
%95 = OpLabel
%109 = OpAccessChain %_ptr_Uniform_int %__2 %int_0 %int_1
%110 = OpLoad %int %109
%111 = OpConvertSToF %float %110
%112 = OpCompositeConstruct %v4float %111 %111 %111 %111
OpStore %_GLF_color %112
OpBranch %93
%93 = OpLabel
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,89 @@
struct S {
numbers : array<f32, 3>;
};
type Arr = @stride(16) array<f32, 5>;
struct buf1 {
x_GLF_uniform_float_values : Arr;
};
struct buf2 {
zeroVec : vec2<f32>;
};
struct buf3 {
oneVec : vec2<f32>;
};
type Arr_1 = @stride(16) array<i32, 2>;
struct buf0 {
x_GLF_uniform_int_values : Arr_1;
};
@group(0) @binding(1) var<uniform> x_7 : buf1;
@group(0) @binding(2) var<uniform> x_9 : buf2;
@group(0) @binding(3) var<uniform> x_12 : buf3;
@group(0) @binding(0) var<uniform> x_15 : buf0;
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var obj : S;
var a : f32;
var x_49 : vec2<f32>;
var b : f32;
let x_51 : f32 = x_7.x_GLF_uniform_float_values[3];
let x_53 : f32 = x_7.x_GLF_uniform_float_values[2];
let x_55 : f32 = x_7.x_GLF_uniform_float_values[4];
obj = S(array<f32, 3>(x_51, x_53, x_55));
let x_59 : f32 = x_9.zeroVec.x;
let x_62 : f32 = x_7.x_GLF_uniform_float_values[0];
obj.numbers[i32(x_59)] = x_62;
let x_65 : f32 = x_9.zeroVec.x;
let x_67 : f32 = x_7.x_GLF_uniform_float_values[0];
if ((x_65 > x_67)) {
let x_73 : vec2<f32> = x_9.zeroVec;
x_49 = x_73;
} else {
let x_75 : vec2<f32> = x_12.oneVec;
x_49 = x_75;
}
let x_77 : f32 = x_49.y;
a = x_77;
let x_79 : f32 = x_7.x_GLF_uniform_float_values[0];
let x_80 : f32 = a;
let x_82 : i32 = x_15.x_GLF_uniform_int_values[0];
let x_84 : f32 = obj.numbers[x_82];
b = mix(x_79, x_80, x_84);
let x_86 : f32 = b;
let x_88 : f32 = x_7.x_GLF_uniform_float_values[2];
let x_91 : f32 = x_7.x_GLF_uniform_float_values[1];
if ((distance(x_86, x_88) < x_91)) {
let x_97 : i32 = x_15.x_GLF_uniform_int_values[0];
let x_100 : i32 = x_15.x_GLF_uniform_int_values[1];
let x_103 : i32 = x_15.x_GLF_uniform_int_values[1];
let x_106 : i32 = x_15.x_GLF_uniform_int_values[0];
x_GLF_color = vec4<f32>(f32(x_97), f32(x_100), f32(x_103), f32(x_106));
} else {
let x_110 : i32 = x_15.x_GLF_uniform_int_values[1];
let x_111 : f32 = f32(x_110);
x_GLF_color = vec4<f32>(x_111, x_111, x_111, x_111);
}
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);
}