From 32f3eff010524189f8639c27f2c7abdbf4ebbe17 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 3 Sep 2024 21:41:54 +0000 Subject: [PATCH] [glsl][ir] Add vector accessors. This Cl adds `LoadVectorElement`, `StoreVectorElement` and `Swizzle` support to the GLSL IR backend. Bug: 42251044 Change-Id: I0aac2b2f30f67621ab9407f50a9306cc950f233e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/204854 Commit-Queue: dan sinclair Reviewed-by: James Price --- src/tint/lang/glsl/writer/access_test.cc | 452 ++++++++++++++---- src/tint/lang/glsl/writer/printer/printer.cc | 83 +++- .../access/var/matrix.spvasm.expected.ir.glsl | 19 +- .../access/var/vector.spvasm.expected.ir.glsl | 21 +- .../mat2x2_f32/to_fn.wgsl.expected.ir.glsl | 32 +- .../to_private.wgsl.expected.ir.glsl | 22 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../mat2x3_f16/to_fn.wgsl.expected.ir.glsl | 33 +- .../to_private.wgsl.expected.ir.glsl | 23 +- .../to_storage.wgsl.expected.ir.glsl | 42 +- .../mat2x3_f32/to_fn.wgsl.expected.ir.glsl | 32 +- .../to_private.wgsl.expected.ir.glsl | 22 +- .../to_storage.wgsl.expected.ir.glsl | 41 +- .../mat2x4_f16/to_fn.wgsl.expected.ir.glsl | 33 +- .../to_private.wgsl.expected.ir.glsl | 23 +- .../to_storage.wgsl.expected.ir.glsl | 21 +- .../mat2x4_f32/to_fn.wgsl.expected.ir.glsl | 32 +- .../to_private.wgsl.expected.ir.glsl | 22 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../mat3x3_f32/to_fn.wgsl.expected.ir.glsl | 32 +- .../to_private.wgsl.expected.ir.glsl | 22 +- .../to_storage.wgsl.expected.ir.glsl | 42 +- .../mat3x4_f32/to_fn.wgsl.expected.ir.glsl | 32 +- .../to_private.wgsl.expected.ir.glsl | 22 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../mat4x2_f16/to_fn.wgsl.expected.ir.glsl | 33 +- .../to_private.wgsl.expected.ir.glsl | 23 +- .../to_storage.wgsl.expected.ir.glsl | 21 +- .../mat4x2_f32/to_fn.wgsl.expected.ir.glsl | 32 +- .../to_private.wgsl.expected.ir.glsl | 22 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../mat4x3_f16/to_fn.wgsl.expected.ir.glsl | 33 +- .../to_private.wgsl.expected.ir.glsl | 23 +- .../to_storage.wgsl.expected.ir.glsl | 44 +- .../mat4x3_f32/to_fn.wgsl.expected.ir.glsl | 32 +- .../to_private.wgsl.expected.ir.glsl | 22 +- .../to_storage.wgsl.expected.ir.glsl | 43 +- .../mat4x4_f16/to_fn.wgsl.expected.ir.glsl | 33 +- .../to_private.wgsl.expected.ir.glsl | 23 +- .../to_storage.wgsl.expected.ir.glsl | 21 +- .../mat4x4_f32/to_fn.wgsl.expected.ir.glsl | 32 +- .../to_private.wgsl.expected.ir.glsl | 22 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../to_builtin.wgsl.expected.ir.glsl | 23 +- .../mat2x2_f16/to_fn.wgsl.expected.ir.glsl | 35 +- .../to_private.wgsl.expected.ir.glsl | 25 +- .../to_storage.wgsl.expected.ir.glsl | 47 +- .../to_builtin.wgsl.expected.ir.glsl | 22 +- .../mat2x2_f32/to_fn.wgsl.expected.ir.glsl | 34 +- .../to_private.wgsl.expected.ir.glsl | 24 +- .../to_storage.wgsl.expected.ir.glsl | 46 +- .../to_builtin.wgsl.expected.ir.glsl | 23 +- .../mat2x3_f16/to_fn.wgsl.expected.ir.glsl | 35 +- .../to_private.wgsl.expected.ir.glsl | 25 +- .../to_storage.wgsl.expected.ir.glsl | 51 +- .../to_builtin.wgsl.expected.ir.glsl | 22 +- .../mat2x3_f32/to_fn.wgsl.expected.ir.glsl | 34 +- .../to_private.wgsl.expected.ir.glsl | 24 +- .../to_storage.wgsl.expected.ir.glsl | 50 +- .../to_builtin.wgsl.expected.ir.glsl | 23 +- .../mat2x4_f16/to_fn.wgsl.expected.ir.glsl | 35 +- .../to_private.wgsl.expected.ir.glsl | 25 +- .../to_storage.wgsl.expected.ir.glsl | 47 +- .../to_builtin.wgsl.expected.ir.glsl | 22 +- .../mat2x4_f32/to_fn.wgsl.expected.ir.glsl | 34 +- .../to_private.wgsl.expected.ir.glsl | 24 +- .../to_storage.wgsl.expected.ir.glsl | 46 +- .../to_builtin.wgsl.expected.ir.glsl | 23 +- .../mat3x2_f16/to_fn.wgsl.expected.ir.glsl | 35 +- .../to_private.wgsl.expected.ir.glsl | 25 +- .../to_storage.wgsl.expected.ir.glsl | 47 +- .../to_builtin.wgsl.expected.ir.glsl | 22 +- .../mat3x2_f32/to_fn.wgsl.expected.ir.glsl | 34 +- .../to_private.wgsl.expected.ir.glsl | 24 +- .../to_storage.wgsl.expected.ir.glsl | 46 +- .../to_builtin.wgsl.expected.ir.glsl | 23 +- .../mat3x3_f16/to_fn.wgsl.expected.ir.glsl | 35 +- .../to_private.wgsl.expected.ir.glsl | 25 +- .../to_storage.wgsl.expected.ir.glsl | 52 +- .../to_builtin.wgsl.expected.ir.glsl | 22 +- .../mat3x3_f32/to_fn.wgsl.expected.ir.glsl | 34 +- .../to_private.wgsl.expected.ir.glsl | 24 +- .../to_storage.wgsl.expected.ir.glsl | 51 +- .../to_builtin.wgsl.expected.ir.glsl | 23 +- .../mat3x4_f16/to_fn.wgsl.expected.ir.glsl | 35 +- .../to_private.wgsl.expected.ir.glsl | 25 +- .../to_storage.wgsl.expected.ir.glsl | 47 +- .../to_builtin.wgsl.expected.ir.glsl | 22 +- .../mat3x4_f32/to_fn.wgsl.expected.ir.glsl | 34 +- .../to_private.wgsl.expected.ir.glsl | 24 +- .../to_storage.wgsl.expected.ir.glsl | 46 +- .../to_builtin.wgsl.expected.ir.glsl | 23 +- .../mat4x2_f16/to_fn.wgsl.expected.ir.glsl | 35 +- .../to_private.wgsl.expected.ir.glsl | 25 +- .../to_storage.wgsl.expected.ir.glsl | 47 +- .../to_builtin.wgsl.expected.ir.glsl | 22 +- .../mat4x2_f32/to_fn.wgsl.expected.ir.glsl | 34 +- .../to_private.wgsl.expected.ir.glsl | 24 +- .../to_storage.wgsl.expected.ir.glsl | 46 +- .../to_builtin.wgsl.expected.ir.glsl | 23 +- .../mat4x3_f16/to_fn.wgsl.expected.ir.glsl | 35 +- .../to_private.wgsl.expected.ir.glsl | 25 +- .../to_storage.wgsl.expected.ir.glsl | 53 +- .../to_builtin.wgsl.expected.ir.glsl | 22 +- .../mat4x3_f32/to_fn.wgsl.expected.ir.glsl | 34 +- .../to_private.wgsl.expected.ir.glsl | 24 +- .../to_storage.wgsl.expected.ir.glsl | 52 +- .../to_builtin.wgsl.expected.ir.glsl | 23 +- .../mat4x4_f16/to_fn.wgsl.expected.ir.glsl | 35 +- .../to_private.wgsl.expected.ir.glsl | 25 +- .../to_storage.wgsl.expected.ir.glsl | 47 +- .../to_builtin.wgsl.expected.ir.glsl | 22 +- .../mat4x4_f32/to_fn.wgsl.expected.ir.glsl | 34 +- .../to_private.wgsl.expected.ir.glsl | 24 +- .../to_storage.wgsl.expected.ir.glsl | 46 +- .../to_builtin.wgsl.expected.ir.glsl | 19 +- .../mat2x2_f16/to_fn.wgsl.expected.ir.glsl | 27 +- .../to_private.wgsl.expected.ir.glsl | 21 +- .../to_storage.wgsl.expected.ir.glsl | 21 +- .../to_builtin.wgsl.expected.ir.glsl | 18 +- .../mat2x2_f32/to_fn.wgsl.expected.ir.glsl | 26 +- .../to_private.wgsl.expected.ir.glsl | 20 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../to_builtin.wgsl.expected.ir.glsl | 19 +- .../mat2x3_f16/to_fn.wgsl.expected.ir.glsl | 27 +- .../to_private.wgsl.expected.ir.glsl | 21 +- .../to_storage.wgsl.expected.ir.glsl | 25 +- .../to_builtin.wgsl.expected.ir.glsl | 18 +- .../mat2x3_f32/to_fn.wgsl.expected.ir.glsl | 26 +- .../to_private.wgsl.expected.ir.glsl | 20 +- .../to_storage.wgsl.expected.ir.glsl | 24 +- .../to_builtin.wgsl.expected.ir.glsl | 19 +- .../mat2x4_f16/to_fn.wgsl.expected.ir.glsl | 27 +- .../to_private.wgsl.expected.ir.glsl | 21 +- .../to_storage.wgsl.expected.ir.glsl | 21 +- .../to_builtin.wgsl.expected.ir.glsl | 18 +- .../mat2x4_f32/to_fn.wgsl.expected.ir.glsl | 26 +- .../to_private.wgsl.expected.ir.glsl | 20 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../to_builtin.wgsl.expected.ir.glsl | 19 +- .../mat3x2_f16/to_fn.wgsl.expected.ir.glsl | 27 +- .../to_private.wgsl.expected.ir.glsl | 21 +- .../to_storage.wgsl.expected.ir.glsl | 21 +- .../to_builtin.wgsl.expected.ir.glsl | 18 +- .../mat3x2_f32/to_fn.wgsl.expected.ir.glsl | 26 +- .../to_private.wgsl.expected.ir.glsl | 20 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../to_builtin.wgsl.expected.ir.glsl | 19 +- .../mat3x3_f16/to_fn.wgsl.expected.ir.glsl | 27 +- .../to_private.wgsl.expected.ir.glsl | 21 +- .../to_storage.wgsl.expected.ir.glsl | 26 +- .../to_builtin.wgsl.expected.ir.glsl | 18 +- .../mat3x3_f32/to_fn.wgsl.expected.ir.glsl | 26 +- .../to_private.wgsl.expected.ir.glsl | 20 +- .../to_storage.wgsl.expected.ir.glsl | 25 +- .../to_builtin.wgsl.expected.ir.glsl | 19 +- .../mat3x4_f16/to_fn.wgsl.expected.ir.glsl | 27 +- .../to_private.wgsl.expected.ir.glsl | 21 +- .../to_storage.wgsl.expected.ir.glsl | 21 +- .../to_builtin.wgsl.expected.ir.glsl | 18 +- .../mat3x4_f32/to_fn.wgsl.expected.ir.glsl | 26 +- .../to_private.wgsl.expected.ir.glsl | 20 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../to_builtin.wgsl.expected.ir.glsl | 19 +- .../mat4x2_f16/to_fn.wgsl.expected.ir.glsl | 27 +- .../to_private.wgsl.expected.ir.glsl | 21 +- .../to_storage.wgsl.expected.ir.glsl | 21 +- .../to_builtin.wgsl.expected.ir.glsl | 18 +- .../mat4x2_f32/to_fn.wgsl.expected.ir.glsl | 26 +- .../to_private.wgsl.expected.ir.glsl | 20 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../to_builtin.wgsl.expected.ir.glsl | 19 +- .../mat4x3_f16/to_fn.wgsl.expected.ir.glsl | 27 +- .../to_private.wgsl.expected.ir.glsl | 21 +- .../to_storage.wgsl.expected.ir.glsl | 27 +- .../to_builtin.wgsl.expected.ir.glsl | 18 +- .../mat4x3_f32/to_fn.wgsl.expected.ir.glsl | 26 +- .../to_private.wgsl.expected.ir.glsl | 20 +- .../to_storage.wgsl.expected.ir.glsl | 26 +- .../to_builtin.wgsl.expected.ir.glsl | 19 +- .../mat4x4_f16/to_fn.wgsl.expected.ir.glsl | 27 +- .../to_private.wgsl.expected.ir.glsl | 21 +- .../to_storage.wgsl.expected.ir.glsl | 21 +- .../to_builtin.wgsl.expected.ir.glsl | 18 +- .../mat4x4_f32/to_fn.wgsl.expected.ir.glsl | 26 +- .../to_private.wgsl.expected.ir.glsl | 20 +- .../to_storage.wgsl.expected.ir.glsl | 20 +- .../read/uniform.wgsl.expected.ir.glsl | 24 +- ...ocal_assign_scalar_x.wgsl.expected.ir.glsl | 20 +- ...cal_assign_scalar_xy.wgsl.expected.ir.glsl | 20 +- ...ocal_assign_scalar_y.wgsl.expected.ir.glsl | 20 +- ...dule_assign_scalar_x.wgsl.expected.ir.glsl | 20 +- ...ule_assign_scalar_xy.wgsl.expected.ir.glsl | 20 +- ...dule_assign_scalar_y.wgsl.expected.ir.glsl | 20 +- .../loop_call_with_loop.wgsl.expected.ir.glsl | 51 +- ...op_call_with_no_loop.wgsl.expected.ir.glsl | 39 +- .../loop_types_all.wgsl.expected.ir.glsl | 51 +- .../loop_types_repeated.wgsl.expected.ir.glsl | 43 +- .../loop_types_some.wgsl.expected.ir.glsl | 52 +- .../no_loop.wgsl.expected.ir.glsl | 39 +- test/tint/bug/tint/2146.wgsl.expected.ir.glsl | 26 +- .../tint/bug/tint/219.spvasm.expected.ir.glsl | 23 +- .../let/literal/vector.wgsl.expected.ir.glsl | 19 +- .../let/param/vector.wgsl.expected.ir.glsl | 19 +- .../var/literal/vector.wgsl.expected.ir.glsl | 18 +- .../var/param/vector.wgsl.expected.ir.glsl | 18 +- .../struct_with_matrix.wgsl.expected.ir.glsl | 21 +- .../struct_with_vector.wgsl.expected.ir.glsl | 21 +- .../packed_vec3/f16.wgsl.expected.ir.glsl | 141 +++++- .../packed_vec3/f32.wgsl.expected.ir.glsl | 140 +++++- .../packed_vec3/i32.wgsl.expected.ir.glsl | 140 +++++- .../packed_vec3/u32.wgsl.expected.ir.glsl | 140 +++++- .../read/swizzle.wgsl.expected.ir.glsl | 23 +- .../read/vec3/f16.wgsl.expected.ir.glsl | 141 +++++- .../read/vec3/f32.wgsl.expected.ir.glsl | 140 +++++- .../read/vec3/i32.wgsl.expected.ir.glsl | 140 +++++- .../read/vec3/u32.wgsl.expected.ir.glsl | 140 +++++- .../packed_vec3/f16.wgsl.expected.ir.glsl | 24 +- .../packed_vec3/f32.wgsl.expected.ir.glsl | 23 +- .../packed_vec3/i32.wgsl.expected.ir.glsl | 23 +- .../packed_vec3/u32.wgsl.expected.ir.glsl | 23 +- .../write/swizzle.wgsl.expected.ir.glsl | 23 +- .../write/vec3/f16.wgsl.expected.ir.glsl | 24 +- .../write/vec3/f32.wgsl.expected.ir.glsl | 23 +- .../write/vec3/i32.wgsl.expected.ir.glsl | 23 +- .../write/vec3/u32.wgsl.expected.ir.glsl | 23 +- .../struct_matrix.wgsl.expected.ir.glsl | 24 +- .../struct_vector.wgsl.expected.ir.glsl | 23 +- .../vector_assign.wgsl.expected.ir.glsl | 28 +- .../vector_component.wgsl.expected.ir.glsl | 19 +- .../vector_component.wgsl.expected.ir.glsl | 19 +- .../buffers/uniform.wgsl.expected.ir.glsl | 16 +- ...st_CompositeInsert.spvasm.expected.ir.glsl | 11 - ...ectorInsertDynamic.spvasm.expected.ir.glsl | 11 - ...ound_Matrix_Vector.spvasm.expected.ir.glsl | 11 - ...in_DereferenceBase.spvasm.expected.ir.glsl | 11 - ...ectorNonConstIndex.spvasm.expected.ir.glsl | 11 - ...hain_VectorSwizzle.spvasm.expected.ir.glsl | 11 - ...ract_Matrix_Vector.spvasm.expected.ir.glsl | 11 - ...rray_Matrix_Vector.spvasm.expected.ir.glsl | 11 - ...rray_Matrix_Vector.spvasm.expected.ir.glsl | 11 - ...ositeInsert_Vector.spvasm.expected.ir.glsl | 11 - ...sertDynamic_Sample.spvasm.expected.ir.glsl | 11 - 243 files changed, 5350 insertions(+), 2412 deletions(-) delete mode 100644 test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Hoist_CompositeInsert.spvasm.expected.ir.glsl delete mode 100644 test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Hoist_VectorInsertDynamic.spvasm.expected.ir.glsl delete mode 100644 test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Compound_Matrix_Vector.spvasm.expected.ir.glsl delete mode 100644 test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_DereferenceBase.spvasm.expected.ir.glsl delete mode 100644 test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorNonConstIndex.spvasm.expected.ir.glsl delete mode 100644 test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorSwizzle.spvasm.expected.ir.glsl delete mode 100644 test/tint/unittest/reader/spirv/SpvParserTest_CompositeExtract_Matrix_Vector.spvasm.expected.ir.glsl delete mode 100644 test/tint/unittest/reader/spirv/SpvParserTest_CompositeExtract_Struct_Array_Matrix_Vector.spvasm.expected.ir.glsl delete mode 100644 test/tint/unittest/reader/spirv/SpvParserTest_CompositeInsert_Struct_Array_Matrix_Vector.spvasm.expected.ir.glsl delete mode 100644 test/tint/unittest/reader/spirv/SpvParserTest_CompositeInsert_Vector.spvasm.expected.ir.glsl delete mode 100644 test/tint/unittest/reader/spirv/SpvParserTest_VectorInsertDynamic_Sample.spvasm.expected.ir.glsl diff --git a/src/tint/lang/glsl/writer/access_test.cc b/src/tint/lang/glsl/writer/access_test.cc index 6f0d8db9e77..2521bfb8b8a 100644 --- a/src/tint/lang/glsl/writer/access_test.cc +++ b/src/tint/lang/glsl/writer/access_test.cc @@ -88,8 +88,7 @@ void main() { )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessVector) { +TEST_F(GlslWriterTest, AccessVector) { auto* func = b.Function("a", ty.void_(), core::ir::Function::PipelineStage::kCompute); func->SetWorkgroupSize(1, 1, 1); @@ -101,12 +100,15 @@ TEST_F(GlslWriterTest, DISABLED_AccessVector) { ASSERT_TRUE(Generate()) << err_ << output_.glsl; EXPECT_EQ(output_.glsl, GlslHeader() + R"( - +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + vec3 v = vec3(0.0f); + float x = v.y; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessMatrix) { +TEST_F(GlslWriterTest, AccessMatrix) { auto* func = b.Function("a", ty.void_(), core::ir::Function::PipelineStage::kCompute); func->SetWorkgroupSize(1, 1, 1); @@ -119,12 +121,15 @@ TEST_F(GlslWriterTest, DISABLED_AccessMatrix) { ASSERT_TRUE(Generate()) << err_ << output_.glsl; EXPECT_EQ(output_.glsl, GlslHeader() + R"( - +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat4 v = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)); + float x = v[1u].z; +} )"); } -// TODO(dsinclair): Support StoreVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessStoreVectorElementConstantIndex) { +TEST_F(GlslWriterTest, AccessStoreVectorElementConstantIndex) { auto* func = b.Function("foo", ty.void_()); b.Append(func->Block(), [&] { auto* vec_var = b.Var("vec", ty.ptr>()); @@ -134,11 +139,17 @@ TEST_F(GlslWriterTest, DISABLED_AccessStoreVectorElementConstantIndex) { ASSERT_TRUE(Generate()) << err_ << output_.glsl; EXPECT_EQ(output_.glsl, GlslHeader() + R"( - +void foo() { + ivec4 vec = ivec4(0); + vec[1u] = 42; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} )"); } -// TODO(dsinclair): Support StoreVectorElement +// TODO(dsinclair): Needs ir::Convert TEST_F(GlslWriterTest, DISABLED_AccessStoreVectorElementDynamicIndex) { auto* idx = b.FunctionParam("idx", ty.i32()); auto* func = b.Function("foo", ty.void_()); @@ -204,8 +215,7 @@ void main() { )"); } -// TODO(dsinclair): Support swizzle -TEST_F(GlslWriterTest, DISABLED_AccessSwizzle) { +TEST_F(GlslWriterTest, AccessSwizzle) { auto* f = b.Function("a", ty.void_(), core::ir::Function::PipelineStage::kCompute); f->SetWorkgroupSize(1, 1, 1); @@ -217,12 +227,15 @@ TEST_F(GlslWriterTest, DISABLED_AccessSwizzle) { ASSERT_TRUE(Generate()) << err_ << output_.glsl; EXPECT_EQ(output_.glsl, GlslHeader() + R"( - +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + vec3 v = vec3(0.0f); + float b = v.y; +} )"); } -// TODO(dsinclair): Support swizzle -TEST_F(GlslWriterTest, DISABLED_AccessSwizzleMulti) { +TEST_F(GlslWriterTest, AccessSwizzleMulti) { auto* f = b.Function("a", ty.void_(), core::ir::Function::PipelineStage::kCompute); f->SetWorkgroupSize(1, 1, 1); @@ -234,12 +247,15 @@ TEST_F(GlslWriterTest, DISABLED_AccessSwizzleMulti) { ASSERT_TRUE(Generate()) << err_ << output_.glsl; EXPECT_EQ(output_.glsl, GlslHeader() + R"( - +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + vec4 v = vec4(0.0f); + vec4 b = v.wzyx; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessStorageVector) { +TEST_F(GlslWriterTest, AccessStorageVector) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); @@ -255,13 +271,22 @@ TEST_F(GlslWriterTest, DISABLED_AccessStorageVector) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +vec4 v; +void main() { + vec4 a = v; + float b = v.x; + float c = v.y; + float d = v.z; + float e = v.w; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessStorageVectorF16) { +TEST_F(GlslWriterTest, AccessStorageVectorF16) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); @@ -277,13 +302,23 @@ TEST_F(GlslWriterTest, DISABLED_AccessStorageVectorF16) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(#extension GL_AMD_gpu_shader_half_float: require +precision highp float; +precision highp int; + +f16vec4 v; +void main() { + f16vec4 a = v; + float16_t b = v.x; + float16_t c = v.y; + float16_t d = v.z; + float16_t e = v.w; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessStorageMatrix) { +TEST_F(GlslWriterTest, AccessStorageMatrix) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); @@ -298,8 +333,16 @@ TEST_F(GlslWriterTest, DISABLED_AccessStorageMatrix) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +mat4 v; +void main() { + mat4 a = v; + vec4 b = v[3u]; + float c = v[1u].z; +} )"); } @@ -366,8 +409,7 @@ void main() { )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessStorageNested) { +TEST_F(GlslWriterTest, AccessStorageNested) { auto* Inner = ty.Struct(mod.symbols.New("Inner"), { {mod.symbols.New("s"), ty.mat3x3()}, @@ -398,12 +440,33 @@ TEST_F(GlslWriterTest, DISABLED_AccessStorageNested) { ASSERT_TRUE(Generate()) << err_ << output_.glsl; EXPECT_EQ(output_.glsl, GlslHeader() + R"( +struct Inner { + mat3 s; + vec3 t[5]; +}; +struct Outer { + float x; + Inner y; +}; + +struct SB { + int a; + Outer b; +}; +precision highp float; +precision highp int; + + +SB v; +void main() { + SB a = v; + float b = v.b.y.t[3u].z; +} )"); } -// TODO(dsinclair): Support StoreVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessStorageStoreVector) { +TEST_F(GlslWriterTest, AccessStorageStoreVector) { auto* var = b.Var, core::Access::kReadWrite>("v"); var->SetBindingPoint(0, 0); @@ -418,13 +481,21 @@ TEST_F(GlslWriterTest, DISABLED_AccessStorageStoreVector) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +vec4 v; +void main() { + v[0u] = 2.0f; + v[1u] = 4.0f; + v[2u] = 8.0f; + v[3u] = 16.0f; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessDirectVariable) { +TEST_F(GlslWriterTest, AccessDirectVariable) { auto* var1 = b.Var, core::Access::kRead>("v1"); var1->SetBindingPoint(0, 0); b.ir.root_block->Append(var1); @@ -449,8 +520,22 @@ TEST_F(GlslWriterTest, DISABLED_AccessDirectVariable) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +vec4 v1; +vec4 v2; +void bar() { + float a = v1.y; +} +void bar_1() { + float a = v2.y; +} +void main() { + bar(); + bar_1(); +} )"); } @@ -735,8 +820,7 @@ void main() { )"); } -// TODO(dsinclair): Handle LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessUniformVector) { +TEST_F(GlslWriterTest, AccessUniformVector) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); @@ -752,13 +836,22 @@ TEST_F(GlslWriterTest, DISABLED_AccessUniformVector) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +uniform vec4 v; +void main() { + vec4 a = v; + float b = v.x; + float c = v.y; + float d = v.z; + float e = v.w; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessUniformVectorF16) { +TEST_F(GlslWriterTest, AccessUniformVectorF16) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); @@ -775,13 +868,24 @@ TEST_F(GlslWriterTest, DISABLED_AccessUniformVectorF16) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(#extension GL_AMD_gpu_shader_half_float: require +precision highp float; +precision highp int; + +uniform f16vec4 v; +void main() { + uint x = 1u; + f16vec4 a = v; + float16_t b = v.x; + float16_t c = v[min(x, 3u)]; + float16_t d = v.z; + float16_t e = v.w; +} )"); } -// TODO(dsinclair): support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessUniformMatrix) { +TEST_F(GlslWriterTest, AccessUniformMatrix) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); @@ -796,13 +900,20 @@ TEST_F(GlslWriterTest, DISABLED_AccessUniformMatrix) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +uniform mat4 v; +void main() { + mat4 a = v; + vec4 b = v[3u]; + float c = v[1u].z; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessUniformMatrix2x3) { +TEST_F(GlslWriterTest, AccessUniformMatrix2x3) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); @@ -817,13 +928,20 @@ TEST_F(GlslWriterTest, DISABLED_AccessUniformMatrix2x3) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +uniform mat2x3 v; +void main() { + mat2x3 a = v; + vec3 b = v[1u]; + float c = v[1u].z; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessUniformMat2x3F16) { +TEST_F(GlslWriterTest, AccessUniformMat2x3F16) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); b.ir.root_block->Append(var); @@ -837,13 +955,21 @@ TEST_F(GlslWriterTest, DISABLED_AccessUniformMat2x3F16) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(#extension GL_AMD_gpu_shader_half_float: require +precision highp float; +precision highp int; + +uniform f16mat2x3 v; +void main() { + f16mat2x3 a = v; + f16vec3 b = v[1u]; + float16_t c = v[1u].z; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessUniformMatrix3x2) { +TEST_F(GlslWriterTest, AccessUniformMatrix3x2) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); @@ -858,13 +984,20 @@ TEST_F(GlslWriterTest, DISABLED_AccessUniformMatrix3x2) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +uniform mat3x2 v; +void main() { + mat3x2 a = v; + vec2 b = v[1u]; + float c = v[1u].y; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessUniformMatrix2x2) { +TEST_F(GlslWriterTest, AccessUniformMatrix2x2) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); @@ -879,13 +1012,20 @@ TEST_F(GlslWriterTest, DISABLED_AccessUniformMatrix2x2) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +uniform mat2 v; +void main() { + mat2 a = v; + vec2 b = v[1u]; + float c = v[1u].y; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessUniformMatrix2x2F16) { +TEST_F(GlslWriterTest, AccessUniformMatrix2x2F16) { auto* var = b.Var, core::Access::kRead>("v"); var->SetBindingPoint(0, 0); @@ -900,8 +1040,17 @@ TEST_F(GlslWriterTest, DISABLED_AccessUniformMatrix2x2F16) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(#extension GL_AMD_gpu_shader_half_float: require +precision highp float; +precision highp int; + +uniform f16mat2 v; +void main() { + f16mat2 a = v; + f16vec2 b = v[1u]; + float16_t c = v[1u].y; +} )"); } @@ -1043,8 +1192,7 @@ void main() { )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessUniformStructNested) { +TEST_F(GlslWriterTest, AccessUniformStructNested) { auto* Inner = ty.Struct(mod.symbols.New("Inner"), { {mod.symbols.New("s"), ty.mat3x3()}, @@ -1075,7 +1223,29 @@ TEST_F(GlslWriterTest, DISABLED_AccessUniformStructNested) { ASSERT_TRUE(Generate()) << err_ << output_.glsl; EXPECT_EQ(output_.glsl, GlslHeader() + R"( +struct Inner { + mat3 s; + vec3 t[5]; +}; + +struct Outer { + float x; + Inner y; +}; +struct SB { + int a; + Outer b; +}; +precision highp float; +precision highp int; + + +uniform SB v; +void main() { + SB a = v; + float b = v.b.y.t[3u].z; +} )"); } @@ -1126,8 +1296,7 @@ void main() { )"); } -// TODO(dsinclair): Support StoreVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessStoreVectorElement) { +TEST_F(GlslWriterTest, AccessStoreVectorElement) { auto* var = b.Var, core::Access::kReadWrite>("v"); var->SetBindingPoint(0, 0); @@ -1140,13 +1309,18 @@ TEST_F(GlslWriterTest, DISABLED_AccessStoreVectorElement) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +vec3 v; +void main() { + v[1u] = 2.0f; +} )"); } -// TODO(dsinclair): Support StoreVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessStoreVectorElementF16) { +TEST_F(GlslWriterTest, AccessStoreVectorElementF16) { auto* var = b.Var, core::Access::kReadWrite>("v"); var->SetBindingPoint(0, 0); @@ -1159,8 +1333,15 @@ TEST_F(GlslWriterTest, DISABLED_AccessStoreVectorElementF16) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(#extension GL_AMD_gpu_shader_half_float: require +precision highp float; +precision highp int; + +f16vec3 v; +void main() { + v[1u] = 2.0hf; +} )"); } @@ -1213,8 +1394,7 @@ void main() { )"); } -// TODO(dsinclair): Support StoreVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessStoreMatrixElement) { +TEST_F(GlslWriterTest, AccessStoreMatrixElement) { auto* var = b.Var, core::Access::kReadWrite>("v"); var->SetBindingPoint(0, 0); @@ -1227,13 +1407,18 @@ TEST_F(GlslWriterTest, DISABLED_AccessStoreMatrixElement) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +mat4 v; +void main() { + v[1u][2u] = 5.0f; +} )"); } -// TODO(dsinclair): Support StoreVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessStoreMatrixElementF16) { +TEST_F(GlslWriterTest, AccessStoreMatrixElementF16) { auto* var = b.Var, core::Access::kReadWrite>("v"); var->SetBindingPoint(0, 0); @@ -1246,8 +1431,15 @@ TEST_F(GlslWriterTest, DISABLED_AccessStoreMatrixElementF16) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(#extension GL_AMD_gpu_shader_half_float: require +precision highp float; +precision highp int; + +f16mat3x2 v; +void main() { + v[2u][1u] = 5.0hf; +} )"); } @@ -1394,8 +1586,7 @@ void main() { )"); } -// TODO(dsinclair): Support Loop -TEST_F(GlslWriterTest, DISABLED_AccessStoreArray) { +TEST_F(GlslWriterTest, AccessStoreArray) { auto* var = b.Var, 5>, core::Access::kReadWrite>("v"); var->SetBindingPoint(0, 0); @@ -1408,8 +1599,32 @@ TEST_F(GlslWriterTest, DISABLED_AccessStoreArray) { }); ASSERT_TRUE(Generate()) << err_ << output_.glsl; - EXPECT_EQ(output_.glsl, GlslHeader() + R"( + EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float; +precision highp int; + +vec3 v[5]; +void tint_store_and_preserve_padding(inout vec3 target[5], vec3 value_param[5]) { + { + uint v_1 = 0u; + v_1 = 0u; + while(true) { + uint v_2 = v_1; + if ((v_2 >= 5u)) { + break; + } + target[v_2] = value_param[v_2]; + { + v_1 = (v_2 + 1u); + } + continue; + } + } +} +void main() { + vec3 ary[5] = vec3[5](vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)); + tint_store_and_preserve_padding(v, ary); +} )"); } @@ -1599,8 +1814,7 @@ void main() { )"); } -// TODO(dsinclair): Support Loop -TEST_F(GlslWriterTest, DISABLED_AccessStoreStructComplex) { +TEST_F(GlslWriterTest, AccessStoreStructComplex) { auto* Inner = ty.Struct(mod.symbols.New("Inner"), { {mod.symbols.New("s"), ty.mat3x3()}, @@ -1629,12 +1843,67 @@ TEST_F(GlslWriterTest, DISABLED_AccessStoreStructComplex) { ASSERT_TRUE(Generate()) << err_ << output_.glsl; EXPECT_EQ(output_.glsl, GlslHeader() + R"( +struct Inner { + mat3 s; + vec3 t[5]; +}; +struct Outer { + float x; + Inner y; +}; + +struct SB { + int a; + Outer b; +}; +precision highp float; +precision highp int; + + +SB v; +void tint_store_and_preserve_padding_4(inout vec3 target[5], vec3 value_param[5]) { + { + uint v_1 = 0u; + v_1 = 0u; + while(true) { + uint v_2 = v_1; + if ((v_2 >= 5u)) { + break; + } + target[v_2] = value_param[v_2]; + { + v_1 = (v_2 + 1u); + } + continue; + } + } +} +void tint_store_and_preserve_padding_3(inout mat3 target, mat3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; +} +void tint_store_and_preserve_padding_2(inout Inner target, Inner value_param) { + tint_store_and_preserve_padding_3(target.s, value_param.s); + tint_store_and_preserve_padding_4(target.t, value_param.t); +} +void tint_store_and_preserve_padding_1(inout Outer target, Outer value_param) { + target.x = value_param.x; + tint_store_and_preserve_padding_2(target.y, value_param.y); +} +void tint_store_and_preserve_padding(inout SB target, SB value_param) { + target.a = value_param.a; + tint_store_and_preserve_padding_1(target.b, value_param.b); +} +void main() { + SB s = SB(0, Outer(0.0f, Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)), vec3[5](vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))))); + tint_store_and_preserve_padding(v, s); +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_AccessChainReused) { +TEST_F(GlslWriterTest, AccessChainReused) { auto* sb = ty.Struct(mod.symbols.New("SB"), { {mod.symbols.New("a"), ty.i32()}, {mod.symbols.New("b"), ty.vec3()}, @@ -1654,12 +1923,23 @@ TEST_F(GlslWriterTest, DISABLED_AccessChainReused) { ASSERT_TRUE(Generate()) << err_ << output_.glsl; EXPECT_EQ(output_.glsl, GlslHeader() + R"( +struct SB { + int a; + vec3 b; +}; +precision highp float; +precision highp int; + +SB v; +void main() { + float b = v.b.y; + float c = v.b.z; +} )"); } -// TODO(dsinclair): Support LoadVectorElement -TEST_F(GlslWriterTest, DISABLED_UniformAccessChainReused) { +TEST_F(GlslWriterTest, AccessUniformChainReused) { auto* sb = ty.Struct(mod.symbols.New("SB"), { {mod.symbols.New("c"), ty.f32()}, {mod.symbols.New("d"), ty.vec3()}, @@ -1679,7 +1959,19 @@ TEST_F(GlslWriterTest, DISABLED_UniformAccessChainReused) { ASSERT_TRUE(Generate()) << err_ << output_.glsl; EXPECT_EQ(output_.glsl, GlslHeader() + R"( +struct SB { + float c; + vec3 d; +}; +precision highp float; +precision highp int; + +uniform SB v; +void main() { + float b = v.d.y; + float c = v.d.z; +} )"); } diff --git a/src/tint/lang/glsl/writer/printer/printer.cc b/src/tint/lang/glsl/writer/printer/printer.cc index 29723cb6c2f..e0cbd40d587 100644 --- a/src/tint/lang/glsl/writer/printer/printer.cc +++ b/src/tint/lang/glsl/writer/printer/printer.cc @@ -55,6 +55,7 @@ #include "src/tint/lang/core/ir/next_iteration.h" #include "src/tint/lang/core/ir/return.h" #include "src/tint/lang/core/ir/store.h" +#include "src/tint/lang/core/ir/store_vector_element.h" #include "src/tint/lang/core/ir/switch.h" #include "src/tint/lang/core/ir/swizzle.h" #include "src/tint/lang/core/ir/terminate_invocation.h" @@ -264,20 +265,21 @@ class Printer : public tint::TextGenerator { // TerminateInvocation must come before Call. [&](const core::ir::TerminateInvocation*) { EmitDiscard(); }, // - [&](const core::ir::BreakIf* i) { EmitBreakIf(i); }, // - [&](const core::ir::Call* i) { EmitCallStmt(i); }, // - [&](const core::ir::Continue*) { EmitContinue(); }, // - [&](const core::ir::ExitIf*) { /* do nothing handled by transform */ }, // - [&](const core::ir::ExitLoop*) { EmitExitLoop(); }, // - [&](const core::ir::ExitSwitch*) { EmitExitSwitch(); }, // - [&](const core::ir::If* i) { EmitIf(i); }, // - [&](const core::ir::Let* i) { EmitLet(i); }, // - [&](const core::ir::Loop* l) { EmitLoop(l); }, // - [&](const core::ir::Return* r) { EmitReturn(r); }, // - [&](const core::ir::Store* s) { EmitStore(s); }, // - [&](const core::ir::Switch* i) { EmitSwitch(i); }, // - [&](const core::ir::Unreachable*) { EmitUnreachable(); }, // - [&](const core::ir::Var* v) { EmitVar(Line(), v); }, // + [&](const core::ir::BreakIf* i) { EmitBreakIf(i); }, // + [&](const core::ir::Call* i) { EmitCallStmt(i); }, // + [&](const core::ir::Continue*) { EmitContinue(); }, // + [&](const core::ir::ExitIf*) { /* do nothing handled by transform */ }, // + [&](const core::ir::ExitLoop*) { EmitExitLoop(); }, // + [&](const core::ir::ExitSwitch*) { EmitExitSwitch(); }, // + [&](const core::ir::If* i) { EmitIf(i); }, // + [&](const core::ir::Let* i) { EmitLet(i); }, // + [&](const core::ir::Loop* l) { EmitLoop(l); }, // + [&](const core::ir::Return* r) { EmitReturn(r); }, // + [&](const core::ir::Store* s) { EmitStore(s); }, // + [&](const core::ir::StoreVectorElement* s) { EmitStoreVectorElement(s); }, // + [&](const core::ir::Switch* i) { EmitSwitch(i); }, // + [&](const core::ir::Unreachable*) { EmitUnreachable(); }, // + [&](const core::ir::Var* v) { EmitVar(Line(), v); }, // [&](const core::ir::NextIteration*) { /* do nothing */ }, // [&](const core::ir::ExitIf*) { /* do nothing handled by transform */ }, // @@ -294,6 +296,57 @@ class Printer : public tint::TextGenerator { } } + void EmitStoreVectorElement(const core::ir::StoreVectorElement* l) { + auto out = Line(); + + EmitValue(out, l->To()); + out << "["; + EmitValue(out, l->Index()); + out << "] = "; + EmitValue(out, l->Value()); + out << ";"; + } + + void IdxToComponent(StringStream& out, uint32_t idx) { + switch (idx) { + case 0: + out << "x"; + break; + case 1: + out << "y"; + break; + case 2: + out << "z"; + break; + case 3: + out << "w"; + break; + default: + TINT_UNREACHABLE(); + } + } + + void EmitLoadVectorElement(StringStream& out, const core::ir::LoadVectorElement* l) { + EmitValue(out, l->From()); + + if (auto* cnst = l->Index()->As()) { + out << "."; + IdxToComponent(out, cnst->Value()->ValueAs()); + } else { + out << "["; + EmitValue(out, l->Index()); + out << "]"; + } + } + + void EmitSwizzle(StringStream& out, const core::ir::Swizzle* swizzle) { + EmitValue(out, swizzle->Object()); + out << "."; + for (const auto i : swizzle->Indices()) { + IdxToComponent(out, i); + } + } + void EmitDiscard() { Line() << "discard;"; } void EmitContinue() { @@ -753,7 +806,9 @@ class Printer : public tint::TextGenerator { [&](const core::ir::CoreUnary* u) { EmitUnary(out, u); }, [&](const core::ir::Let* l) { out << NameOf(l->Result(0)); }, [&](const core::ir::Load* l) { EmitLoad(out, l); }, + [&](const core::ir::LoadVectorElement* l) { EmitLoadVectorElement(out, l); }, [&](const core::ir::Store* s) { EmitStore(s); }, + [&](const core::ir::Swizzle* s) { EmitSwizzle(out, s); }, // [&](const core::ir::UserCall* c) { EmitUserCall(out, c); }, [&](const core::ir::Var* var) { out << NameOf(var->Result(0)); }, diff --git a/test/tint/access/var/matrix.spvasm.expected.ir.glsl b/test/tint/access/var/matrix.spvasm.expected.ir.glsl index 4a20bc7c4e6..b90b6a7a32c 100644 --- a/test/tint/access/var/matrix.spvasm.expected.ir.glsl +++ b/test/tint/access/var/matrix.spvasm.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +void main_1() { + mat3 m = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); + float x_16 = m[1].y; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + main_1(); +} diff --git a/test/tint/access/var/vector.spvasm.expected.ir.glsl b/test/tint/access/var/vector.spvasm.expected.ir.glsl index 4a20bc7c4e6..fcc6ea8eb74 100644 --- a/test/tint/access/var/vector.spvasm.expected.ir.glsl +++ b/test/tint/access/var/vector.spvasm.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +void main_1() { + vec3 v = vec3(0.0f); + float x_14 = v.y; + vec2 x_17 = v.xz; + vec3 x_19 = v.xzy; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + main_1(); +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..0c1acc3a811 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,23 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2 u[4]; +float s; +float a(mat2 a_1[4]) { + return a_1[0][0][0u]; +} +float b(mat2 m) { + return m[0][0u]; +} +float c(vec2 v) { + return v[0u]; +} +float d(float f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float v_1 = a(u); + float v_2 = (v_1 + b(u[1])); + float v_3 = (v_2 + c(u[1][0].yx)); + s = (v_3 + d(u[1][0].yx[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..01955e59172 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2 u[4]; +float s; +mat2 p[4] = mat2[4](mat2(vec2(0.0f), vec2(0.0f)), mat2(vec2(0.0f), vec2(0.0f)), mat2(vec2(0.0f), vec2(0.0f)), mat2(vec2(0.0f), vec2(0.0f))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].yx; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..f1186844192 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2 u[4]; +mat2 s[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[2]; + s[1][0] = u[0][1].yx; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..97e2bb0ea24 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,24 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x3 u[4]; +float16_t s; +float16_t a(f16mat2x3 a_1[4]) { + return a_1[0][0][0u]; +} +float16_t b(f16mat2x3 m) { + return m[0][0u]; +} +float16_t c(f16vec3 v) { + return v[0u]; +} +float16_t d(float16_t f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float16_t v_1 = a(u); + float16_t v_2 = (v_1 + b(u[1])); + float16_t v_3 = (v_2 + c(u[1][0].zxy)); + s = (v_3 + d(u[1][0].zxy[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..927fc0017f9 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,14 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x3 u[4]; +float16_t s; +f16mat2x3 p[4] = f16mat2x3[4](f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)), f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)), f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)), f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].zxy; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..b5f531a8f1f 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,33 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x3 u[4]; +f16mat2x3 s[4]; +void tint_store_and_preserve_padding_1(inout f16mat2x3 target, f16mat2x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; +} +void tint_store_and_preserve_padding(inout f16mat2x3 target[4], f16mat2x3 value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[1][0] = u[0][1].zxy; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..2fc8aee5003 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,23 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x3 u[4]; +float s; +float a(mat2x3 a_1[4]) { + return a_1[0][0][0u]; +} +float b(mat2x3 m) { + return m[0][0u]; +} +float c(vec3 v) { + return v[0u]; +} +float d(float f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float v_1 = a(u); + float v_2 = (v_1 + b(u[1])); + float v_3 = (v_2 + c(u[1][0].zxy)); + s = (v_3 + d(u[1][0].zxy[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..ec95663f3a9 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x3 u[4]; +float s; +mat2x3 p[4] = mat2x3[4](mat2x3(vec3(0.0f), vec3(0.0f)), mat2x3(vec3(0.0f), vec3(0.0f)), mat2x3(vec3(0.0f), vec3(0.0f)), mat2x3(vec3(0.0f), vec3(0.0f))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].zxy; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..456d7bc21e0 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,32 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x3 u[4]; +mat2x3 s[4]; +void tint_store_and_preserve_padding_1(inout mat2x3 target, mat2x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; +} +void tint_store_and_preserve_padding(inout mat2x3 target[4], mat2x3 value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[1][0] = u[0][1].zxy; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..e4856109dae 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,24 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x4 u[4]; +float16_t s; +float16_t a(f16mat2x4 a_1[4]) { + return a_1[0][0][0u]; +} +float16_t b(f16mat2x4 m) { + return m[0][0u]; +} +float16_t c(f16vec4 v) { + return v[0u]; +} +float16_t d(float16_t f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float16_t v_1 = a(u); + float16_t v_2 = (v_1 + b(u[1])); + float16_t v_3 = (v_2 + c(u[1][0].ywxz)); + s = (v_3 + d(u[1][0].ywxz[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..b23998f5e70 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,14 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x4 u[4]; +float16_t s; +f16mat2x4 p[4] = f16mat2x4[4](f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)), f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)), f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)), f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].ywxz; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..8cecd012e0a 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x4 u[4]; +f16mat2x4 s[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[2]; + s[1][0] = u[0][1].ywxz; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..cd8b05d2e19 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,23 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x4 u[4]; +float s; +float a(mat2x4 a_1[4]) { + return a_1[0][0][0u]; +} +float b(mat2x4 m) { + return m[0][0u]; +} +float c(vec4 v) { + return v[0u]; +} +float d(float f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float v_1 = a(u); + float v_2 = (v_1 + b(u[1])); + float v_3 = (v_2 + c(u[1][0].ywxz)); + s = (v_3 + d(u[1][0].ywxz[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..c9ea1d9eb50 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x4 u[4]; +float s; +mat2x4 p[4] = mat2x4[4](mat2x4(vec4(0.0f), vec4(0.0f)), mat2x4(vec4(0.0f), vec4(0.0f)), mat2x4(vec4(0.0f), vec4(0.0f)), mat2x4(vec4(0.0f), vec4(0.0f))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].ywxz; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..82d22eb457d 100644 --- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x4 u[4]; +mat2x4 s[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[2]; + s[1][0] = u[0][1].ywxz; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..1583f138a4a 100644 --- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,23 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3 u[4]; +float s; +float a(mat3 a_1[4]) { + return a_1[0][0][0u]; +} +float b(mat3 m) { + return m[0][0u]; +} +float c(vec3 v) { + return v[0u]; +} +float d(float f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float v_1 = a(u); + float v_2 = (v_1 + b(u[1])); + float v_3 = (v_2 + c(u[1][0].zxy)); + s = (v_3 + d(u[1][0].zxy[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..3df2911804c 100644 --- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3 u[4]; +float s; +mat3 p[4] = mat3[4](mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)), mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)), mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)), mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].zxy; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..ff71e5db561 100644 --- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,33 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3 u[4]; +mat3 s[4]; +void tint_store_and_preserve_padding_1(inout mat3 target, mat3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; +} +void tint_store_and_preserve_padding(inout mat3 target[4], mat3 value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[1][0] = u[0][1].zxy; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..8fafacbd0e1 100644 --- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,23 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x4 u[4]; +float s; +float a(mat3x4 a_1[4]) { + return a_1[0][0][0u]; +} +float b(mat3x4 m) { + return m[0][0u]; +} +float c(vec4 v) { + return v[0u]; +} +float d(float f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float v_1 = a(u); + float v_2 = (v_1 + b(u[1])); + float v_3 = (v_2 + c(u[1][0].ywxz)); + s = (v_3 + d(u[1][0].ywxz[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..db619a54c44 100644 --- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x4 u[4]; +float s; +mat3x4 p[4] = mat3x4[4](mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)), mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)), mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)), mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].ywxz; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..d5c36b9abbe 100644 --- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x4 u[4]; +mat3x4 s[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[2]; + s[1][0] = u[0][1].ywxz; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..27f64ae201f 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,24 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x2 u[4]; +float16_t s; +float16_t a(f16mat4x2 a_1[4]) { + return a_1[0][0][0u]; +} +float16_t b(f16mat4x2 m) { + return m[0][0u]; +} +float16_t c(f16vec2 v) { + return v[0u]; +} +float16_t d(float16_t f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float16_t v_1 = a(u); + float16_t v_2 = (v_1 + b(u[1])); + float16_t v_3 = (v_2 + c(u[1][0].yx)); + s = (v_3 + d(u[1][0].yx[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..8eee8455292 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,14 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x2 u[4]; +float16_t s; +f16mat4x2 p[4] = f16mat4x2[4](f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].yx; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..75b514106e0 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x2 u[4]; +f16mat4x2 s[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[2]; + s[1][0] = u[0][1].yx; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..4281537216f 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,23 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x2 u[4]; +float s; +float a(mat4x2 a_1[4]) { + return a_1[0][0][0u]; +} +float b(mat4x2 m) { + return m[0][0u]; +} +float c(vec2 v) { + return v[0u]; +} +float d(float f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float v_1 = a(u); + float v_2 = (v_1 + b(u[1])); + float v_3 = (v_2 + c(u[1][0].yx)); + s = (v_3 + d(u[1][0].yx[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..96798f70585 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x2 u[4]; +float s; +mat4x2 p[4] = mat4x2[4](mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)), mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)), mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)), mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].yx; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..8188a772555 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x2 u[4]; +mat4x2 s[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[2]; + s[1][0] = u[0][1].yx; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..5df0efc134b 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,24 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x3 u[4]; +float16_t s; +float16_t a(f16mat4x3 a_1[4]) { + return a_1[0][0][0u]; +} +float16_t b(f16mat4x3 m) { + return m[0][0u]; +} +float16_t c(f16vec3 v) { + return v[0u]; +} +float16_t d(float16_t f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float16_t v_1 = a(u); + float16_t v_2 = (v_1 + b(u[1])); + float16_t v_3 = (v_2 + c(u[1][0].zxy)); + s = (v_3 + d(u[1][0].zxy[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..229c9107e90 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,14 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x3 u[4]; +float16_t s; +f16mat4x3 p[4] = f16mat4x3[4](f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].zxy; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..d9a0ddf3248 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,35 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x3 u[4]; +f16mat4x3 s[4]; +void tint_store_and_preserve_padding_1(inout f16mat4x3 target, f16mat4x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; + target[3u] = value_param[3u]; +} +void tint_store_and_preserve_padding(inout f16mat4x3 target[4], f16mat4x3 value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[1][0] = u[0][1].zxy; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..89d0af7d700 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,23 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x3 u[4]; +float s; +float a(mat4x3 a_1[4]) { + return a_1[0][0][0u]; +} +float b(mat4x3 m) { + return m[0][0u]; +} +float c(vec3 v) { + return v[0u]; +} +float d(float f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float v_1 = a(u); + float v_2 = (v_1 + b(u[1])); + float v_3 = (v_2 + c(u[1][0].zxy)); + s = (v_3 + d(u[1][0].zxy[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..308277c7e6d 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x3 u[4]; +float s; +mat4x3 p[4] = mat4x3[4](mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)), mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)), mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)), mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].zxy; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..1480802cb1d 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,34 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x3 u[4]; +mat4x3 s[4]; +void tint_store_and_preserve_padding_1(inout mat4x3 target, mat4x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; + target[3u] = value_param[3u]; +} +void tint_store_and_preserve_padding(inout mat4x3 target[4], mat4x3 value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[1][0] = u[0][1].zxy; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..b826561eba9 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,24 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4 u[4]; +float16_t s; +float16_t a(f16mat4 a_1[4]) { + return a_1[0][0][0u]; +} +float16_t b(f16mat4 m) { + return m[0][0u]; +} +float16_t c(f16vec4 v) { + return v[0u]; +} +float16_t d(float16_t f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float16_t v_1 = a(u); + float16_t v_2 = (v_1 + b(u[1])); + float16_t v_3 = (v_2 + c(u[1][0].ywxz)); + s = (v_3 + d(u[1][0].ywxz[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..4e6ed8a9f60 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,14 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4 u[4]; +float16_t s; +f16mat4 p[4] = f16mat4[4](f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].ywxz; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..c2eeaa0c310 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4 u[4]; +f16mat4 s[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[2]; + s[1][0] = u[0][1].ywxz; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.glsl index 1e74e7747e7..89a92a6e4ca 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,23 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Access -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4 u[4]; +float s; +float a(mat4 a_1[4]) { + return a_1[0][0][0u]; +} +float b(mat4 m) { + return m[0][0u]; +} +float c(vec4 v) { + return v[0u]; +} +float d(float f) { + return f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + float v_1 = a(u); + float v_2 = (v_1 + b(u[1])); + float v_3 = (v_2 + c(u[1][0].ywxz)); + s = (v_3 + d(u[1][0].ywxz[0u])); +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..dc1f39393a7 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4 u[4]; +float s; +mat4 p[4] = mat4[4](mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)), mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)), mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)), mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f))); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[1][0] = u[0][1].ywxz; + p[1][0][0u] = u[0][1].x; + s = p[1][0].x; +} diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..fe9b1a37c54 100644 --- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4 u[4]; +mat4 s[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[2]; + s[1][0] = u[0][1].ywxz; + s[1][0][0u] = u[0][1].x; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..fcf1aea52e1 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat2 t = transpose(u[2].m); + float16_t l = length(u[0].m[1].yx); + float16_t a = abs(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..a545b07e185 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,28 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(f16mat2 m) { +} +void d(f16vec2 v) { +} +void e(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].yx); + e(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..0e724866fea 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)), 0), S(0, f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)), 0), S(0, f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)), 0), S(0, f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..2a29dfc1876 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,40 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..2f39494ff3f 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,15 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat2 t = transpose(u[2].m); + float l = length(u[0].m[1].yx); + float a = abs(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..1017ca85c97 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,27 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(mat2 m) { +} +void d(vec2 v) { +} +void e(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].yx); + e(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..dbaffc42d47 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, mat2(vec2(0.0f), vec2(0.0f)), 0), S(0, mat2(vec2(0.0f), vec2(0.0f)), 0), S(0, mat2(vec2(0.0f), vec2(0.0f)), 0), S(0, mat2(vec2(0.0f), vec2(0.0f)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..5d67343b418 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,39 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..4f65e850242 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat3x2 t = transpose(u[2].m); + float16_t l = length(u[0].m[1].zxy); + float16_t a = abs(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..737fa3d5cc3 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,28 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(f16mat2x3 m) { +} +void d(f16vec3 v) { +} +void e(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].zxy); + e(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..e72658550c6 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)), 0), S(0, f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)), 0), S(0, f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)), 0), S(0, f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..51022aec56e 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,44 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_2(inout f16mat2x3 target, f16mat2x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; +} +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + tint_store_and_preserve_padding_2(target.m, value_param.m); + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + tint_store_and_preserve_padding_2(s[3].m, u[2].m); + s[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..070d1c7fe00 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,15 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat3x2 t = transpose(u[2].m); + float l = length(u[0].m[1].zxy); + float a = abs(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..9a15f5bd198 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,27 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(mat2x3 m) { +} +void d(vec3 v) { +} +void e(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].zxy); + e(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..d2af83563b0 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, mat2x3(vec3(0.0f), vec3(0.0f)), 0), S(0, mat2x3(vec3(0.0f), vec3(0.0f)), 0), S(0, mat2x3(vec3(0.0f), vec3(0.0f)), 0), S(0, mat2x3(vec3(0.0f), vec3(0.0f)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..eb7c52cbf15 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,43 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_2(inout mat2x3 target, mat2x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; +} +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + tint_store_and_preserve_padding_2(target.m, value_param.m); + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + tint_store_and_preserve_padding_2(s[3].m, u[2].m); + s[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..921c39504ec 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat4x2 t = transpose(u[2].m); + float16_t l = length(u[0].m[1].ywxz); + float16_t a = abs(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..99ae1f61ca9 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,28 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(f16mat2x4 m) { +} +void d(f16vec4 v) { +} +void e(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].ywxz); + e(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..143732fb3fd 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)), 0), S(0, f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)), 0), S(0, f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)), 0), S(0, f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..28ae045020f 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,40 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat2x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..b143e67cff9 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,15 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat4x2 t = transpose(u[2].m); + float l = length(u[0].m[1].ywxz); + float a = abs(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..222890edde3 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,27 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(mat2x4 m) { +} +void d(vec4 v) { +} +void e(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].ywxz); + e(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..38bc18acb4e 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, mat2x4(vec4(0.0f), vec4(0.0f)), 0), S(0, mat2x4(vec4(0.0f), vec4(0.0f)), 0), S(0, mat2x4(vec4(0.0f), vec4(0.0f)), 0), S(0, mat2x4(vec4(0.0f), vec4(0.0f)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..f84945ee1d8 100644 --- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,39 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat2x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..5fdfd2ff5b7 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat2x3 t = transpose(u[2].m); + float16_t l = length(u[0].m[1].yx); + float16_t a = abs(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..ab66bc5c0c0 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,28 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(f16mat3x2 m) { +} +void d(f16vec2 v) { +} +void e(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].yx); + e(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..0852022c8ff 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), 0), S(0, f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), 0), S(0, f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), 0), S(0, f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..f56e1f326b9 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,40 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..16e755d7c6d 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,15 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat2x3 t = transpose(u[2].m); + float l = length(u[0].m[1].yx); + float a = abs(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..d06f473a520 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,27 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(mat3x2 m) { +} +void d(vec2 v) { +} +void e(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].yx); + e(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..affc08a794c 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)), 0), S(0, mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)), 0), S(0, mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)), 0), S(0, mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..8679e45be99 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,39 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..5a920bad202 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat3 t = transpose(u[2].m); + float16_t l = length(u[0].m[1].zxy); + float16_t a = abs(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..f8a566c3dd2 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,28 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(f16mat3 m) { +} +void d(f16vec3 v) { +} +void e(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].zxy); + e(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..955f8636869 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), 0), S(0, f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), 0), S(0, f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), 0), S(0, f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..3ee30128a43 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,45 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_2(inout f16mat3 target, f16mat3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; +} +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + tint_store_and_preserve_padding_2(target.m, value_param.m); + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + tint_store_and_preserve_padding_2(s[3].m, u[2].m); + s[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..3db524812bc 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,15 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat3 t = transpose(u[2].m); + float l = length(u[0].m[1].zxy); + float a = abs(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..36f093c8c51 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,27 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(mat3 m) { +} +void d(vec3 v) { +} +void e(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].zxy); + e(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..8966e9baf64 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)), 0), S(0, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)), 0), S(0, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)), 0), S(0, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..19597f7c351 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,44 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_2(inout mat3 target, mat3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; +} +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + tint_store_and_preserve_padding_2(target.m, value_param.m); + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + tint_store_and_preserve_padding_2(s[3].m, u[2].m); + s[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..f842f18c217 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat4x3 t = transpose(u[2].m); + float16_t l = length(u[0].m[1].ywxz); + float16_t a = abs(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..cbd65f9b7b5 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,28 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(f16mat3x4 m) { +} +void d(f16vec4 v) { +} +void e(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].ywxz); + e(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..ecd97e88621 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), 0), S(0, f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), 0), S(0, f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), 0), S(0, f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..813ef00534b 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,40 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat3x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..5b998eee422 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,15 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat4x3 t = transpose(u[2].m); + float l = length(u[0].m[1].ywxz); + float a = abs(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..a5e25df053f 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,27 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(mat3x4 m) { +} +void d(vec4 v) { +} +void e(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].ywxz); + e(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..78d2000f6e7 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)), 0), S(0, mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)), 0), S(0, mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)), 0), S(0, mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..e8be6331c80 100644 --- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,39 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat3x4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..0178e4f6e8a 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat2x4 t = transpose(u[2].m); + float16_t l = length(u[0].m[1].yx); + float16_t a = abs(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..93c51f59801 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,28 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(f16mat4x2 m) { +} +void d(f16vec2 v) { +} +void e(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].yx); + e(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..a089b821cb9 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), 0), S(0, f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), 0), S(0, f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), 0), S(0, f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..5fa640ff6b1 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,40 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..a381b84babd 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,15 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat2x4 t = transpose(u[2].m); + float l = length(u[0].m[1].yx); + float a = abs(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..7065011f022 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,27 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(mat4x2 m) { +} +void d(vec2 v) { +} +void e(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].yx); + e(u[0].m[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..df7d465cbe1 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)), 0), S(0, mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)), 0), S(0, mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)), 0), S(0, mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..e5cd212df6a 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,39 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4x2 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].yx; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..48b474c0263 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat3x4 t = transpose(u[2].m); + float16_t l = length(u[0].m[1].zxy); + float16_t a = abs(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..c8dbf055317 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,28 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(f16mat4x3 m) { +} +void d(f16vec3 v) { +} +void e(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].zxy); + e(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..66231ffc984 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), 0), S(0, f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), 0), S(0, f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), 0), S(0, f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..4b628606c82 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,46 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_2(inout f16mat4x3 target, f16mat4x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; + target[3u] = value_param[3u]; +} +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + tint_store_and_preserve_padding_2(target.m, value_param.m); + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + tint_store_and_preserve_padding_2(s[3].m, u[2].m); + s[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..64a55a72055 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,15 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat3x4 t = transpose(u[2].m); + float l = length(u[0].m[1].zxy); + float a = abs(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..e94b2d4ce30 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,27 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(mat4x3 m) { +} +void d(vec3 v) { +} +void e(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].zxy); + e(u[0].m[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..c40f3bf7cb3 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)), 0), S(0, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)), 0), S(0, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)), 0), S(0, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..ef3ce1a2001 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,45 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4x3 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_2(inout mat4x3 target, mat4x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; + target[3u] = value_param[3u]; +} +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + tint_store_and_preserve_padding_2(target.m, value_param.m); + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + tint_store_and_preserve_padding_2(s[3].m, u[2].m); + s[1].m[0] = u[0].m[1].zxy; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..af96480aa21 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat4 t = transpose(u[2].m); + float16_t l = length(u[0].m[1].ywxz); + float16_t a = abs(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..96c867c7d73 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,28 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(f16mat4 m) { +} +void d(f16vec4 v) { +} +void e(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].ywxz); + e(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..1060ac95db1 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), 0), S(0, f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), 0), S(0, f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), 0), S(0, f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..d19c7d35c95 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,40 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + f16mat4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..38649e16164 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,15 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat4 t = transpose(u[2].m); + float l = length(u[0].m[1].ywxz); + float a = abs(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..8a7223827ce 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,27 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +void a(S a_1[4]) { +} +void b(S s) { +} +void c(mat4 m) { +} +void d(vec4 v) { +} +void e(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[2]); + c(u[2].m); + d(u[0].m[1].ywxz); + e(u[0].m[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..25656eab41c 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S p[4] = S[4](S(0, mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)), 0), S(0, mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)), 0), S(0, mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)), 0), S(0, mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)), 0)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[2]; + p[3].m = u[2].m; + p[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..5f0e0666dff 100644 --- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,39 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int before; + mat4 m; + int after; +}; -tint executable returned error: signal: illegal instruction +uniform S u[4]; +S s[4]; +void tint_store_and_preserve_padding_1(inout S target, S value_param) { + target.before = value_param.before; + target.m = value_param.m; + target.after = value_param.after; +} +void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) { + { + uint v = 0u; + v = 0u; + while(true) { + uint v_1 = v; + if ((v_1 >= 4u)) { + break; + } + tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]); + { + v = (v_1 + 1u); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + tint_store_and_preserve_padding_1(s[1], u[2]); + s[3].m = u[2].m; + s[1].m[0] = u[0].m[1].ywxz; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..6bfe4b5dbfb 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat2 t = transpose(u); + float16_t l = length(u[1]); + float16_t a = abs(u[0].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..914e8bd92c2 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2 u; +void a(f16mat2 m) { +} +void b(f16vec2 v) { +} +void c(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].yx); + c(u[1].x); + c(u[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..83de027da99 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2 u; +f16mat2 p = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].yx; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..e266aac8054 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2 u; +f16mat2 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].yx; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..a564021062d 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat2 t = transpose(u); + float l = length(u[1]); + float a = abs(u[0].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..b1587327f3b 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2 u; +void a(mat2 m) { +} +void b(vec2 v) { +} +void c(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].yx); + c(u[1].x); + c(u[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..2b7523c1946 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2 u; +mat2 p = mat2(vec2(0.0f), vec2(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].yx; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..5f9f438bea0 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2 u; +mat2 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].yx; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..0b91c844f52 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x3 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat3x2 t = transpose(u); + float16_t l = length(u[1]); + float16_t a = abs(u[0].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..e0024ba554c 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x3 u; +void a(f16mat2x3 m) { +} +void b(f16vec3 v) { +} +void c(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].zxy); + c(u[1].x); + c(u[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..0c36ca196b6 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x3 u; +f16mat2x3 p = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].zxy; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..47e1153dc62 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x3 u; +f16mat2x3 s; +void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + s[1] = u[0]; + s[1] = u[0].zxy; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..47f215d9451 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x3 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat3x2 t = transpose(u); + float l = length(u[1]); + float a = abs(u[0].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..392cff5d1fb 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x3 u; +void a(mat2x3 m) { +} +void b(vec3 v) { +} +void c(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].zxy); + c(u[1].x); + c(u[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..e3a31eaaa91 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x3 u; +mat2x3 p = mat2x3(vec3(0.0f), vec3(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].zxy; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..336f55ab2f3 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,15 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x3 u; +mat2x3 s; +void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + s[1] = u[0]; + s[1] = u[0].zxy; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..d5461cfeb63 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x4 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat4x2 t = transpose(u); + float16_t l = length(u[1]); + float16_t a = abs(u[0].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..31b2df75175 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x4 u; +void a(f16mat2x4 m) { +} +void b(f16vec4 v) { +} +void c(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].ywxz); + c(u[1].x); + c(u[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..6305d718d04 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x4 u; +f16mat2x4 p = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].ywxz; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..ff74846cab9 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat2x4 u; +f16mat2x4 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].ywxz; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..00ec9209fb5 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x4 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat4x2 t = transpose(u); + float l = length(u[1]); + float a = abs(u[0].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..8872cf96494 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x4 u; +void a(mat2x4 m) { +} +void b(vec4 v) { +} +void c(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].ywxz); + c(u[1].x); + c(u[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..c0519ad072b 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x4 u; +mat2x4 p = mat2x4(vec4(0.0f), vec4(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].ywxz; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..4aa67b72a42 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat2x4 u; +mat2x4 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].ywxz; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..4b5f84ab123 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3x2 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat2x3 t = transpose(u); + float16_t l = length(u[1]); + float16_t a = abs(u[0].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..5c4d2c8bb9d 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3x2 u; +void a(f16mat3x2 m) { +} +void b(f16vec2 v) { +} +void c(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].yx); + c(u[1].x); + c(u[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..9af38a8f878 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3x2 u; +f16mat3x2 p = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].yx; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..321b3636e48 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3x2 u; +f16mat3x2 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].yx; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..77cfa1a440b 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x2 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat2x3 t = transpose(u); + float l = length(u[1]); + float a = abs(u[0].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..755ef4659c6 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x2 u; +void a(mat3x2 m) { +} +void b(vec2 v) { +} +void c(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].yx); + c(u[1].x); + c(u[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..e9650bda440 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x2 u; +mat3x2 p = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].yx; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..e6a285d5b23 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x2 u; +mat3x2 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].yx; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..b65ee0edc33 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat3 t = transpose(u); + float16_t l = length(u[1]); + float16_t a = abs(u[0].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..ed143bc53cf 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3 u; +void a(f16mat3 m) { +} +void b(f16vec3 v) { +} +void c(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].zxy); + c(u[1].x); + c(u[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..67012bfcdd9 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3 u; +f16mat3 p = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].zxy; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..e1bd36c1f33 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3 u; +f16mat3 s; +void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + s[1] = u[0]; + s[1] = u[0].zxy; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..63b41a2c163 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat3 t = transpose(u); + float l = length(u[1]); + float a = abs(u[0].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..bc86315a767 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3 u; +void a(mat3 m) { +} +void b(vec3 v) { +} +void c(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].zxy); + c(u[1].x); + c(u[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..81c1ec1ee71 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3 u; +mat3 p = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].zxy; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..4dd0b58382a 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3 u; +mat3 s; +void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + s[1] = u[0]; + s[1] = u[0].zxy; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..a7861f92aef 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3x4 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat4x3 t = transpose(u); + float16_t l = length(u[1]); + float16_t a = abs(u[0].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..9027ccf88a2 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3x4 u; +void a(f16mat3x4 m) { +} +void b(f16vec4 v) { +} +void c(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].ywxz); + c(u[1].x); + c(u[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..0f376d1bcd4 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3x4 u; +f16mat3x4 p = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].ywxz; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..7bda4f211c4 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat3x4 u; +f16mat3x4 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].ywxz; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..83e9ed82be7 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x4 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat4x3 t = transpose(u); + float l = length(u[1]); + float a = abs(u[0].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..c1bb67ebf85 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x4 u; +void a(mat3x4 m) { +} +void b(vec4 v) { +} +void c(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].ywxz); + c(u[1].x); + c(u[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..a5c2c5669d0 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x4 u; +mat3x4 p = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].ywxz; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..34fe33048cc 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat3x4 u; +mat3x4 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].ywxz; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..c42b2678cf3 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x2 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat2x4 t = transpose(u); + float16_t l = length(u[1]); + float16_t a = abs(u[0].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..da702d7708a 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x2 u; +void a(f16mat4x2 m) { +} +void b(f16vec2 v) { +} +void c(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].yx); + c(u[1].x); + c(u[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..633b31b9d62 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x2 u; +f16mat4x2 p = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].yx; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..e107015d9ee 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x2 u; +f16mat4x2 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].yx; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..39656fb5e39 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x2 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat2x4 t = transpose(u); + float l = length(u[1]); + float a = abs(u[0].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..06f26cd595d 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x2 u; +void a(mat4x2 m) { +} +void b(vec2 v) { +} +void c(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].yx); + c(u[1].x); + c(u[1].yx[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..afe8a0ce081 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x2 u; +mat4x2 p = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].yx; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..deb1b1ff522 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x2 u; +mat4x2 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].yx; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..920bf0f8a4c 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x3 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat3x4 t = transpose(u); + float16_t l = length(u[1]); + float16_t a = abs(u[0].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..a37f7b1ceba 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x3 u; +void a(f16mat4x3 m) { +} +void b(f16vec3 v) { +} +void c(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].zxy); + c(u[1].x); + c(u[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..7f9029b0a70 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x3 u; +f16mat4x3 p = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].zxy; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..b900f61bf11 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4x3 u; +f16mat4x3 s; +void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; + target[3u] = value_param[3u]; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + s[1] = u[0]; + s[1] = u[0].zxy; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..94f2a0b909b 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x3 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat3x4 t = transpose(u); + float l = length(u[1]); + float a = abs(u[0].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..80f9ab5c079 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x3 u; +void a(mat4x3 m) { +} +void b(vec3 v) { +} +void c(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].zxy); + c(u[1].x); + c(u[1].zxy[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..2f3a9a7d44b 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x3 u; +mat4x3 p = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].zxy; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.glsl index 72ca17c386c..5722166d128 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4x3 u; +mat4x3 s; +void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) { + target[0u] = value_param[0u]; + target[1u] = value_param[1u]; + target[2u] = value_param[2u]; + target[3u] = value_param[3u]; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + tint_store_and_preserve_padding(s, u); + s[1] = u[0]; + s[1] = u[0].zxy; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..77c0d488ba8 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16mat4 t = transpose(u); + float16_t l = length(u[1]); + float16_t a = abs(u[0].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..d1ed8715ff1 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,18 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4 u; +void a(f16mat4 m) { +} +void b(f16vec4 v) { +} +void c(float16_t f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].ywxz); + c(u[1].x); + c(u[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..ffadbefb908 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4 u; +f16mat4 p = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].ywxz; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..0aac06810cb 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,12 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform f16mat4 u; +f16mat4 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].ywxz; + s[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl index 6c6485eeae3..ae46e0ff805 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBuiltinCall -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4 u; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat4 t = transpose(u); + float l = length(u[1]); + float a = abs(u[0].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.glsl index 72ca17c386c..d9ac9befbbb 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_fn.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4 u; +void a(mat4 m) { +} +void b(vec4 v) { +} +void c(float f) { +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + a(u); + b(u[1]); + b(u[1].ywxz); + c(u[1].x); + c(u[1].ywxz[0u]); +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.glsl index d4bb1c94be9..2e8f11f0550 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_private.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4 u; +mat4 p = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + p = u; + p[1] = u[0]; + p[1] = u[0].ywxz; + p[0][1] = u[1].x; +} diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.glsl index d4bb1c94be9..2496a6fe986 100644 --- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.glsl +++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f32/to_storage.wgsl.expected.ir.glsl @@ -1,11 +1,11 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uniform mat4 u; +mat4 s; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + s = u; + s[1] = u[0]; + s[1] = u[0].ywxz; + s[0][1] = u[1].x; +} diff --git a/test/tint/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.ir.glsl b/test/tint/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.ir.glsl index d4bb1c94be9..e0818218d49 100644 --- a/test/tint/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/dyn_array_idx/read/uniform.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct UBO { + ivec4 data[4]; + int dynamic_idx; +}; -tint executable returned error: signal: illegal instruction +struct Result { + int tint_symbol; +}; + +uniform UBO ubo; +Result result; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + result.tint_symbol = ubo.data[ubo.dynamic_idx].x; +} diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.glsl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.glsl index 12687490197..a0caab4688b 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct Uniforms { + uint i; + uint j; +}; -tint executable returned error: signal: illegal instruction +uniform Uniforms uniforms; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat2x4 m1 = mat2x4(vec4(0.0f), vec4(0.0f)); + m1[uniforms.i][0] = 1.0f; +} diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.glsl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.glsl index 12687490197..497c41c41d7 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct Uniforms { + uint i; + uint j; +}; -tint executable returned error: signal: illegal instruction +uniform Uniforms uniforms; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + mat2x4 m1 = mat2x4(vec4(0.0f), vec4(0.0f)); + m1[uniforms.i][uniforms.j] = 1.0f; +} diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.glsl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.glsl index 12687490197..6989480081a 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct Uniforms { + uint i; + uint j; +}; -tint executable returned error: signal: illegal instruction +uniform Uniforms uniforms; +mat2x4 m1 = mat2x4(vec4(0.0f), vec4(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + m1[0][uniforms.j] = 1.0f; +} diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.glsl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.glsl index 12687490197..dae10e85c76 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct Uniforms { + uint i; + uint j; +}; -tint executable returned error: signal: illegal instruction +uniform Uniforms uniforms; +mat2x4 m1 = mat2x4(vec4(0.0f), vec4(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + m1[uniforms.i][0] = 1.0f; +} diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.glsl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.glsl index 12687490197..3a421fbdbfe 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct Uniforms { + uint i; + uint j; +}; -tint executable returned error: signal: illegal instruction +uniform Uniforms uniforms; +mat2x4 m1 = mat2x4(vec4(0.0f), vec4(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + m1[uniforms.i][uniforms.j] = 1.0f; +} diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.glsl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.glsl index 12687490197..6989480081a 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.glsl @@ -1,11 +1,13 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct Uniforms { + uint i; + uint j; +}; -tint executable returned error: signal: illegal instruction +uniform Uniforms uniforms; +mat2x4 m1 = mat2x4(vec4(0.0f), vec4(0.0f)); +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + m1[0][uniforms.j] = 1.0f; +} diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.glsl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.glsl index 04804312221..b7cc5a4e16d 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.glsl @@ -1,11 +1,42 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Loop -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +vec2 v2f = vec2(0.0f); +ivec3 v3i = ivec3(0); +uvec4 v4u = uvec4(0u); +bvec2 v2b = bvec2(false); +void foo() { + { + int i = 0; + while(true) { + if ((i < 2)) { + } else { + break; + } + v2f[i] = 1.0f; + v3i[i] = 1; + v4u[i] = 1u; + v2b[i] = true; + { + i = (i + 1); + } + continue; + } + } +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + { + int i = 0; + while(true) { + if ((i < 2)) { + } else { + break; + } + foo(); + { + i = (i + 1); + } + continue; + } + } +} diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.glsl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.glsl index 12687490197..6068cbadeef 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.glsl @@ -1,11 +1,30 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +vec2 v2f = vec2(0.0f); +ivec3 v3i = ivec3(0); +uvec4 v4u = uvec4(0u); +bvec2 v2b = bvec2(false); +void foo() { + int i = 0; + v2f[i] = 1.0f; + v3i[i] = 1; + v4u[i] = 1u; + v2b[i] = true; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + { + int i = 0; + while(true) { + if ((i < 2)) { + } else { + break; + } + foo(); + { + i = (i + 1); + } + continue; + } + } +} diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.ir.glsl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.ir.glsl index 04804312221..1a7a52b0c7c 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.ir.glsl @@ -1,11 +1,42 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Loop -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + vec2 v2f = vec2(0.0f); + vec3 v3f = vec3(0.0f); + vec4 v4f = vec4(0.0f); + ivec2 v2i = ivec2(0); + ivec3 v3i = ivec3(0); + ivec4 v4i = ivec4(0); + uvec2 v2u = uvec2(0u); + uvec3 v3u = uvec3(0u); + uvec4 v4u = uvec4(0u); + bvec2 v2b = bvec2(false); + bvec3 v3b = bvec3(false); + bvec4 v4b = bvec4(false); + { + int i = 0; + while(true) { + if ((i < 2)) { + } else { + break; + } + v2f[i] = 1.0f; + v3f[i] = 1.0f; + v4f[i] = 1.0f; + v2i[i] = 1; + v3i[i] = 1; + v4i[i] = 1; + v2u[i] = 1u; + v3u[i] = 1u; + v4u[i] = 1u; + v2b[i] = true; + v3b[i] = true; + v4b[i] = true; + { + i = (i + 1); + } + continue; + } + } +} diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.ir.glsl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.ir.glsl index 04804312221..35cd9354301 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.ir.glsl @@ -1,11 +1,34 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Loop -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + vec2 v2f = vec2(0.0f); + vec2 v2f_2 = vec2(0.0f); + ivec3 v3i = ivec3(0); + ivec3 v3i_2 = ivec3(0); + uvec4 v4u = uvec4(0u); + uvec4 v4u_2 = uvec4(0u); + bvec2 v2b = bvec2(false); + bvec2 v2b_2 = bvec2(false); + { + int i = 0; + while(true) { + if ((i < 2)) { + } else { + break; + } + v2f[i] = 1.0f; + v3i[i] = 1; + v4u[i] = 1u; + v2b[i] = true; + v2f_2[i] = 1.0f; + v3i_2[i] = 1; + v4u_2[i] = 1u; + v2b_2[i] = true; + { + i = (i + 1); + } + continue; + } + } +} diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.ir.glsl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.ir.glsl index 04804312221..c24ea24f08b 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.ir.glsl @@ -1,11 +1,43 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Loop -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + vec2 v2f = vec2(0.0f); + vec3 v3f = vec3(0.0f); + vec4 v4f = vec4(0.0f); + ivec2 v2i = ivec2(0); + ivec3 v3i = ivec3(0); + ivec4 v4i = ivec4(0); + uvec2 v2u = uvec2(0u); + uvec3 v3u = uvec3(0u); + uvec4 v4u = uvec4(0u); + bvec2 v2b = bvec2(false); + bvec3 v3b = bvec3(false); + bvec4 v4b = bvec4(false); + { + int i = 0; + while(true) { + if ((i < 2)) { + } else { + break; + } + v2f[i] = 1.0f; + v2i[i] = 1; + v2u[i] = 1u; + v2b[i] = true; + { + i = (i + 1); + } + continue; + } + } + int i = 0; + v3f[i] = 1.0f; + v4f[i] = 1.0f; + v3i[i] = 1; + v4i[i] = 1; + v3u[i] = 1u; + v4u[i] = 1u; + v3b[i] = true; + v4b[i] = true; +} diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.ir.glsl b/test/tint/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.ir.glsl index 12687490197..7b6e49a6d3e 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.ir.glsl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.ir.glsl @@ -1,11 +1,30 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + vec2 v2f = vec2(0.0f); + vec3 v3f = vec3(0.0f); + vec4 v4f = vec4(0.0f); + ivec2 v2i = ivec2(0); + ivec3 v3i = ivec3(0); + ivec4 v4i = ivec4(0); + uvec2 v2u = uvec2(0u); + uvec3 v3u = uvec3(0u); + uvec4 v4u = uvec4(0u); + bvec2 v2b = bvec2(false); + bvec3 v3b = bvec3(false); + bvec4 v4b = bvec4(false); + int i = 0; + v2f[i] = 1.0f; + v3f[i] = 1.0f; + v4f[i] = 1.0f; + v2i[i] = 1; + v3i[i] = 1; + v4i[i] = 1; + v2u[i] = 1u; + v3u[i] = 1u; + v4u[i] = 1u; + v2b[i] = true; + v3b[i] = true; + v4b[i] = true; +} diff --git a/test/tint/bug/tint/2146.wgsl.expected.ir.glsl b/test/tint/bug/tint/2146.wgsl.expected.ir.glsl index 4a20bc7c4e6..94731d88506 100644 --- a/test/tint/bug/tint/2146.wgsl.expected.ir.glsl +++ b/test/tint/bug/tint/2146.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uvec3 localId = uvec3(0u); +uint localIndex = 0u; +uvec3 globalId = uvec3(0u); +uvec3 numWorkgroups = uvec3(0u); +uvec3 workgroupId = uvec3(0u); +uint globalId2Index() { + return globalId.x; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + f16vec4 a = f16vec4(0.0hf); + float16_t b = 1.0hf; + a[0] = (a.x + b); +} diff --git a/test/tint/bug/tint/219.spvasm.expected.ir.glsl b/test/tint/bug/tint/219.spvasm.expected.ir.glsl index 4a20bc7c4e6..0564a292d92 100644 --- a/test/tint/bug/tint/219.spvasm.expected.ir.glsl +++ b/test/tint/bug/tint/219.spvasm.expected.ir.glsl @@ -1,11 +1,14 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +float x_200(inout vec2 x_201) { + float x_212 = x_201.x; + return x_212; +} +void main_1() { + vec2 x_11 = vec2(0.0f); + float x_12 = x_200(x_11); +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + main_1(); +} diff --git a/test/tint/expressions/index/var/let/literal/vector.wgsl.expected.ir.glsl b/test/tint/expressions/index/var/let/literal/vector.wgsl.expected.ir.glsl index 4a20bc7c4e6..b6cfdca6560 100644 --- a/test/tint/expressions/index/var/let/literal/vector.wgsl.expected.ir.glsl +++ b/test/tint/expressions/index/var/let/literal/vector.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +float f() { + vec3 v = vec3(1.0f, 2.0f, 3.0f); + int i = 1; + return v[i]; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/index/var/let/param/vector.wgsl.expected.ir.glsl b/test/tint/expressions/index/var/let/param/vector.wgsl.expected.ir.glsl index 4a20bc7c4e6..69600ece89d 100644 --- a/test/tint/expressions/index/var/let/param/vector.wgsl.expected.ir.glsl +++ b/test/tint/expressions/index/var/let/param/vector.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +float f(int x) { + vec3 v = vec3(1.0f, 2.0f, 3.0f); + int i = x; + return v[i]; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/index/var/literal/vector.wgsl.expected.ir.glsl b/test/tint/expressions/index/var/literal/vector.wgsl.expected.ir.glsl index 4a20bc7c4e6..ed6fdc1312a 100644 --- a/test/tint/expressions/index/var/literal/vector.wgsl.expected.ir.glsl +++ b/test/tint/expressions/index/var/literal/vector.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +float f() { + vec3 v = vec3(1.0f, 2.0f, 3.0f); + return v.y; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/index/var/param/vector.wgsl.expected.ir.glsl b/test/tint/expressions/index/var/param/vector.wgsl.expected.ir.glsl index 4a20bc7c4e6..9ad37008cc7 100644 --- a/test/tint/expressions/index/var/param/vector.wgsl.expected.ir.glsl +++ b/test/tint/expressions/index/var/param/vector.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +float f(int i) { + vec3 v = vec3(1.0f, 2.0f, 3.0f); + return v[i]; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/index/var/struct_with_matrix.wgsl.expected.ir.glsl b/test/tint/expressions/index/var/struct_with_matrix.wgsl.expected.ir.glsl index 4a20bc7c4e6..815503d7db8 100644 --- a/test/tint/expressions/index/var/struct_with_matrix.wgsl.expected.ir.glsl +++ b/test/tint/expressions/index/var/struct_with_matrix.wgsl.expected.ir.glsl @@ -1,11 +1,14 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int m; + mat4 n; +}; -tint executable returned error: signal: illegal instruction +float f() { + S a = S(0, mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f))); + return a.n[2].y; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/index/var/struct_with_vector.wgsl.expected.ir.glsl b/test/tint/expressions/index/var/struct_with_vector.wgsl.expected.ir.glsl index 4a20bc7c4e6..88391edd723 100644 --- a/test/tint/expressions/index/var/struct_with_vector.wgsl.expected.ir.glsl +++ b/test/tint/expressions/index/var/struct_with_vector.wgsl.expected.ir.glsl @@ -1,11 +1,14 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + int m; + uvec3 n; +}; -tint executable returned error: signal: illegal instruction +uint f() { + S a = S(0, uvec3(0u)); + return a.n.z; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/read/packed_vec3/f16.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/read/packed_vec3/f16.wgsl.expected.ir.glsl index 72ca17c386c..516661b5a64 100644 --- a/test/tint/expressions/swizzle/read/packed_vec3/f16.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/read/packed_vec3/f16.wgsl.expected.ir.glsl @@ -1,11 +1,134 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + f16vec3 v; +}; -tint executable returned error: signal: illegal instruction +uniform S U; +void f() { + f16vec3 v = U.v; + float16_t x = U.v.x; + float16_t y = U.v.y; + float16_t z = U.v.z; + f16vec2 xx = U.v.xx; + f16vec2 xy = U.v.xy; + f16vec2 xz = U.v.xz; + f16vec2 yx = U.v.yx; + f16vec2 yy = U.v.yy; + f16vec2 yz = U.v.yz; + f16vec2 zx = U.v.zx; + f16vec2 zy = U.v.zy; + f16vec2 zz = U.v.zz; + f16vec3 xxx = U.v.xxx; + f16vec3 xxy = U.v.xxy; + f16vec3 xxz = U.v.xxz; + f16vec3 xyx = U.v.xyx; + f16vec3 xyy = U.v.xyy; + f16vec3 xyz = U.v.xyz; + f16vec3 xzx = U.v.xzx; + f16vec3 xzy = U.v.xzy; + f16vec3 xzz = U.v.xzz; + f16vec3 yxx = U.v.yxx; + f16vec3 yxy = U.v.yxy; + f16vec3 yxz = U.v.yxz; + f16vec3 yyx = U.v.yyx; + f16vec3 yyy = U.v.yyy; + f16vec3 yyz = U.v.yyz; + f16vec3 yzx = U.v.yzx; + f16vec3 yzy = U.v.yzy; + f16vec3 yzz = U.v.yzz; + f16vec3 zxx = U.v.zxx; + f16vec3 zxy = U.v.zxy; + f16vec3 zxz = U.v.zxz; + f16vec3 zyx = U.v.zyx; + f16vec3 zyy = U.v.zyy; + f16vec3 zyz = U.v.zyz; + f16vec3 zzx = U.v.zzx; + f16vec3 zzy = U.v.zzy; + f16vec3 zzz = U.v.zzz; + f16vec4 xxxx = U.v.xxxx; + f16vec4 xxxy = U.v.xxxy; + f16vec4 xxxz = U.v.xxxz; + f16vec4 xxyx = U.v.xxyx; + f16vec4 xxyy = U.v.xxyy; + f16vec4 xxyz = U.v.xxyz; + f16vec4 xxzx = U.v.xxzx; + f16vec4 xxzy = U.v.xxzy; + f16vec4 xxzz = U.v.xxzz; + f16vec4 xyxx = U.v.xyxx; + f16vec4 xyxy = U.v.xyxy; + f16vec4 xyxz = U.v.xyxz; + f16vec4 xyyx = U.v.xyyx; + f16vec4 xyyy = U.v.xyyy; + f16vec4 xyyz = U.v.xyyz; + f16vec4 xyzx = U.v.xyzx; + f16vec4 xyzy = U.v.xyzy; + f16vec4 xyzz = U.v.xyzz; + f16vec4 xzxx = U.v.xzxx; + f16vec4 xzxy = U.v.xzxy; + f16vec4 xzxz = U.v.xzxz; + f16vec4 xzyx = U.v.xzyx; + f16vec4 xzyy = U.v.xzyy; + f16vec4 xzyz = U.v.xzyz; + f16vec4 xzzx = U.v.xzzx; + f16vec4 xzzy = U.v.xzzy; + f16vec4 xzzz = U.v.xzzz; + f16vec4 yxxx = U.v.yxxx; + f16vec4 yxxy = U.v.yxxy; + f16vec4 yxxz = U.v.yxxz; + f16vec4 yxyx = U.v.yxyx; + f16vec4 yxyy = U.v.yxyy; + f16vec4 yxyz = U.v.yxyz; + f16vec4 yxzx = U.v.yxzx; + f16vec4 yxzy = U.v.yxzy; + f16vec4 yxzz = U.v.yxzz; + f16vec4 yyxx = U.v.yyxx; + f16vec4 yyxy = U.v.yyxy; + f16vec4 yyxz = U.v.yyxz; + f16vec4 yyyx = U.v.yyyx; + f16vec4 yyyy = U.v.yyyy; + f16vec4 yyyz = U.v.yyyz; + f16vec4 yyzx = U.v.yyzx; + f16vec4 yyzy = U.v.yyzy; + f16vec4 yyzz = U.v.yyzz; + f16vec4 yzxx = U.v.yzxx; + f16vec4 yzxy = U.v.yzxy; + f16vec4 yzxz = U.v.yzxz; + f16vec4 yzyx = U.v.yzyx; + f16vec4 yzyy = U.v.yzyy; + f16vec4 yzyz = U.v.yzyz; + f16vec4 yzzx = U.v.yzzx; + f16vec4 yzzy = U.v.yzzy; + f16vec4 yzzz = U.v.yzzz; + f16vec4 zxxx = U.v.zxxx; + f16vec4 zxxy = U.v.zxxy; + f16vec4 zxxz = U.v.zxxz; + f16vec4 zxyx = U.v.zxyx; + f16vec4 zxyy = U.v.zxyy; + f16vec4 zxyz = U.v.zxyz; + f16vec4 zxzx = U.v.zxzx; + f16vec4 zxzy = U.v.zxzy; + f16vec4 zxzz = U.v.zxzz; + f16vec4 zyxx = U.v.zyxx; + f16vec4 zyxy = U.v.zyxy; + f16vec4 zyxz = U.v.zyxz; + f16vec4 zyyx = U.v.zyyx; + f16vec4 zyyy = U.v.zyyy; + f16vec4 zyyz = U.v.zyyz; + f16vec4 zyzx = U.v.zyzx; + f16vec4 zyzy = U.v.zyzy; + f16vec4 zyzz = U.v.zyzz; + f16vec4 zzxx = U.v.zzxx; + f16vec4 zzxy = U.v.zzxy; + f16vec4 zzxz = U.v.zzxz; + f16vec4 zzyx = U.v.zzyx; + f16vec4 zzyy = U.v.zzyy; + f16vec4 zzyz = U.v.zzyz; + f16vec4 zzzx = U.v.zzzx; + f16vec4 zzzy = U.v.zzzy; + f16vec4 zzzz = U.v.zzzz; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.ir.glsl index 72ca17c386c..694870a5597 100644 --- a/test/tint/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/read/packed_vec3/f32.wgsl.expected.ir.glsl @@ -1,11 +1,133 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + vec3 v; +}; -tint executable returned error: signal: illegal instruction +uniform S U; +void f() { + vec3 v = U.v; + float x = U.v.x; + float y = U.v.y; + float z = U.v.z; + vec2 xx = U.v.xx; + vec2 xy = U.v.xy; + vec2 xz = U.v.xz; + vec2 yx = U.v.yx; + vec2 yy = U.v.yy; + vec2 yz = U.v.yz; + vec2 zx = U.v.zx; + vec2 zy = U.v.zy; + vec2 zz = U.v.zz; + vec3 xxx = U.v.xxx; + vec3 xxy = U.v.xxy; + vec3 xxz = U.v.xxz; + vec3 xyx = U.v.xyx; + vec3 xyy = U.v.xyy; + vec3 xyz = U.v.xyz; + vec3 xzx = U.v.xzx; + vec3 xzy = U.v.xzy; + vec3 xzz = U.v.xzz; + vec3 yxx = U.v.yxx; + vec3 yxy = U.v.yxy; + vec3 yxz = U.v.yxz; + vec3 yyx = U.v.yyx; + vec3 yyy = U.v.yyy; + vec3 yyz = U.v.yyz; + vec3 yzx = U.v.yzx; + vec3 yzy = U.v.yzy; + vec3 yzz = U.v.yzz; + vec3 zxx = U.v.zxx; + vec3 zxy = U.v.zxy; + vec3 zxz = U.v.zxz; + vec3 zyx = U.v.zyx; + vec3 zyy = U.v.zyy; + vec3 zyz = U.v.zyz; + vec3 zzx = U.v.zzx; + vec3 zzy = U.v.zzy; + vec3 zzz = U.v.zzz; + vec4 xxxx = U.v.xxxx; + vec4 xxxy = U.v.xxxy; + vec4 xxxz = U.v.xxxz; + vec4 xxyx = U.v.xxyx; + vec4 xxyy = U.v.xxyy; + vec4 xxyz = U.v.xxyz; + vec4 xxzx = U.v.xxzx; + vec4 xxzy = U.v.xxzy; + vec4 xxzz = U.v.xxzz; + vec4 xyxx = U.v.xyxx; + vec4 xyxy = U.v.xyxy; + vec4 xyxz = U.v.xyxz; + vec4 xyyx = U.v.xyyx; + vec4 xyyy = U.v.xyyy; + vec4 xyyz = U.v.xyyz; + vec4 xyzx = U.v.xyzx; + vec4 xyzy = U.v.xyzy; + vec4 xyzz = U.v.xyzz; + vec4 xzxx = U.v.xzxx; + vec4 xzxy = U.v.xzxy; + vec4 xzxz = U.v.xzxz; + vec4 xzyx = U.v.xzyx; + vec4 xzyy = U.v.xzyy; + vec4 xzyz = U.v.xzyz; + vec4 xzzx = U.v.xzzx; + vec4 xzzy = U.v.xzzy; + vec4 xzzz = U.v.xzzz; + vec4 yxxx = U.v.yxxx; + vec4 yxxy = U.v.yxxy; + vec4 yxxz = U.v.yxxz; + vec4 yxyx = U.v.yxyx; + vec4 yxyy = U.v.yxyy; + vec4 yxyz = U.v.yxyz; + vec4 yxzx = U.v.yxzx; + vec4 yxzy = U.v.yxzy; + vec4 yxzz = U.v.yxzz; + vec4 yyxx = U.v.yyxx; + vec4 yyxy = U.v.yyxy; + vec4 yyxz = U.v.yyxz; + vec4 yyyx = U.v.yyyx; + vec4 yyyy = U.v.yyyy; + vec4 yyyz = U.v.yyyz; + vec4 yyzx = U.v.yyzx; + vec4 yyzy = U.v.yyzy; + vec4 yyzz = U.v.yyzz; + vec4 yzxx = U.v.yzxx; + vec4 yzxy = U.v.yzxy; + vec4 yzxz = U.v.yzxz; + vec4 yzyx = U.v.yzyx; + vec4 yzyy = U.v.yzyy; + vec4 yzyz = U.v.yzyz; + vec4 yzzx = U.v.yzzx; + vec4 yzzy = U.v.yzzy; + vec4 yzzz = U.v.yzzz; + vec4 zxxx = U.v.zxxx; + vec4 zxxy = U.v.zxxy; + vec4 zxxz = U.v.zxxz; + vec4 zxyx = U.v.zxyx; + vec4 zxyy = U.v.zxyy; + vec4 zxyz = U.v.zxyz; + vec4 zxzx = U.v.zxzx; + vec4 zxzy = U.v.zxzy; + vec4 zxzz = U.v.zxzz; + vec4 zyxx = U.v.zyxx; + vec4 zyxy = U.v.zyxy; + vec4 zyxz = U.v.zyxz; + vec4 zyyx = U.v.zyyx; + vec4 zyyy = U.v.zyyy; + vec4 zyyz = U.v.zyyz; + vec4 zyzx = U.v.zyzx; + vec4 zyzy = U.v.zyzy; + vec4 zyzz = U.v.zyzz; + vec4 zzxx = U.v.zzxx; + vec4 zzxy = U.v.zzxy; + vec4 zzxz = U.v.zzxz; + vec4 zzyx = U.v.zzyx; + vec4 zzyy = U.v.zzyy; + vec4 zzyz = U.v.zzyz; + vec4 zzzx = U.v.zzzx; + vec4 zzzy = U.v.zzzy; + vec4 zzzz = U.v.zzzz; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.ir.glsl index 72ca17c386c..3ace88918fc 100644 --- a/test/tint/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/read/packed_vec3/i32.wgsl.expected.ir.glsl @@ -1,11 +1,133 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + ivec3 v; +}; -tint executable returned error: signal: illegal instruction +uniform S U; +void f() { + ivec3 v = U.v; + int x = U.v.x; + int y = U.v.y; + int z = U.v.z; + ivec2 xx = U.v.xx; + ivec2 xy = U.v.xy; + ivec2 xz = U.v.xz; + ivec2 yx = U.v.yx; + ivec2 yy = U.v.yy; + ivec2 yz = U.v.yz; + ivec2 zx = U.v.zx; + ivec2 zy = U.v.zy; + ivec2 zz = U.v.zz; + ivec3 xxx = U.v.xxx; + ivec3 xxy = U.v.xxy; + ivec3 xxz = U.v.xxz; + ivec3 xyx = U.v.xyx; + ivec3 xyy = U.v.xyy; + ivec3 xyz = U.v.xyz; + ivec3 xzx = U.v.xzx; + ivec3 xzy = U.v.xzy; + ivec3 xzz = U.v.xzz; + ivec3 yxx = U.v.yxx; + ivec3 yxy = U.v.yxy; + ivec3 yxz = U.v.yxz; + ivec3 yyx = U.v.yyx; + ivec3 yyy = U.v.yyy; + ivec3 yyz = U.v.yyz; + ivec3 yzx = U.v.yzx; + ivec3 yzy = U.v.yzy; + ivec3 yzz = U.v.yzz; + ivec3 zxx = U.v.zxx; + ivec3 zxy = U.v.zxy; + ivec3 zxz = U.v.zxz; + ivec3 zyx = U.v.zyx; + ivec3 zyy = U.v.zyy; + ivec3 zyz = U.v.zyz; + ivec3 zzx = U.v.zzx; + ivec3 zzy = U.v.zzy; + ivec3 zzz = U.v.zzz; + ivec4 xxxx = U.v.xxxx; + ivec4 xxxy = U.v.xxxy; + ivec4 xxxz = U.v.xxxz; + ivec4 xxyx = U.v.xxyx; + ivec4 xxyy = U.v.xxyy; + ivec4 xxyz = U.v.xxyz; + ivec4 xxzx = U.v.xxzx; + ivec4 xxzy = U.v.xxzy; + ivec4 xxzz = U.v.xxzz; + ivec4 xyxx = U.v.xyxx; + ivec4 xyxy = U.v.xyxy; + ivec4 xyxz = U.v.xyxz; + ivec4 xyyx = U.v.xyyx; + ivec4 xyyy = U.v.xyyy; + ivec4 xyyz = U.v.xyyz; + ivec4 xyzx = U.v.xyzx; + ivec4 xyzy = U.v.xyzy; + ivec4 xyzz = U.v.xyzz; + ivec4 xzxx = U.v.xzxx; + ivec4 xzxy = U.v.xzxy; + ivec4 xzxz = U.v.xzxz; + ivec4 xzyx = U.v.xzyx; + ivec4 xzyy = U.v.xzyy; + ivec4 xzyz = U.v.xzyz; + ivec4 xzzx = U.v.xzzx; + ivec4 xzzy = U.v.xzzy; + ivec4 xzzz = U.v.xzzz; + ivec4 yxxx = U.v.yxxx; + ivec4 yxxy = U.v.yxxy; + ivec4 yxxz = U.v.yxxz; + ivec4 yxyx = U.v.yxyx; + ivec4 yxyy = U.v.yxyy; + ivec4 yxyz = U.v.yxyz; + ivec4 yxzx = U.v.yxzx; + ivec4 yxzy = U.v.yxzy; + ivec4 yxzz = U.v.yxzz; + ivec4 yyxx = U.v.yyxx; + ivec4 yyxy = U.v.yyxy; + ivec4 yyxz = U.v.yyxz; + ivec4 yyyx = U.v.yyyx; + ivec4 yyyy = U.v.yyyy; + ivec4 yyyz = U.v.yyyz; + ivec4 yyzx = U.v.yyzx; + ivec4 yyzy = U.v.yyzy; + ivec4 yyzz = U.v.yyzz; + ivec4 yzxx = U.v.yzxx; + ivec4 yzxy = U.v.yzxy; + ivec4 yzxz = U.v.yzxz; + ivec4 yzyx = U.v.yzyx; + ivec4 yzyy = U.v.yzyy; + ivec4 yzyz = U.v.yzyz; + ivec4 yzzx = U.v.yzzx; + ivec4 yzzy = U.v.yzzy; + ivec4 yzzz = U.v.yzzz; + ivec4 zxxx = U.v.zxxx; + ivec4 zxxy = U.v.zxxy; + ivec4 zxxz = U.v.zxxz; + ivec4 zxyx = U.v.zxyx; + ivec4 zxyy = U.v.zxyy; + ivec4 zxyz = U.v.zxyz; + ivec4 zxzx = U.v.zxzx; + ivec4 zxzy = U.v.zxzy; + ivec4 zxzz = U.v.zxzz; + ivec4 zyxx = U.v.zyxx; + ivec4 zyxy = U.v.zyxy; + ivec4 zyxz = U.v.zyxz; + ivec4 zyyx = U.v.zyyx; + ivec4 zyyy = U.v.zyyy; + ivec4 zyyz = U.v.zyyz; + ivec4 zyzx = U.v.zyzx; + ivec4 zyzy = U.v.zyzy; + ivec4 zyzz = U.v.zyzz; + ivec4 zzxx = U.v.zzxx; + ivec4 zzxy = U.v.zzxy; + ivec4 zzxz = U.v.zzxz; + ivec4 zzyx = U.v.zzyx; + ivec4 zzyy = U.v.zzyy; + ivec4 zzyz = U.v.zzyz; + ivec4 zzzx = U.v.zzzx; + ivec4 zzzy = U.v.zzzy; + ivec4 zzzz = U.v.zzzz; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.ir.glsl index 72ca17c386c..580ad7ab4f2 100644 --- a/test/tint/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/read/packed_vec3/u32.wgsl.expected.ir.glsl @@ -1,11 +1,133 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + uvec3 v; +}; -tint executable returned error: signal: illegal instruction +uniform S U; +void f() { + uvec3 v = U.v; + uint x = U.v.x; + uint y = U.v.y; + uint z = U.v.z; + uvec2 xx = U.v.xx; + uvec2 xy = U.v.xy; + uvec2 xz = U.v.xz; + uvec2 yx = U.v.yx; + uvec2 yy = U.v.yy; + uvec2 yz = U.v.yz; + uvec2 zx = U.v.zx; + uvec2 zy = U.v.zy; + uvec2 zz = U.v.zz; + uvec3 xxx = U.v.xxx; + uvec3 xxy = U.v.xxy; + uvec3 xxz = U.v.xxz; + uvec3 xyx = U.v.xyx; + uvec3 xyy = U.v.xyy; + uvec3 xyz = U.v.xyz; + uvec3 xzx = U.v.xzx; + uvec3 xzy = U.v.xzy; + uvec3 xzz = U.v.xzz; + uvec3 yxx = U.v.yxx; + uvec3 yxy = U.v.yxy; + uvec3 yxz = U.v.yxz; + uvec3 yyx = U.v.yyx; + uvec3 yyy = U.v.yyy; + uvec3 yyz = U.v.yyz; + uvec3 yzx = U.v.yzx; + uvec3 yzy = U.v.yzy; + uvec3 yzz = U.v.yzz; + uvec3 zxx = U.v.zxx; + uvec3 zxy = U.v.zxy; + uvec3 zxz = U.v.zxz; + uvec3 zyx = U.v.zyx; + uvec3 zyy = U.v.zyy; + uvec3 zyz = U.v.zyz; + uvec3 zzx = U.v.zzx; + uvec3 zzy = U.v.zzy; + uvec3 zzz = U.v.zzz; + uvec4 xxxx = U.v.xxxx; + uvec4 xxxy = U.v.xxxy; + uvec4 xxxz = U.v.xxxz; + uvec4 xxyx = U.v.xxyx; + uvec4 xxyy = U.v.xxyy; + uvec4 xxyz = U.v.xxyz; + uvec4 xxzx = U.v.xxzx; + uvec4 xxzy = U.v.xxzy; + uvec4 xxzz = U.v.xxzz; + uvec4 xyxx = U.v.xyxx; + uvec4 xyxy = U.v.xyxy; + uvec4 xyxz = U.v.xyxz; + uvec4 xyyx = U.v.xyyx; + uvec4 xyyy = U.v.xyyy; + uvec4 xyyz = U.v.xyyz; + uvec4 xyzx = U.v.xyzx; + uvec4 xyzy = U.v.xyzy; + uvec4 xyzz = U.v.xyzz; + uvec4 xzxx = U.v.xzxx; + uvec4 xzxy = U.v.xzxy; + uvec4 xzxz = U.v.xzxz; + uvec4 xzyx = U.v.xzyx; + uvec4 xzyy = U.v.xzyy; + uvec4 xzyz = U.v.xzyz; + uvec4 xzzx = U.v.xzzx; + uvec4 xzzy = U.v.xzzy; + uvec4 xzzz = U.v.xzzz; + uvec4 yxxx = U.v.yxxx; + uvec4 yxxy = U.v.yxxy; + uvec4 yxxz = U.v.yxxz; + uvec4 yxyx = U.v.yxyx; + uvec4 yxyy = U.v.yxyy; + uvec4 yxyz = U.v.yxyz; + uvec4 yxzx = U.v.yxzx; + uvec4 yxzy = U.v.yxzy; + uvec4 yxzz = U.v.yxzz; + uvec4 yyxx = U.v.yyxx; + uvec4 yyxy = U.v.yyxy; + uvec4 yyxz = U.v.yyxz; + uvec4 yyyx = U.v.yyyx; + uvec4 yyyy = U.v.yyyy; + uvec4 yyyz = U.v.yyyz; + uvec4 yyzx = U.v.yyzx; + uvec4 yyzy = U.v.yyzy; + uvec4 yyzz = U.v.yyzz; + uvec4 yzxx = U.v.yzxx; + uvec4 yzxy = U.v.yzxy; + uvec4 yzxz = U.v.yzxz; + uvec4 yzyx = U.v.yzyx; + uvec4 yzyy = U.v.yzyy; + uvec4 yzyz = U.v.yzyz; + uvec4 yzzx = U.v.yzzx; + uvec4 yzzy = U.v.yzzy; + uvec4 yzzz = U.v.yzzz; + uvec4 zxxx = U.v.zxxx; + uvec4 zxxy = U.v.zxxy; + uvec4 zxxz = U.v.zxxz; + uvec4 zxyx = U.v.zxyx; + uvec4 zxyy = U.v.zxyy; + uvec4 zxyz = U.v.zxyz; + uvec4 zxzx = U.v.zxzx; + uvec4 zxzy = U.v.zxzy; + uvec4 zxzz = U.v.zxzz; + uvec4 zyxx = U.v.zyxx; + uvec4 zyxy = U.v.zyxy; + uvec4 zyxz = U.v.zyxz; + uvec4 zyyx = U.v.zyyx; + uvec4 zyyy = U.v.zyyy; + uvec4 zyyz = U.v.zyyz; + uvec4 zyzx = U.v.zyzx; + uvec4 zyzy = U.v.zyzy; + uvec4 zyzz = U.v.zyzz; + uvec4 zzxx = U.v.zzxx; + uvec4 zzxy = U.v.zzxy; + uvec4 zzxz = U.v.zzxz; + uvec4 zzyx = U.v.zzyx; + uvec4 zzyy = U.v.zzyy; + uvec4 zzyz = U.v.zzyz; + uvec4 zzzx = U.v.zzzx; + uvec4 zzzy = U.v.zzzy; + uvec4 zzzz = U.v.zzzz; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/read/swizzle.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/read/swizzle.wgsl.expected.ir.glsl index 4a20bc7c4e6..1fa74ec2b46 100644 --- a/test/tint/expressions/swizzle/read/swizzle.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/read/swizzle.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + vec3 val[3]; +}; -tint executable returned error: signal: illegal instruction +void a() { + ivec4 a_1 = ivec4(0); + int b = a_1.x; + ivec4 c = a_1.zzyy; + S d = S(vec3[3](vec3(0.0f), vec3(0.0f), vec3(0.0f))); + vec3 e = d.val[2].yzx; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.ir.glsl index 72ca17c386c..71d5b2847ff 100644 --- a/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/read/vec3/f16.wgsl.expected.ir.glsl @@ -1,11 +1,134 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + f16vec3 v; +}; -tint executable returned error: signal: illegal instruction +S P = S(f16vec3(0.0hf)); +void f() { + f16vec3 v = P.v; + float16_t x = P.v.x; + float16_t y = P.v.y; + float16_t z = P.v.z; + f16vec2 xx = P.v.xx; + f16vec2 xy = P.v.xy; + f16vec2 xz = P.v.xz; + f16vec2 yx = P.v.yx; + f16vec2 yy = P.v.yy; + f16vec2 yz = P.v.yz; + f16vec2 zx = P.v.zx; + f16vec2 zy = P.v.zy; + f16vec2 zz = P.v.zz; + f16vec3 xxx = P.v.xxx; + f16vec3 xxy = P.v.xxy; + f16vec3 xxz = P.v.xxz; + f16vec3 xyx = P.v.xyx; + f16vec3 xyy = P.v.xyy; + f16vec3 xyz = P.v.xyz; + f16vec3 xzx = P.v.xzx; + f16vec3 xzy = P.v.xzy; + f16vec3 xzz = P.v.xzz; + f16vec3 yxx = P.v.yxx; + f16vec3 yxy = P.v.yxy; + f16vec3 yxz = P.v.yxz; + f16vec3 yyx = P.v.yyx; + f16vec3 yyy = P.v.yyy; + f16vec3 yyz = P.v.yyz; + f16vec3 yzx = P.v.yzx; + f16vec3 yzy = P.v.yzy; + f16vec3 yzz = P.v.yzz; + f16vec3 zxx = P.v.zxx; + f16vec3 zxy = P.v.zxy; + f16vec3 zxz = P.v.zxz; + f16vec3 zyx = P.v.zyx; + f16vec3 zyy = P.v.zyy; + f16vec3 zyz = P.v.zyz; + f16vec3 zzx = P.v.zzx; + f16vec3 zzy = P.v.zzy; + f16vec3 zzz = P.v.zzz; + f16vec4 xxxx = P.v.xxxx; + f16vec4 xxxy = P.v.xxxy; + f16vec4 xxxz = P.v.xxxz; + f16vec4 xxyx = P.v.xxyx; + f16vec4 xxyy = P.v.xxyy; + f16vec4 xxyz = P.v.xxyz; + f16vec4 xxzx = P.v.xxzx; + f16vec4 xxzy = P.v.xxzy; + f16vec4 xxzz = P.v.xxzz; + f16vec4 xyxx = P.v.xyxx; + f16vec4 xyxy = P.v.xyxy; + f16vec4 xyxz = P.v.xyxz; + f16vec4 xyyx = P.v.xyyx; + f16vec4 xyyy = P.v.xyyy; + f16vec4 xyyz = P.v.xyyz; + f16vec4 xyzx = P.v.xyzx; + f16vec4 xyzy = P.v.xyzy; + f16vec4 xyzz = P.v.xyzz; + f16vec4 xzxx = P.v.xzxx; + f16vec4 xzxy = P.v.xzxy; + f16vec4 xzxz = P.v.xzxz; + f16vec4 xzyx = P.v.xzyx; + f16vec4 xzyy = P.v.xzyy; + f16vec4 xzyz = P.v.xzyz; + f16vec4 xzzx = P.v.xzzx; + f16vec4 xzzy = P.v.xzzy; + f16vec4 xzzz = P.v.xzzz; + f16vec4 yxxx = P.v.yxxx; + f16vec4 yxxy = P.v.yxxy; + f16vec4 yxxz = P.v.yxxz; + f16vec4 yxyx = P.v.yxyx; + f16vec4 yxyy = P.v.yxyy; + f16vec4 yxyz = P.v.yxyz; + f16vec4 yxzx = P.v.yxzx; + f16vec4 yxzy = P.v.yxzy; + f16vec4 yxzz = P.v.yxzz; + f16vec4 yyxx = P.v.yyxx; + f16vec4 yyxy = P.v.yyxy; + f16vec4 yyxz = P.v.yyxz; + f16vec4 yyyx = P.v.yyyx; + f16vec4 yyyy = P.v.yyyy; + f16vec4 yyyz = P.v.yyyz; + f16vec4 yyzx = P.v.yyzx; + f16vec4 yyzy = P.v.yyzy; + f16vec4 yyzz = P.v.yyzz; + f16vec4 yzxx = P.v.yzxx; + f16vec4 yzxy = P.v.yzxy; + f16vec4 yzxz = P.v.yzxz; + f16vec4 yzyx = P.v.yzyx; + f16vec4 yzyy = P.v.yzyy; + f16vec4 yzyz = P.v.yzyz; + f16vec4 yzzx = P.v.yzzx; + f16vec4 yzzy = P.v.yzzy; + f16vec4 yzzz = P.v.yzzz; + f16vec4 zxxx = P.v.zxxx; + f16vec4 zxxy = P.v.zxxy; + f16vec4 zxxz = P.v.zxxz; + f16vec4 zxyx = P.v.zxyx; + f16vec4 zxyy = P.v.zxyy; + f16vec4 zxyz = P.v.zxyz; + f16vec4 zxzx = P.v.zxzx; + f16vec4 zxzy = P.v.zxzy; + f16vec4 zxzz = P.v.zxzz; + f16vec4 zyxx = P.v.zyxx; + f16vec4 zyxy = P.v.zyxy; + f16vec4 zyxz = P.v.zyxz; + f16vec4 zyyx = P.v.zyyx; + f16vec4 zyyy = P.v.zyyy; + f16vec4 zyyz = P.v.zyyz; + f16vec4 zyzx = P.v.zyzx; + f16vec4 zyzy = P.v.zyzy; + f16vec4 zyzz = P.v.zyzz; + f16vec4 zzxx = P.v.zzxx; + f16vec4 zzxy = P.v.zzxy; + f16vec4 zzxz = P.v.zzxz; + f16vec4 zzyx = P.v.zzyx; + f16vec4 zzyy = P.v.zzyy; + f16vec4 zzyz = P.v.zzyz; + f16vec4 zzzx = P.v.zzzx; + f16vec4 zzzy = P.v.zzzy; + f16vec4 zzzz = P.v.zzzz; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.ir.glsl index 72ca17c386c..b266daa1152 100644 --- a/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/read/vec3/f32.wgsl.expected.ir.glsl @@ -1,11 +1,133 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + vec3 v; +}; -tint executable returned error: signal: illegal instruction +S P = S(vec3(0.0f)); +void f() { + vec3 v = P.v; + float x = P.v.x; + float y = P.v.y; + float z = P.v.z; + vec2 xx = P.v.xx; + vec2 xy = P.v.xy; + vec2 xz = P.v.xz; + vec2 yx = P.v.yx; + vec2 yy = P.v.yy; + vec2 yz = P.v.yz; + vec2 zx = P.v.zx; + vec2 zy = P.v.zy; + vec2 zz = P.v.zz; + vec3 xxx = P.v.xxx; + vec3 xxy = P.v.xxy; + vec3 xxz = P.v.xxz; + vec3 xyx = P.v.xyx; + vec3 xyy = P.v.xyy; + vec3 xyz = P.v.xyz; + vec3 xzx = P.v.xzx; + vec3 xzy = P.v.xzy; + vec3 xzz = P.v.xzz; + vec3 yxx = P.v.yxx; + vec3 yxy = P.v.yxy; + vec3 yxz = P.v.yxz; + vec3 yyx = P.v.yyx; + vec3 yyy = P.v.yyy; + vec3 yyz = P.v.yyz; + vec3 yzx = P.v.yzx; + vec3 yzy = P.v.yzy; + vec3 yzz = P.v.yzz; + vec3 zxx = P.v.zxx; + vec3 zxy = P.v.zxy; + vec3 zxz = P.v.zxz; + vec3 zyx = P.v.zyx; + vec3 zyy = P.v.zyy; + vec3 zyz = P.v.zyz; + vec3 zzx = P.v.zzx; + vec3 zzy = P.v.zzy; + vec3 zzz = P.v.zzz; + vec4 xxxx = P.v.xxxx; + vec4 xxxy = P.v.xxxy; + vec4 xxxz = P.v.xxxz; + vec4 xxyx = P.v.xxyx; + vec4 xxyy = P.v.xxyy; + vec4 xxyz = P.v.xxyz; + vec4 xxzx = P.v.xxzx; + vec4 xxzy = P.v.xxzy; + vec4 xxzz = P.v.xxzz; + vec4 xyxx = P.v.xyxx; + vec4 xyxy = P.v.xyxy; + vec4 xyxz = P.v.xyxz; + vec4 xyyx = P.v.xyyx; + vec4 xyyy = P.v.xyyy; + vec4 xyyz = P.v.xyyz; + vec4 xyzx = P.v.xyzx; + vec4 xyzy = P.v.xyzy; + vec4 xyzz = P.v.xyzz; + vec4 xzxx = P.v.xzxx; + vec4 xzxy = P.v.xzxy; + vec4 xzxz = P.v.xzxz; + vec4 xzyx = P.v.xzyx; + vec4 xzyy = P.v.xzyy; + vec4 xzyz = P.v.xzyz; + vec4 xzzx = P.v.xzzx; + vec4 xzzy = P.v.xzzy; + vec4 xzzz = P.v.xzzz; + vec4 yxxx = P.v.yxxx; + vec4 yxxy = P.v.yxxy; + vec4 yxxz = P.v.yxxz; + vec4 yxyx = P.v.yxyx; + vec4 yxyy = P.v.yxyy; + vec4 yxyz = P.v.yxyz; + vec4 yxzx = P.v.yxzx; + vec4 yxzy = P.v.yxzy; + vec4 yxzz = P.v.yxzz; + vec4 yyxx = P.v.yyxx; + vec4 yyxy = P.v.yyxy; + vec4 yyxz = P.v.yyxz; + vec4 yyyx = P.v.yyyx; + vec4 yyyy = P.v.yyyy; + vec4 yyyz = P.v.yyyz; + vec4 yyzx = P.v.yyzx; + vec4 yyzy = P.v.yyzy; + vec4 yyzz = P.v.yyzz; + vec4 yzxx = P.v.yzxx; + vec4 yzxy = P.v.yzxy; + vec4 yzxz = P.v.yzxz; + vec4 yzyx = P.v.yzyx; + vec4 yzyy = P.v.yzyy; + vec4 yzyz = P.v.yzyz; + vec4 yzzx = P.v.yzzx; + vec4 yzzy = P.v.yzzy; + vec4 yzzz = P.v.yzzz; + vec4 zxxx = P.v.zxxx; + vec4 zxxy = P.v.zxxy; + vec4 zxxz = P.v.zxxz; + vec4 zxyx = P.v.zxyx; + vec4 zxyy = P.v.zxyy; + vec4 zxyz = P.v.zxyz; + vec4 zxzx = P.v.zxzx; + vec4 zxzy = P.v.zxzy; + vec4 zxzz = P.v.zxzz; + vec4 zyxx = P.v.zyxx; + vec4 zyxy = P.v.zyxy; + vec4 zyxz = P.v.zyxz; + vec4 zyyx = P.v.zyyx; + vec4 zyyy = P.v.zyyy; + vec4 zyyz = P.v.zyyz; + vec4 zyzx = P.v.zyzx; + vec4 zyzy = P.v.zyzy; + vec4 zyzz = P.v.zyzz; + vec4 zzxx = P.v.zzxx; + vec4 zzxy = P.v.zzxy; + vec4 zzxz = P.v.zzxz; + vec4 zzyx = P.v.zzyx; + vec4 zzyy = P.v.zzyy; + vec4 zzyz = P.v.zzyz; + vec4 zzzx = P.v.zzzx; + vec4 zzzy = P.v.zzzy; + vec4 zzzz = P.v.zzzz; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.ir.glsl index 72ca17c386c..b742043ba47 100644 --- a/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/read/vec3/i32.wgsl.expected.ir.glsl @@ -1,11 +1,133 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + ivec3 v; +}; -tint executable returned error: signal: illegal instruction +S P = S(ivec3(0)); +void f() { + ivec3 v = P.v; + int x = P.v.x; + int y = P.v.y; + int z = P.v.z; + ivec2 xx = P.v.xx; + ivec2 xy = P.v.xy; + ivec2 xz = P.v.xz; + ivec2 yx = P.v.yx; + ivec2 yy = P.v.yy; + ivec2 yz = P.v.yz; + ivec2 zx = P.v.zx; + ivec2 zy = P.v.zy; + ivec2 zz = P.v.zz; + ivec3 xxx = P.v.xxx; + ivec3 xxy = P.v.xxy; + ivec3 xxz = P.v.xxz; + ivec3 xyx = P.v.xyx; + ivec3 xyy = P.v.xyy; + ivec3 xyz = P.v.xyz; + ivec3 xzx = P.v.xzx; + ivec3 xzy = P.v.xzy; + ivec3 xzz = P.v.xzz; + ivec3 yxx = P.v.yxx; + ivec3 yxy = P.v.yxy; + ivec3 yxz = P.v.yxz; + ivec3 yyx = P.v.yyx; + ivec3 yyy = P.v.yyy; + ivec3 yyz = P.v.yyz; + ivec3 yzx = P.v.yzx; + ivec3 yzy = P.v.yzy; + ivec3 yzz = P.v.yzz; + ivec3 zxx = P.v.zxx; + ivec3 zxy = P.v.zxy; + ivec3 zxz = P.v.zxz; + ivec3 zyx = P.v.zyx; + ivec3 zyy = P.v.zyy; + ivec3 zyz = P.v.zyz; + ivec3 zzx = P.v.zzx; + ivec3 zzy = P.v.zzy; + ivec3 zzz = P.v.zzz; + ivec4 xxxx = P.v.xxxx; + ivec4 xxxy = P.v.xxxy; + ivec4 xxxz = P.v.xxxz; + ivec4 xxyx = P.v.xxyx; + ivec4 xxyy = P.v.xxyy; + ivec4 xxyz = P.v.xxyz; + ivec4 xxzx = P.v.xxzx; + ivec4 xxzy = P.v.xxzy; + ivec4 xxzz = P.v.xxzz; + ivec4 xyxx = P.v.xyxx; + ivec4 xyxy = P.v.xyxy; + ivec4 xyxz = P.v.xyxz; + ivec4 xyyx = P.v.xyyx; + ivec4 xyyy = P.v.xyyy; + ivec4 xyyz = P.v.xyyz; + ivec4 xyzx = P.v.xyzx; + ivec4 xyzy = P.v.xyzy; + ivec4 xyzz = P.v.xyzz; + ivec4 xzxx = P.v.xzxx; + ivec4 xzxy = P.v.xzxy; + ivec4 xzxz = P.v.xzxz; + ivec4 xzyx = P.v.xzyx; + ivec4 xzyy = P.v.xzyy; + ivec4 xzyz = P.v.xzyz; + ivec4 xzzx = P.v.xzzx; + ivec4 xzzy = P.v.xzzy; + ivec4 xzzz = P.v.xzzz; + ivec4 yxxx = P.v.yxxx; + ivec4 yxxy = P.v.yxxy; + ivec4 yxxz = P.v.yxxz; + ivec4 yxyx = P.v.yxyx; + ivec4 yxyy = P.v.yxyy; + ivec4 yxyz = P.v.yxyz; + ivec4 yxzx = P.v.yxzx; + ivec4 yxzy = P.v.yxzy; + ivec4 yxzz = P.v.yxzz; + ivec4 yyxx = P.v.yyxx; + ivec4 yyxy = P.v.yyxy; + ivec4 yyxz = P.v.yyxz; + ivec4 yyyx = P.v.yyyx; + ivec4 yyyy = P.v.yyyy; + ivec4 yyyz = P.v.yyyz; + ivec4 yyzx = P.v.yyzx; + ivec4 yyzy = P.v.yyzy; + ivec4 yyzz = P.v.yyzz; + ivec4 yzxx = P.v.yzxx; + ivec4 yzxy = P.v.yzxy; + ivec4 yzxz = P.v.yzxz; + ivec4 yzyx = P.v.yzyx; + ivec4 yzyy = P.v.yzyy; + ivec4 yzyz = P.v.yzyz; + ivec4 yzzx = P.v.yzzx; + ivec4 yzzy = P.v.yzzy; + ivec4 yzzz = P.v.yzzz; + ivec4 zxxx = P.v.zxxx; + ivec4 zxxy = P.v.zxxy; + ivec4 zxxz = P.v.zxxz; + ivec4 zxyx = P.v.zxyx; + ivec4 zxyy = P.v.zxyy; + ivec4 zxyz = P.v.zxyz; + ivec4 zxzx = P.v.zxzx; + ivec4 zxzy = P.v.zxzy; + ivec4 zxzz = P.v.zxzz; + ivec4 zyxx = P.v.zyxx; + ivec4 zyxy = P.v.zyxy; + ivec4 zyxz = P.v.zyxz; + ivec4 zyyx = P.v.zyyx; + ivec4 zyyy = P.v.zyyy; + ivec4 zyyz = P.v.zyyz; + ivec4 zyzx = P.v.zyzx; + ivec4 zyzy = P.v.zyzy; + ivec4 zyzz = P.v.zyzz; + ivec4 zzxx = P.v.zzxx; + ivec4 zzxy = P.v.zzxy; + ivec4 zzxz = P.v.zzxz; + ivec4 zzyx = P.v.zzyx; + ivec4 zzyy = P.v.zzyy; + ivec4 zzyz = P.v.zzyz; + ivec4 zzzx = P.v.zzzx; + ivec4 zzzy = P.v.zzzy; + ivec4 zzzz = P.v.zzzz; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.ir.glsl index 72ca17c386c..c68847346fb 100644 --- a/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/read/vec3/u32.wgsl.expected.ir.glsl @@ -1,11 +1,133 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + uvec3 v; +}; -tint executable returned error: signal: illegal instruction +S P = S(uvec3(0u)); +void f() { + uvec3 v = P.v; + uint x = P.v.x; + uint y = P.v.y; + uint z = P.v.z; + uvec2 xx = P.v.xx; + uvec2 xy = P.v.xy; + uvec2 xz = P.v.xz; + uvec2 yx = P.v.yx; + uvec2 yy = P.v.yy; + uvec2 yz = P.v.yz; + uvec2 zx = P.v.zx; + uvec2 zy = P.v.zy; + uvec2 zz = P.v.zz; + uvec3 xxx = P.v.xxx; + uvec3 xxy = P.v.xxy; + uvec3 xxz = P.v.xxz; + uvec3 xyx = P.v.xyx; + uvec3 xyy = P.v.xyy; + uvec3 xyz = P.v.xyz; + uvec3 xzx = P.v.xzx; + uvec3 xzy = P.v.xzy; + uvec3 xzz = P.v.xzz; + uvec3 yxx = P.v.yxx; + uvec3 yxy = P.v.yxy; + uvec3 yxz = P.v.yxz; + uvec3 yyx = P.v.yyx; + uvec3 yyy = P.v.yyy; + uvec3 yyz = P.v.yyz; + uvec3 yzx = P.v.yzx; + uvec3 yzy = P.v.yzy; + uvec3 yzz = P.v.yzz; + uvec3 zxx = P.v.zxx; + uvec3 zxy = P.v.zxy; + uvec3 zxz = P.v.zxz; + uvec3 zyx = P.v.zyx; + uvec3 zyy = P.v.zyy; + uvec3 zyz = P.v.zyz; + uvec3 zzx = P.v.zzx; + uvec3 zzy = P.v.zzy; + uvec3 zzz = P.v.zzz; + uvec4 xxxx = P.v.xxxx; + uvec4 xxxy = P.v.xxxy; + uvec4 xxxz = P.v.xxxz; + uvec4 xxyx = P.v.xxyx; + uvec4 xxyy = P.v.xxyy; + uvec4 xxyz = P.v.xxyz; + uvec4 xxzx = P.v.xxzx; + uvec4 xxzy = P.v.xxzy; + uvec4 xxzz = P.v.xxzz; + uvec4 xyxx = P.v.xyxx; + uvec4 xyxy = P.v.xyxy; + uvec4 xyxz = P.v.xyxz; + uvec4 xyyx = P.v.xyyx; + uvec4 xyyy = P.v.xyyy; + uvec4 xyyz = P.v.xyyz; + uvec4 xyzx = P.v.xyzx; + uvec4 xyzy = P.v.xyzy; + uvec4 xyzz = P.v.xyzz; + uvec4 xzxx = P.v.xzxx; + uvec4 xzxy = P.v.xzxy; + uvec4 xzxz = P.v.xzxz; + uvec4 xzyx = P.v.xzyx; + uvec4 xzyy = P.v.xzyy; + uvec4 xzyz = P.v.xzyz; + uvec4 xzzx = P.v.xzzx; + uvec4 xzzy = P.v.xzzy; + uvec4 xzzz = P.v.xzzz; + uvec4 yxxx = P.v.yxxx; + uvec4 yxxy = P.v.yxxy; + uvec4 yxxz = P.v.yxxz; + uvec4 yxyx = P.v.yxyx; + uvec4 yxyy = P.v.yxyy; + uvec4 yxyz = P.v.yxyz; + uvec4 yxzx = P.v.yxzx; + uvec4 yxzy = P.v.yxzy; + uvec4 yxzz = P.v.yxzz; + uvec4 yyxx = P.v.yyxx; + uvec4 yyxy = P.v.yyxy; + uvec4 yyxz = P.v.yyxz; + uvec4 yyyx = P.v.yyyx; + uvec4 yyyy = P.v.yyyy; + uvec4 yyyz = P.v.yyyz; + uvec4 yyzx = P.v.yyzx; + uvec4 yyzy = P.v.yyzy; + uvec4 yyzz = P.v.yyzz; + uvec4 yzxx = P.v.yzxx; + uvec4 yzxy = P.v.yzxy; + uvec4 yzxz = P.v.yzxz; + uvec4 yzyx = P.v.yzyx; + uvec4 yzyy = P.v.yzyy; + uvec4 yzyz = P.v.yzyz; + uvec4 yzzx = P.v.yzzx; + uvec4 yzzy = P.v.yzzy; + uvec4 yzzz = P.v.yzzz; + uvec4 zxxx = P.v.zxxx; + uvec4 zxxy = P.v.zxxy; + uvec4 zxxz = P.v.zxxz; + uvec4 zxyx = P.v.zxyx; + uvec4 zxyy = P.v.zxyy; + uvec4 zxyz = P.v.zxyz; + uvec4 zxzx = P.v.zxzx; + uvec4 zxzy = P.v.zxzy; + uvec4 zxzz = P.v.zxzz; + uvec4 zyxx = P.v.zyxx; + uvec4 zyxy = P.v.zyxy; + uvec4 zyxz = P.v.zyxz; + uvec4 zyyx = P.v.zyyx; + uvec4 zyyy = P.v.zyyy; + uvec4 zyyz = P.v.zyyz; + uvec4 zyzx = P.v.zyzx; + uvec4 zyzy = P.v.zyzy; + uvec4 zyzz = P.v.zyzz; + uvec4 zzxx = P.v.zzxx; + uvec4 zzxy = P.v.zzxy; + uvec4 zzxz = P.v.zzxz; + uvec4 zzyx = P.v.zzyx; + uvec4 zzyy = P.v.zzyy; + uvec4 zzyz = P.v.zzyz; + uvec4 zzzx = P.v.zzzx; + uvec4 zzzy = P.v.zzzy; + uvec4 zzzz = P.v.zzzz; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/write/packed_vec3/f16.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/write/packed_vec3/f16.wgsl.expected.ir.glsl index d4bb1c94be9..b657961eb5b 100644 --- a/test/tint/expressions/swizzle/write/packed_vec3/f16.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/write/packed_vec3/f16.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + f16vec3 v; +}; -tint executable returned error: signal: illegal instruction +S U; +void f() { + U.v = f16vec3(1.0hf, 2.0hf, 3.0hf); + U.v[0u] = 1.0hf; + U.v[1u] = 2.0hf; + U.v[2u] = 3.0hf; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.ir.glsl index d4bb1c94be9..257b3dc9c83 100644 --- a/test/tint/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/write/packed_vec3/f32.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + vec3 v; +}; -tint executable returned error: signal: illegal instruction +S U; +void f() { + U.v = vec3(1.0f, 2.0f, 3.0f); + U.v[0u] = 1.0f; + U.v[1u] = 2.0f; + U.v[2u] = 3.0f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.ir.glsl index d4bb1c94be9..f0b7c58c8c2 100644 --- a/test/tint/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/write/packed_vec3/i32.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + ivec3 v; +}; -tint executable returned error: signal: illegal instruction +S U; +void f() { + U.v = ivec3(1, 2, 3); + U.v[0u] = 1; + U.v[1u] = 2; + U.v[2u] = 3; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.ir.glsl index d4bb1c94be9..cb0d0b40589 100644 --- a/test/tint/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/write/packed_vec3/u32.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + uvec3 v; +}; -tint executable returned error: signal: illegal instruction +S U; +void f() { + U.v = uvec3(1u, 2u, 3u); + U.v[0u] = 1u; + U.v[1u] = 2u; + U.v[2u] = 3u; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/write/swizzle.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/write/swizzle.wgsl.expected.ir.glsl index 12687490197..662088f81ce 100644 --- a/test/tint/expressions/swizzle/write/swizzle.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/write/swizzle.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + vec3 val[3]; +}; -tint executable returned error: signal: illegal instruction +void a() { + ivec4 a_1 = ivec4(0); + a_1[0u] = 1; + a_1[2u] = 2; + S d = S(vec3[3](vec3(0.0f), vec3(0.0f), vec3(0.0f))); + d.val[2][1u] = 3.0f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.ir.glsl index d4bb1c94be9..23a1e0ced93 100644 --- a/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/write/vec3/f16.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es +#extension GL_AMD_gpu_shader_half_float: require -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + f16vec3 v; +}; -tint executable returned error: signal: illegal instruction +S P = S(f16vec3(0.0hf)); +void f() { + P.v = f16vec3(1.0hf, 2.0hf, 3.0hf); + P.v[0u] = 1.0hf; + P.v[1u] = 2.0hf; + P.v[2u] = 3.0hf; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.ir.glsl index d4bb1c94be9..294234dd714 100644 --- a/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/write/vec3/f32.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + vec3 v; +}; -tint executable returned error: signal: illegal instruction +S P = S(vec3(0.0f)); +void f() { + P.v = vec3(1.0f, 2.0f, 3.0f); + P.v[0u] = 1.0f; + P.v[1u] = 2.0f; + P.v[2u] = 3.0f; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.ir.glsl index d4bb1c94be9..ccacc1b9e0b 100644 --- a/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/write/vec3/i32.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + ivec3 v; +}; -tint executable returned error: signal: illegal instruction +S P = S(ivec3(0)); +void f() { + P.v = ivec3(1, 2, 3); + P.v[0u] = 1; + P.v[1u] = 2; + P.v[2u] = 3; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.ir.glsl b/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.ir.glsl index d4bb1c94be9..06887374b4e 100644 --- a/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.ir.glsl +++ b/test/tint/expressions/swizzle/write/vec3/u32.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct S { + uvec3 v; +}; -tint executable returned error: signal: illegal instruction +S P = S(uvec3(0u)); +void f() { + P.v = uvec3(1u, 2u, 3u); + P.v[0u] = 1u; + P.v[1u] = 2u; + P.v[2u] = 3u; +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.glsl index d4bb1c94be9..2a1d7b5af86 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.glsl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.glsl @@ -1,11 +1,17 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Store -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct Uniforms { + uint i; +}; -tint executable returned error: signal: illegal instruction +struct OuterS { + mat2x4 m1; +}; + +uniform Uniforms uniforms; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + OuterS s1 = OuterS(mat2x4(vec4(0.0f), vec4(0.0f))); + s1.m1[uniforms.i] = vec4(1.0f); + s1.m1[uniforms.i][uniforms.i] = 1.0f; +} diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.glsl index 12687490197..0aaa6f85fd7 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.glsl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.glsl @@ -1,11 +1,16 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct Uniforms { + uint i; +}; -tint executable returned error: signal: illegal instruction +struct OuterS { + vec3 v1; +}; + +uniform Uniforms uniforms; +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + OuterS s1 = OuterS(vec3(0.0f)); + s1.v1[uniforms.i] = 1.0f; +} diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.glsl index ae9b6d06762..ee105b59978 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.glsl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.glsl @@ -1,11 +1,21 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::CoreBinary -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** +struct Uniforms { + uint i; +}; -tint executable returned error: signal: illegal instruction +struct OuterS { + uint a1[8]; +}; + +uniform Uniforms uniforms; +uint f(uint i) { + return (i + 1u); +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { + OuterS s1 = OuterS(uint[8](0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u)); + vec3 v = vec3(0.0f); + v[s1.a1[uniforms.i]] = 1.0f; + v[f(s1.a1[uniforms.i])] = 1.0f; +} diff --git a/test/tint/statements/decrement/vector_component.wgsl.expected.ir.glsl b/test/tint/statements/decrement/vector_component.wgsl.expected.ir.glsl index 12687490197..fcce63e477e 100644 --- a/test/tint/statements/decrement/vector_component.wgsl.expected.ir.glsl +++ b/test/tint/statements/decrement/vector_component.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uvec4 a; +void tint_symbol() { + a[1] = (a.y - 1u); + a[2u] = (a.z - 1u); +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/statements/increment/vector_component.wgsl.expected.ir.glsl b/test/tint/statements/increment/vector_component.wgsl.expected.ir.glsl index 12687490197..3353f782d47 100644 --- a/test/tint/statements/increment/vector_component.wgsl.expected.ir.glsl +++ b/test/tint/statements/increment/vector_component.wgsl.expected.ir.glsl @@ -1,11 +1,10 @@ -SKIP: FAILED +#version 310 es -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction +uvec4 a; +void tint_symbol() { + a[1] = (a.y + 1u); + a[2u] = (a.z + 1u); +} +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() { +} diff --git a/test/tint/types/buffers/uniform.wgsl.expected.ir.glsl b/test/tint/types/buffers/uniform.wgsl.expected.ir.glsl index 4a20bc7c4e6..41973ec29c3 100644 --- a/test/tint/types/buffers/uniform.wgsl.expected.ir.glsl +++ b/test/tint/types/buffers/uniform.wgsl.expected.ir.glsl @@ -1,11 +1,9 @@ -SKIP: FAILED +#version 310 es +precision highp float; +precision highp int; -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** -tint executable returned error: signal: illegal instruction +uniform vec2 weights; +void main() { + float a = weights.x; +} diff --git a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Hoist_CompositeInsert.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Hoist_CompositeInsert.spvasm.expected.ir.glsl deleted file mode 100644 index e1168e3e2a7..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Hoist_CompositeInsert.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::If -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction diff --git a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Hoist_VectorInsertDynamic.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Hoist_VectorInsertDynamic.spvasm.expected.ir.glsl deleted file mode 100644 index e1168e3e2a7..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserFunctionVarTest_EmitStatement_Hoist_VectorInsertDynamic.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::If -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Compound_Matrix_Vector.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Compound_Matrix_Vector.spvasm.expected.ir.glsl deleted file mode 100644 index 12687490197..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Compound_Matrix_Vector.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_DereferenceBase.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_DereferenceBase.spvasm.expected.ir.glsl deleted file mode 100644 index 4a20bc7c4e6..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_DereferenceBase.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorNonConstIndex.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorNonConstIndex.spvasm.expected.ir.glsl deleted file mode 100644 index 4a20bc7c4e6..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorNonConstIndex.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorSwizzle.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorSwizzle.spvasm.expected.ir.glsl deleted file mode 100644 index 12687490197..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_VectorSwizzle.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction diff --git a/test/tint/unittest/reader/spirv/SpvParserTest_CompositeExtract_Matrix_Vector.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserTest_CompositeExtract_Matrix_Vector.spvasm.expected.ir.glsl deleted file mode 100644 index 4a20bc7c4e6..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserTest_CompositeExtract_Matrix_Vector.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction diff --git a/test/tint/unittest/reader/spirv/SpvParserTest_CompositeExtract_Struct_Array_Matrix_Vector.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserTest_CompositeExtract_Struct_Array_Matrix_Vector.spvasm.expected.ir.glsl deleted file mode 100644 index 4a20bc7c4e6..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserTest_CompositeExtract_Struct_Array_Matrix_Vector.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::LoadVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction diff --git a/test/tint/unittest/reader/spirv/SpvParserTest_CompositeInsert_Struct_Array_Matrix_Vector.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserTest_CompositeInsert_Struct_Array_Matrix_Vector.spvasm.expected.ir.glsl deleted file mode 100644 index 72ca17c386c..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserTest_CompositeInsert_Struct_Array_Matrix_Vector.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Load -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction diff --git a/test/tint/unittest/reader/spirv/SpvParserTest_CompositeInsert_Vector.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserTest_CompositeInsert_Vector.spvasm.expected.ir.glsl deleted file mode 100644 index 12687490197..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserTest_CompositeInsert_Vector.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:252 internal compiler error: Switch() matched no cases. Type: tint::core::ir::StoreVectorElement -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction diff --git a/test/tint/unittest/reader/spirv/SpvParserTest_VectorInsertDynamic_Sample.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserTest_VectorInsertDynamic_Sample.spvasm.expected.ir.glsl deleted file mode 100644 index b02d7ef6e80..00000000000 --- a/test/tint/unittest/reader/spirv/SpvParserTest_VectorInsertDynamic_Sample.spvasm.expected.ir.glsl +++ /dev/null @@ -1,11 +0,0 @@ -SKIP: FAILED - -/src/tint/lang/glsl/writer/printer/printer.cc:482 internal compiler error: Switch() matched no cases. Type: tint::core::ir::Let -******************************************************************** -* The tint shader compiler has encountered an unexpected error. * -* * -* Please help us fix this issue by submitting a bug report at * -* crbug.com/tint with the source program that triggered the bug. * -******************************************************************** - -tint executable returned error: signal: illegal instruction