test: Add case for tint:870
Also update SKIP reasons for DXC failures.
Bug: tint:870
Change-Id: I90b1af238249656fb02dfecbecf7f9258730e963
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54580
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
diff --git a/test/bug/tint/870.spvasm b/test/bug/tint/870.spvasm
new file mode 100644
index 0000000..eb09e39
--- /dev/null
+++ b/test/bug/tint/870.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 41
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main"
+ OpExecutionMode %main OriginUpperLeft
+ OpSource GLSL 460
+ OpSourceExtension "GL_ARB_enhanced_layouts"
+ OpSourceExtension "GL_ARB_gpu_shader_int64"
+ OpSourceExtension "GL_ARB_separate_shader_objects"
+ OpSourceExtension "GL_ARB_shader_clock"
+ OpSourceExtension "GL_ARB_shading_language_420pack"
+ OpSourceExtension "GL_EXT_scalar_block_layout"
+ OpSourceExtension "GL_EXT_shader_io_blocks"
+ OpSourceExtension "GL_EXT_shader_realtime_clock"
+ OpName %main "main"
+ OpName %orientation "orientation"
+ OpName %sspp962805860buildInformationS "sspp962805860buildInformationS"
+ OpMemberName %sspp962805860buildInformationS 0 "footprint"
+ OpMemberName %sspp962805860buildInformationS 1 "offset"
+ OpMemberName %sspp962805860buildInformationS 2 "essence"
+ OpMemberName %sspp962805860buildInformationS 3 "orientation"
+ OpName %_B4_BuildInformation "_B4_BuildInformation"
+ OpMemberName %_B4_BuildInformation 0 "passthru"
+ OpName %sspp962805860buildInformation "sspp962805860buildInformation"
+ OpDecorate %_arr_int_uint_6_0 ArrayStride 4
+ OpMemberDecorate %sspp962805860buildInformationS 0 Offset 0
+ OpMemberDecorate %sspp962805860buildInformationS 1 Offset 16
+ OpMemberDecorate %sspp962805860buildInformationS 2 Offset 32
+ OpMemberDecorate %sspp962805860buildInformationS 3 Offset 36
+ OpMemberDecorate %_B4_BuildInformation 0 NonWritable
+ OpMemberDecorate %_B4_BuildInformation 0 Offset 0
+ OpDecorate %_B4_BuildInformation BufferBlock
+ OpDecorate %sspp962805860buildInformation DescriptorSet 0
+ OpDecorate %sspp962805860buildInformation Binding 2
+ %void = OpTypeVoid
+ %3 = OpTypeFunction %void
+ %int = OpTypeInt 32 1
+ %uint = OpTypeInt 32 0
+ %uint_6 = OpConstant %uint 6
+ %_arr_int_uint_6 = OpTypeArray %int %uint_6
+ %_ptr_Function__arr_int_uint_6 = OpTypePointer Function %_arr_int_uint_6
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+ %_arr_int_uint_6_0 = OpTypeArray %int %uint_6
+ %sspp962805860buildInformationS = OpTypeStruct %v4float %v4float %int %_arr_int_uint_6_0
+ %_B4_BuildInformation = OpTypeStruct %sspp962805860buildInformationS
+%_ptr_Uniform__B4_BuildInformation = OpTypePointer Uniform %_B4_BuildInformation
+ %sspp962805860buildInformation = OpVariable %_ptr_Uniform__B4_BuildInformation Uniform
+ %int_0 = OpConstant %int 0
+ %int_3 = OpConstant %int 3
+ %_ptr_Uniform__arr_int_uint_6_0 = OpTypePointer Uniform %_arr_int_uint_6_0
+ %_ptr_Function_int = OpTypePointer Function %int
+ %int_1 = OpConstant %int 1
+ %int_2 = OpConstant %int 2
+ %int_4 = OpConstant %int 4
+ %int_5 = OpConstant %int 5
+ %main = OpFunction %void None %3
+ %5 = OpLabel
+ %orientation = OpVariable %_ptr_Function__arr_int_uint_6 Function
+ %22 = OpAccessChain %_ptr_Uniform__arr_int_uint_6_0 %sspp962805860buildInformation %int_0 %int_3
+ %23 = OpLoad %_arr_int_uint_6_0 %22
+ %24 = OpCompositeExtract %int %23 0
+ %26 = OpAccessChain %_ptr_Function_int %orientation %int_0
+ OpStore %26 %24
+ %27 = OpCompositeExtract %int %23 1
+ %29 = OpAccessChain %_ptr_Function_int %orientation %int_1
+ OpStore %29 %27
+ %30 = OpCompositeExtract %int %23 2
+ %32 = OpAccessChain %_ptr_Function_int %orientation %int_2
+ OpStore %32 %30
+ %33 = OpCompositeExtract %int %23 3
+ %34 = OpAccessChain %_ptr_Function_int %orientation %int_3
+ OpStore %34 %33
+ %35 = OpCompositeExtract %int %23 4
+ %37 = OpAccessChain %_ptr_Function_int %orientation %int_4
+ OpStore %37 %35
+ %38 = OpCompositeExtract %int %23 5
+ %40 = OpAccessChain %_ptr_Function_int %orientation %int_5
+ OpStore %40 %38
+ OpReturn
+ OpFunctionEnd
diff --git a/test/bug/tint/870.spvasm.expected.hlsl b/test/bug/tint/870.spvasm.expected.hlsl
new file mode 100644
index 0000000..e465840
--- /dev/null
+++ b/test/bug/tint/870.spvasm.expected.hlsl
@@ -0,0 +1,22 @@
+struct tint_array_wrapper {
+ int arr[6];
+};
+
+tint_array_wrapper tint_symbol_1(ByteAddressBuffer buffer, uint offset) {
+ const tint_array_wrapper tint_symbol_2 = {{asint(buffer.Load((offset + 0u))), asint(buffer.Load((offset + 4u))), asint(buffer.Load((offset + 8u))), asint(buffer.Load((offset + 12u))), asint(buffer.Load((offset + 16u))), asint(buffer.Load((offset + 20u)))}};
+ return tint_symbol_2;
+}
+
+ByteAddressBuffer sspp962805860buildInformation : register(t2, space0);
+
+void main() {
+ tint_array_wrapper orientation = {{0, 0, 0, 0, 0, 0}};
+ const tint_array_wrapper x_23 = tint_symbol_1(sspp962805860buildInformation, 36u);
+ orientation.arr[0] = x_23.arr[0u];
+ orientation.arr[1] = x_23.arr[1u];
+ orientation.arr[2] = x_23.arr[2u];
+ orientation.arr[3] = x_23.arr[3u];
+ orientation.arr[4] = x_23.arr[4u];
+ orientation.arr[5] = x_23.arr[5u];
+ return;
+}
diff --git a/test/bug/tint/870.spvasm.expected.msl b/test/bug/tint/870.spvasm.expected.msl
new file mode 100644
index 0000000..0ca37a8
--- /dev/null
+++ b/test/bug/tint/870.spvasm.expected.msl
@@ -0,0 +1,28 @@
+#include <metal_stdlib>
+
+using namespace metal;
+struct tint_array_wrapper {
+ /* 0x0000 */ int arr[6];
+};
+struct sspp962805860buildInformationS {
+ /* 0x0000 */ packed_float4 footprint;
+ /* 0x0010 */ packed_float4 offset;
+ /* 0x0020 */ int essence;
+ /* 0x0024 */ tint_array_wrapper orientation;
+};
+struct x_B4_BuildInformation {
+ /* 0x0000 */ sspp962805860buildInformationS passthru;
+};
+
+fragment void tint_symbol(const device x_B4_BuildInformation& sspp962805860buildInformation [[buffer(2)]]) {
+ tint_array_wrapper orientation = {};
+ tint_array_wrapper const x_23 = sspp962805860buildInformation.passthru.orientation;
+ orientation.arr[0] = x_23.arr[0u];
+ orientation.arr[1] = x_23.arr[1u];
+ orientation.arr[2] = x_23.arr[2u];
+ orientation.arr[3] = x_23.arr[3u];
+ orientation.arr[4] = x_23.arr[4u];
+ orientation.arr[5] = x_23.arr[5u];
+ return;
+}
+
diff --git a/test/bug/tint/870.spvasm.expected.spvasm b/test/bug/tint/870.spvasm.expected.spvasm
new file mode 100644
index 0000000..d40b60b
--- /dev/null
+++ b/test/bug/tint/870.spvasm.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+ OpCapability Shader
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %main "main"
+ OpExecutionMode %main OriginUpperLeft
+ OpName %x_B4_BuildInformation "x_B4_BuildInformation"
+ OpMemberName %x_B4_BuildInformation 0 "passthru"
+ OpName %sspp962805860buildInformationS "sspp962805860buildInformationS"
+ OpMemberName %sspp962805860buildInformationS 0 "footprint"
+ OpMemberName %sspp962805860buildInformationS 1 "offset"
+ OpMemberName %sspp962805860buildInformationS 2 "essence"
+ OpMemberName %sspp962805860buildInformationS 3 "orientation"
+ OpName %sspp962805860buildInformation "sspp962805860buildInformation"
+ OpName %main "main"
+ OpName %orientation "orientation"
+ OpDecorate %x_B4_BuildInformation Block
+ OpMemberDecorate %x_B4_BuildInformation 0 Offset 0
+ OpMemberDecorate %sspp962805860buildInformationS 0 Offset 0
+ OpMemberDecorate %sspp962805860buildInformationS 1 Offset 16
+ OpMemberDecorate %sspp962805860buildInformationS 2 Offset 32
+ OpMemberDecorate %sspp962805860buildInformationS 3 Offset 36
+ OpDecorate %_arr_int_uint_6 ArrayStride 4
+ OpDecorate %sspp962805860buildInformation NonWritable
+ OpDecorate %sspp962805860buildInformation DescriptorSet 0
+ OpDecorate %sspp962805860buildInformation Binding 2
+ %float = OpTypeFloat 32
+ %v4float = OpTypeVector %float 4
+ %int = OpTypeInt 32 1
+ %uint = OpTypeInt 32 0
+ %uint_6 = OpConstant %uint 6
+%_arr_int_uint_6 = OpTypeArray %int %uint_6
+%sspp962805860buildInformationS = OpTypeStruct %v4float %v4float %int %_arr_int_uint_6
+%x_B4_BuildInformation = OpTypeStruct %sspp962805860buildInformationS
+%_ptr_StorageBuffer_x_B4_BuildInformation = OpTypePointer StorageBuffer %x_B4_BuildInformation
+%sspp962805860buildInformation = OpVariable %_ptr_StorageBuffer_x_B4_BuildInformation StorageBuffer
+ %void = OpTypeVoid
+ %11 = OpTypeFunction %void
+%_ptr_Function__arr_int_uint_6 = OpTypePointer Function %_arr_int_uint_6
+ %17 = OpConstantNull %_arr_int_uint_6
+ %uint_0 = OpConstant %uint 0
+ %uint_3 = OpConstant %uint 3
+%_ptr_StorageBuffer__arr_int_uint_6 = OpTypePointer StorageBuffer %_arr_int_uint_6
+ %int_0 = OpConstant %int 0
+%_ptr_Function_int = OpTypePointer Function %int
+ %int_1 = OpConstant %int 1
+ %uint_1 = OpConstant %uint 1
+ %int_2 = OpConstant %int 2
+ %uint_2 = OpConstant %uint 2
+ %int_3 = OpConstant %int 3
+ %int_4 = OpConstant %int 4
+ %uint_4 = OpConstant %uint 4
+ %int_5 = OpConstant %int 5
+ %uint_5 = OpConstant %uint 5
+ %main = OpFunction %void None %11
+ %14 = OpLabel
+%orientation = OpVariable %_ptr_Function__arr_int_uint_6 Function %17
+ %21 = OpAccessChain %_ptr_StorageBuffer__arr_int_uint_6 %sspp962805860buildInformation %uint_0 %uint_3
+ %22 = OpLoad %_arr_int_uint_6 %21
+ %25 = OpAccessChain %_ptr_Function_int %orientation %int_0
+ %26 = OpCompositeExtract %int %22 0
+ OpStore %25 %26
+ %28 = OpAccessChain %_ptr_Function_int %orientation %int_1
+ %30 = OpCompositeExtract %int %22 1
+ OpStore %28 %30
+ %32 = OpAccessChain %_ptr_Function_int %orientation %int_2
+ %34 = OpCompositeExtract %int %22 2
+ OpStore %32 %34
+ %36 = OpAccessChain %_ptr_Function_int %orientation %int_3
+ %37 = OpCompositeExtract %int %22 3
+ OpStore %36 %37
+ %39 = OpAccessChain %_ptr_Function_int %orientation %int_4
+ %41 = OpCompositeExtract %int %22 4
+ OpStore %39 %41
+ %43 = OpAccessChain %_ptr_Function_int %orientation %int_5
+ %45 = OpCompositeExtract %int %22 5
+ OpStore %43 %45
+ OpReturn
+ OpFunctionEnd
diff --git a/test/bug/tint/870.spvasm.expected.wgsl b/test/bug/tint/870.spvasm.expected.wgsl
new file mode 100644
index 0000000..e6818c3
--- /dev/null
+++ b/test/bug/tint/870.spvasm.expected.wgsl
@@ -0,0 +1,28 @@
+type Arr = [[stride(4)]] array<i32, 6>;
+
+struct sspp962805860buildInformationS {
+ footprint : vec4<f32>;
+ offset : vec4<f32>;
+ essence : i32;
+ orientation : Arr;
+};
+
+[[block]]
+struct x_B4_BuildInformation {
+ passthru : sspp962805860buildInformationS;
+};
+
+[[group(0), binding(2)]] var<storage, read> sspp962805860buildInformation : x_B4_BuildInformation;
+
+[[stage(fragment)]]
+fn main() {
+ var orientation : array<i32, 6>;
+ let x_23 : Arr = sspp962805860buildInformation.passthru.orientation;
+ orientation[0] = x_23[0u];
+ orientation[1] = x_23[1u];
+ orientation[2] = x_23[2u];
+ orientation[3] = x_23[3u];
+ orientation[4] = x_23[4u];
+ orientation[5] = x_23[5u];
+ return;
+}
diff --git a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.hlsl b/test/intrinsics/gen/atan2/57fb13.wgsl.expected.hlsl
index ee9b2b0..bd13ca2 100644
--- a/test/intrinsics/gen/atan2/57fb13.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atan2/57fb13.wgsl.expected.hlsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: https://github.com/microsoft/DirectXShaderCompiler/issues/3824
diff --git a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.hlsl b/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.hlsl
index 1d5fca9..9626808 100644
--- a/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atan2/a70d0d.wgsl.expected.hlsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: https://github.com/microsoft/DirectXShaderCompiler/issues/3824
diff --git a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.hlsl b/test/intrinsics/gen/atan2/ae713e.wgsl.expected.hlsl
index f5ba1c2..84ab675 100644
--- a/test/intrinsics/gen/atan2/ae713e.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/atan2/ae713e.wgsl.expected.hlsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: https://github.com/microsoft/DirectXShaderCompiler/issues/3824
diff --git a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.hlsl b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.hlsl
index 1a970ef..a62ef30 100644
--- a/test/intrinsics/gen/isNan/1280ab.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isNan/1280ab.wgsl.expected.hlsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: https://github.com/microsoft/DirectXShaderCompiler/issues/3823
diff --git a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.hlsl b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.hlsl
index 3632a76..2a6bb01 100644
--- a/test/intrinsics/gen/isNan/4d280d.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isNan/4d280d.wgsl.expected.hlsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: https://github.com/microsoft/DirectXShaderCompiler/issues/3823
diff --git a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.hlsl b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.hlsl
index 8bba3d1..10e4268 100644
--- a/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.hlsl
+++ b/test/intrinsics/gen/isNan/67ecd3.wgsl.expected.hlsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: https://github.com/microsoft/DirectXShaderCompiler/issues/3823