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
97
test/tint/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm
Normal file
97
test/tint/vk-gl-cts/graphicsfuzz/struct-array-index/0.spvasm
Normal file
@@ -0,0 +1,97 @@
|
||||
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 %struct_base "struct_base"
|
||||
OpMemberName %struct_base 0 "data"
|
||||
OpMemberName %struct_base 1 "leftIndex"
|
||||
OpMemberName %struct_base 2 "rightIndex"
|
||||
OpName %struct_array "struct_array"
|
||||
OpName %index "index"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "injectionSwitch"
|
||||
OpName %_ ""
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %buf0 Block
|
||||
OpDecorate %_ DescriptorSet 0
|
||||
OpDecorate %_ Binding 0
|
||||
OpDecorate %_GLF_color Location 0
|
||||
%void = OpTypeVoid
|
||||
%10 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%struct_base = OpTypeStruct %int %int %int
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%_arr_struct_base_uint_3 = OpTypeArray %struct_base %uint_3
|
||||
%_ptr_Private__arr_struct_base_uint_3 = OpTypePointer Private %_arr_struct_base_uint_3
|
||||
%struct_array = OpVariable %_ptr_Private__arr_struct_base_uint_3 Private
|
||||
%int_1 = OpConstant %int 1
|
||||
%17 = OpConstantComposite %struct_base %int_1 %int_1 %int_1
|
||||
%18 = OpConstantComposite %_arr_struct_base_uint_3 %17 %17 %17
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Private_int = OpTypePointer Private %int
|
||||
%bool = OpTypeBool
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%buf0 = OpTypeStruct %v2float
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_0 = OpConstant %float 0
|
||||
%34 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%35 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
||||
%main = OpFunction %void None %10
|
||||
%36 = OpLabel
|
||||
%index = OpVariable %_ptr_Function_int Function
|
||||
OpStore %struct_array %18
|
||||
OpStore %index %int_1
|
||||
%37 = OpAccessChain %_ptr_Private_int %struct_array %int_1 %int_2
|
||||
OpStore %37 %int_1
|
||||
%38 = OpAccessChain %_ptr_Private_int %struct_array %int_1 %int_1
|
||||
%39 = OpLoad %int %38
|
||||
%40 = OpIEqual %bool %39 %int_1
|
||||
OpSelectionMerge %41 None
|
||||
OpBranchConditional %40 %42 %43
|
||||
%42 = OpLabel
|
||||
%44 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_0
|
||||
%45 = OpLoad %float %44
|
||||
%46 = OpConvertFToS %int %45
|
||||
%47 = OpAccessChain %_ptr_Private_int %struct_array %46 %int_2
|
||||
%48 = OpLoad %int %47
|
||||
OpStore %index %48
|
||||
OpBranch %41
|
||||
%43 = OpLabel
|
||||
%49 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_1
|
||||
%50 = OpLoad %float %49
|
||||
%51 = OpConvertFToS %int %50
|
||||
%52 = OpAccessChain %_ptr_Private_int %struct_array %51 %int_1
|
||||
%53 = OpLoad %int %52
|
||||
OpStore %index %53
|
||||
OpBranch %41
|
||||
%41 = OpLabel
|
||||
%54 = OpAccessChain %_ptr_Private_int %struct_array %int_1 %int_1
|
||||
%55 = OpLoad %int %54
|
||||
%56 = OpIEqual %bool %55 %int_1
|
||||
OpSelectionMerge %57 None
|
||||
OpBranchConditional %56 %58 %59
|
||||
%58 = OpLabel
|
||||
OpStore %_GLF_color %34
|
||||
OpBranch %57
|
||||
%59 = OpLabel
|
||||
OpStore %_GLF_color %35
|
||||
OpBranch %57
|
||||
%57 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
50
test/tint/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl
Normal file
50
test/tint/vk-gl-cts/graphicsfuzz/struct-array-index/0.wgsl
Normal file
@@ -0,0 +1,50 @@
|
||||
struct struct_base {
|
||||
data : i32;
|
||||
leftIndex : i32;
|
||||
rightIndex : i32;
|
||||
};
|
||||
|
||||
struct buf0 {
|
||||
injectionSwitch : vec2<f32>;
|
||||
};
|
||||
|
||||
var<private> struct_array : array<struct_base, 3>;
|
||||
|
||||
@group(0) @binding(0) var<uniform> x_8 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var index : i32;
|
||||
struct_array = array<struct_base, 3>(struct_base(1, 1, 1), struct_base(1, 1, 1), struct_base(1, 1, 1));
|
||||
index = 1;
|
||||
struct_array[1].rightIndex = 1;
|
||||
let x_39 : i32 = struct_array[1].leftIndex;
|
||||
if ((x_39 == 1)) {
|
||||
let x_45 : f32 = x_8.injectionSwitch.x;
|
||||
let x_48 : i32 = struct_array[i32(x_45)].rightIndex;
|
||||
index = x_48;
|
||||
} else {
|
||||
let x_50 : f32 = x_8.injectionSwitch.y;
|
||||
let x_53 : i32 = struct_array[i32(x_50)].leftIndex;
|
||||
index = x_53;
|
||||
}
|
||||
let x_55 : i32 = struct_array[1].leftIndex;
|
||||
if ((x_55 == 1)) {
|
||||
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
||||
} else {
|
||||
x_GLF_color = vec4<f32>(1.0, 1.0, 1.0, 1.0);
|
||||
}
|
||||
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