[glsl][ir] Emit global variable information.
This CL emits the needed information for module scoped variables.
Bug: 42251044
Change-Id: I4e074e9d47c8f7bdc67f624d6bbc3f21a24f992f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/205496
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/tint/lang/core/ir/transform/std140.cc b/src/tint/lang/core/ir/transform/std140.cc
index 53d34fd..4fb731b 100644
--- a/src/tint/lang/core/ir/transform/std140.cc
+++ b/src/tint/lang/core/ir/transform/std140.cc
@@ -269,8 +269,8 @@
// Create a helper function that converts the struct to the original type.
auto* helper = convert_helpers.GetOrAdd(str, [&] {
auto* input_str = source->Type()->As<core::type::Struct>();
- auto* func = b.Function("convert_" + str->FriendlyName(), str);
- auto* input = b.FunctionParam("input", input_str);
+ auto* func = b.Function("tint_convert_" + str->FriendlyName(), str);
+ auto* input = b.FunctionParam("tint_input", input_str);
func->SetParams({input});
b.Append(func->Block(), [&] {
uint32_t index = 0;
diff --git a/src/tint/lang/core/ir/transform/std140_test.cc b/src/tint/lang/core/ir/transform/std140_test.cc
index 6c7d449..6f68b39 100644
--- a/src/tint/lang/core/ir/transform/std140_test.cc
+++ b/src/tint/lang/core/ir/transform/std140_test.cc
@@ -552,15 +552,15 @@
%foo = func():MyStruct {
$B2: {
%3:MyStruct_std140 = load %buffer
- %4:MyStruct = call %convert_MyStruct, %3
+ %4:MyStruct = call %tint_convert_MyStruct, %3
ret %4
}
}
-%convert_MyStruct = func(%input:MyStruct_std140):MyStruct {
+%tint_convert_MyStruct = func(%tint_input:MyStruct_std140):MyStruct {
$B3: {
- %7:vec2<f32> = access %input, 0u
- %8:vec2<f32> = access %input, 1u
- %9:vec2<f32> = access %input, 2u
+ %7:vec2<f32> = access %tint_input, 0u
+ %8:vec2<f32> = access %tint_input, 1u
+ %9:vec2<f32> = access %tint_input, 2u
%10:mat3x2<f32> = construct %7, %8, %9
%11:MyStruct = construct %10
ret %11
@@ -642,13 +642,13 @@
%foo = func():Outer {
$B2: {
%3:Outer_std140 = load %buffer
- %4:Outer = call %convert_Outer, %3
+ %4:Outer = call %tint_convert_Outer, %3
ret %4
}
}
-%convert_Outer = func(%input:Outer_std140):Outer {
+%tint_convert_Outer = func(%tint_input:Outer_std140):Outer {
$B3: {
- %7:array<Inner_std140, 4> = access %input, 0u
+ %7:array<Inner_std140, 4> = access %tint_input, 0u
%8:ptr<function, array<Inner, 4>, read_write> = var
loop [i: $B4, b: $B5, c: $B6] { # loop_1
$B4: { # initializer
@@ -663,7 +663,7 @@
}
%11:ptr<function, Inner, read_write> = access %8, %idx
%12:Inner_std140 = access %7, %idx
- %13:Inner = call %convert_Inner, %12
+ %13:Inner = call %tint_convert_Inner, %12
store %11, %13
continue # -> $B6
}
@@ -677,11 +677,11 @@
ret %17
}
}
-%convert_Inner = func(%input_1:Inner_std140):Inner { # %input_1: 'input'
+%tint_convert_Inner = func(%tint_input_1:Inner_std140):Inner { # %tint_input_1: 'tint_input'
$B8: {
- %19:vec2<f32> = access %input_1, 0u
- %20:vec2<f32> = access %input_1, 1u
- %21:vec2<f32> = access %input_1, 2u
+ %19:vec2<f32> = access %tint_input_1, 0u
+ %20:vec2<f32> = access %tint_input_1, 1u
+ %21:vec2<f32> = access %tint_input_1, 2u
%22:mat3x2<f32> = construct %19, %20, %21
%23:Inner = construct %22
ret %23
@@ -764,15 +764,15 @@
$B2: {
%3:ptr<uniform, Inner_std140, read> = access %buffer, 0u
%4:Inner_std140 = load %3
- %5:Inner = call %convert_Inner, %4
+ %5:Inner = call %tint_convert_Inner, %4
ret %5
}
}
-%convert_Inner = func(%input:Inner_std140):Inner {
+%tint_convert_Inner = func(%tint_input:Inner_std140):Inner {
$B3: {
- %8:vec2<f32> = access %input, 0u
- %9:vec2<f32> = access %input, 1u
- %10:vec2<f32> = access %input, 2u
+ %8:vec2<f32> = access %tint_input, 0u
+ %9:vec2<f32> = access %tint_input, 1u
+ %10:vec2<f32> = access %tint_input, 2u
%11:mat3x2<f32> = construct %8, %9, %10
%12:Inner = construct %11
ret %12
@@ -852,17 +852,17 @@
%foo = func():Outer {
$B2: {
%3:Outer_std140 = load %buffer
- %4:Outer = call %convert_Outer, %3
+ %4:Outer = call %tint_convert_Outer, %3
ret %4
}
}
-%convert_Outer = func(%input:Outer_std140):Outer {
+%tint_convert_Outer = func(%tint_input:Outer_std140):Outer {
$B3: {
- %7:vec2<f32> = access %input, 0u
- %8:vec2<f32> = access %input, 1u
- %9:vec2<f32> = access %input, 2u
+ %7:vec2<f32> = access %tint_input, 0u
+ %8:vec2<f32> = access %tint_input, 1u
+ %9:vec2<f32> = access %tint_input, 2u
%10:mat3x2<f32> = construct %7, %8, %9
- %11:Inner = access %input, 3u
+ %11:Inner = access %tint_input, 3u
%12:Outer = construct %10, %11
ret %12
}
@@ -1097,7 +1097,7 @@
}
%17:ptr<function, Inner, read_write> = access %14, %idx
%18:Inner_std140 = access %13, %idx
- %19:Inner = call %convert_Inner, %18
+ %19:Inner = call %tint_convert_Inner, %18
store %17, %19
continue # -> $B5
}
@@ -1109,7 +1109,7 @@
%22:array<Inner, 4> = load %14
%arr:array<Inner, 4> = let %22
%24:Inner_std140 = load %4
- %25:Inner = call %convert_Inner, %24
+ %25:Inner = call %tint_convert_Inner, %24
%inner:Inner = let %25
%mat:mat3x2<f32> = let %11
%col:vec2<f32> = let %12
@@ -1118,14 +1118,14 @@
ret
}
}
-%convert_Inner = func(%input:Inner_std140):Inner {
+%tint_convert_Inner = func(%tint_input:Inner_std140):Inner {
$B7: {
- %32:i32 = access %input, 0u
- %33:vec2<f32> = access %input, 1u
- %34:vec2<f32> = access %input, 2u
- %35:vec2<f32> = access %input, 3u
+ %32:i32 = access %tint_input, 0u
+ %33:vec2<f32> = access %tint_input, 1u
+ %34:vec2<f32> = access %tint_input, 2u
+ %35:vec2<f32> = access %tint_input, 3u
%36:mat3x2<f32> = construct %33, %34, %35
- %37:i32 = access %input, 4u
+ %37:i32 = access %tint_input, 4u
%38:Inner = construct %32, %36, %37
ret %38
}
@@ -1272,7 +1272,7 @@
}
%17:ptr<function, Inner, read_write> = access %14, %idx
%18:Inner_std140 = access %13, %idx
- %19:Inner = call %convert_Inner, %18
+ %19:Inner = call %tint_convert_Inner, %18
store %17, %19
continue # -> $B5
}
@@ -1284,7 +1284,7 @@
%22:array<Inner, 4> = load %14
%arr:array<Inner, 4> = let %22
%24:Inner_std140 = load %4
- %25:Inner = call %convert_Inner, %24
+ %25:Inner = call %tint_convert_Inner, %24
%inner:Inner = let %25
%mat:mat3x2<f32> = let %11
%col:vec2<f32> = let %12
@@ -1293,14 +1293,14 @@
ret
}
}
-%convert_Inner = func(%input:Inner_std140):Inner {
+%tint_convert_Inner = func(%tint_input:Inner_std140):Inner {
$B7: {
- %32:i32 = access %input, 0u
- %33:vec2<f32> = access %input, 1u
- %34:vec2<f32> = access %input, 2u
- %35:vec2<f32> = access %input, 3u
+ %32:i32 = access %tint_input, 0u
+ %33:vec2<f32> = access %tint_input, 1u
+ %34:vec2<f32> = access %tint_input, 2u
+ %35:vec2<f32> = access %tint_input, 3u
%36:mat3x2<f32> = construct %33, %34, %35
- %37:i32 = access %input, 4u
+ %37:i32 = access %tint_input, 4u
%38:Inner = construct %32, %36, %37
ret %38
}
@@ -1446,7 +1446,7 @@
}
%20:ptr<function, Inner, read_write> = access %17, %idx
%21:Inner_std140 = access %16, %idx
- %22:Inner = call %convert_Inner, %21
+ %22:Inner = call %tint_convert_Inner, %21
store %20, %22
continue # -> $B5
}
@@ -1458,7 +1458,7 @@
%25:array<Inner, 4> = load %17
%arr:array<Inner, 4> = let %25
%27:Inner_std140 = load %7
- %28:Inner = call %convert_Inner, %27
+ %28:Inner = call %tint_convert_Inner, %27
%inner:Inner = let %28
%mat:mat3x2<f32> = let %14
%col:vec2<f32> = let %15
@@ -1467,14 +1467,14 @@
ret
}
}
-%convert_Inner = func(%input:Inner_std140):Inner {
+%tint_convert_Inner = func(%tint_input:Inner_std140):Inner {
$B7: {
- %35:i32 = access %input, 0u
- %36:vec2<f32> = access %input, 1u
- %37:vec2<f32> = access %input, 2u
- %38:vec2<f32> = access %input, 3u
+ %35:i32 = access %tint_input, 0u
+ %36:vec2<f32> = access %tint_input, 1u
+ %37:vec2<f32> = access %tint_input, 2u
+ %38:vec2<f32> = access %tint_input, 3u
%39:mat3x2<f32> = construct %36, %37, %38
- %40:i32 = access %input, 4u
+ %40:i32 = access %tint_input, 4u
%41:Inner = construct %35, %39, %40
ret %41
}
@@ -1848,7 +1848,7 @@
%load_struct_a = func():mat4x4<f32> {
$B2: {
%3:MyStruct_std140 = load %buffer
- %4:MyStruct = call %convert_MyStruct, %3
+ %4:MyStruct = call %tint_convert_MyStruct, %3
%6:mat4x4<f32> = access %4, 0u
ret %6
}
@@ -1856,7 +1856,7 @@
%load_struct_b = func():mat3x2<f32> {
$B3: {
%8:MyStruct_std140 = load %buffer
- %9:MyStruct = call %convert_MyStruct, %8
+ %9:MyStruct = call %tint_convert_MyStruct, %8
%10:mat3x2<f32> = access %9, 1u
ret %10
}
@@ -1912,12 +1912,12 @@
ret %37
}
}
-%convert_MyStruct = func(%input:MyStruct_std140):MyStruct {
+%tint_convert_MyStruct = func(%tint_input:MyStruct_std140):MyStruct {
$B10: {
- %39:mat4x4<f32> = access %input, 0u
- %40:vec2<f32> = access %input, 1u
- %41:vec2<f32> = access %input, 2u
- %42:vec2<f32> = access %input, 3u
+ %39:mat4x4<f32> = access %tint_input, 0u
+ %40:vec2<f32> = access %tint_input, 1u
+ %41:vec2<f32> = access %tint_input, 2u
+ %42:vec2<f32> = access %tint_input, 3u
%43:mat3x2<f32> = construct %40, %41, %42
%44:MyStruct = construct %39, %43
ret %44
@@ -2015,7 +2015,7 @@
%foo = func():void {
$B2: {
%3:MyStruct_std140 = load %buffer
- %4:MyStruct = call %convert_MyStruct, %3
+ %4:MyStruct = call %tint_convert_MyStruct, %3
%struct:MyStruct = let %4
%7:ptr<uniform, vec4<f16>, read> = access %buffer, 8u
%8:vec4<f16> = load %7
@@ -2036,23 +2036,23 @@
ret
}
}
-%convert_MyStruct = func(%input:MyStruct_std140):MyStruct {
+%tint_convert_MyStruct = func(%tint_input:MyStruct_std140):MyStruct {
$B3: {
- %24:vec2<f16> = access %input, 0u
- %25:vec2<f16> = access %input, 1u
+ %24:vec2<f16> = access %tint_input, 0u
+ %25:vec2<f16> = access %tint_input, 1u
%26:mat2x2<f16> = construct %24, %25
- %27:vec4<f16> = access %input, 2u
- %28:vec4<f16> = access %input, 3u
+ %27:vec4<f16> = access %tint_input, 2u
+ %28:vec4<f16> = access %tint_input, 3u
%29:mat2x4<f16> = construct %27, %28
- %30:vec3<f16> = access %input, 4u
- %31:vec3<f16> = access %input, 5u
- %32:vec3<f16> = access %input, 6u
- %33:vec3<f16> = access %input, 7u
+ %30:vec3<f16> = access %tint_input, 4u
+ %31:vec3<f16> = access %tint_input, 5u
+ %32:vec3<f16> = access %tint_input, 6u
+ %33:vec3<f16> = access %tint_input, 7u
%34:mat4x3<f16> = construct %30, %31, %32, %33
- %35:vec4<f16> = access %input, 8u
- %36:vec4<f16> = access %input, 9u
- %37:vec4<f16> = access %input, 10u
- %38:vec4<f16> = access %input, 11u
+ %35:vec4<f16> = access %tint_input, 8u
+ %36:vec4<f16> = access %tint_input, 9u
+ %37:vec4<f16> = access %tint_input, 10u
+ %38:vec4<f16> = access %tint_input, 11u
%39:mat4x4<f16> = construct %35, %36, %37, %38
%40:MyStruct = construct %26, %29, %34, %39
ret %40
diff --git a/src/tint/lang/glsl/writer/access_test.cc b/src/tint/lang/glsl/writer/access_test.cc
index 2521bfb..1d25bb3 100644
--- a/src/tint/lang/glsl/writer/access_test.cc
+++ b/src/tint/lang/glsl/writer/access_test.cc
@@ -275,13 +275,16 @@
precision highp int;
-vec4 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v_1;
void main() {
- vec4 a = v;
- float b = v.x;
- float c = v.y;
- float d = v.z;
- float e = v.w;
+ vec4 a = v_1.tint_symbol;
+ float b = v_1.tint_symbol.x;
+ float c = v_1.tint_symbol.y;
+ float d = v_1.tint_symbol.z;
+ float e = v_1.tint_symbol.w;
}
)");
}
@@ -307,13 +310,16 @@
precision highp int;
-f16vec4 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ f16vec4 tint_symbol;
+} v_1;
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;
+ f16vec4 a = v_1.tint_symbol;
+ float16_t b = v_1.tint_symbol.x;
+ float16_t c = v_1.tint_symbol.y;
+ float16_t d = v_1.tint_symbol.z;
+ float16_t e = v_1.tint_symbol.w;
}
)");
}
@@ -337,17 +343,19 @@
precision highp int;
-mat4 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ mat4 tint_symbol;
+} v_1;
void main() {
- mat4 a = v;
- vec4 b = v[3u];
- float c = v[1u].z;
+ mat4 a = v_1.tint_symbol;
+ vec4 b = v_1.tint_symbol[3u];
+ float c = v_1.tint_symbol[1u].z;
}
)");
}
-// TODO(dsinclair): Needs to create a buffer block
-TEST_F(GlslWriterTest, DISABLED_AccessStorageArray) {
+TEST_F(GlslWriterTest, AccessStorageArray) {
auto* var = b.Var<storage, array<vec3<f32>, 5>, core::Access::kRead>("v");
var->SetBindingPoint(0, 0);
@@ -363,13 +371,14 @@
EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
precision highp int;
-layout(binding = 0, std430) buffer v_block_ssbo {
- vec3 inner[5];
-} v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol[5];
+} v_1;
void main() {
- vec3 a[5] = v.inner;
- vec3 b = v.inner[3u];
+ vec3 a[5] = v_1.tint_symbol;
+ vec3 b = v_1.tint_symbol[3u];
}
)");
}
@@ -401,10 +410,13 @@
precision highp int;
-SB v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SB tint_symbol;
+} v_1;
void main() {
- SB a = v;
- float b = v.b;
+ SB a = v_1.tint_symbol;
+ float b = v_1.tint_symbol.b;
}
)");
}
@@ -458,10 +470,13 @@
precision highp int;
-SB v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SB tint_symbol;
+} v_1;
void main() {
- SB a = v;
- float b = v.b.y.t[3u].z;
+ SB a = v_1.tint_symbol;
+ float b = v_1.tint_symbol.b.y.t[3u].z;
}
)");
}
@@ -485,12 +500,15 @@
precision highp int;
-vec4 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v_1;
void main() {
- v[0u] = 2.0f;
- v[1u] = 4.0f;
- v[2u] = 8.0f;
- v[3u] = 16.0f;
+ v_1.tint_symbol[0u] = 2.0f;
+ v_1.tint_symbol[1u] = 4.0f;
+ v_1.tint_symbol[2u] = 8.0f;
+ v_1.tint_symbol[3u] = 16.0f;
}
)");
}
@@ -524,13 +542,19 @@
precision highp int;
-vec4 v1;
-vec4 v2;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ vec4 tint_symbol_2;
+} v_1;
void bar() {
- float a = v1.y;
+ float a = v.tint_symbol.y;
}
void bar_1() {
- float a = v2.y;
+ float a = v_1.tint_symbol_2.y;
}
void main() {
bar();
@@ -577,9 +601,12 @@
precision highp int;
-SB v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SB tint_symbol;
+} v_1;
void main() {
- uint b = v.b.d;
+ uint b = v_1.tint_symbol.b.d;
}
)");
}
@@ -733,9 +760,12 @@
precision highp int;
-uniform SB v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ SB tint_symbol;
+} v_1;
void main() {
- uint b = v.b.d;
+ uint b = v_1.tint_symbol.b.d;
}
)");
}
@@ -789,9 +819,12 @@
precision highp int;
-uniform float v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ float tint_symbol;
+} v_1;
void main() {
- float a = v;
+ float a = v_1.tint_symbol;
}
)");
}
@@ -813,9 +846,12 @@
precision highp int;
-uniform float16_t v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ float16_t tint_symbol;
+} v_1;
void main() {
- float16_t a = v;
+ float16_t a = v_1.tint_symbol;
}
)");
}
@@ -840,13 +876,16 @@
precision highp int;
-uniform vec4 v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ vec4 tint_symbol;
+} v_1;
void main() {
- vec4 a = v;
- float b = v.x;
- float c = v.y;
- float d = v.z;
- float e = v.w;
+ vec4 a = v_1.tint_symbol;
+ float b = v_1.tint_symbol.x;
+ float c = v_1.tint_symbol.y;
+ float d = v_1.tint_symbol.z;
+ float e = v_1.tint_symbol.w;
}
)");
}
@@ -873,14 +912,17 @@
precision highp int;
-uniform f16vec4 v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ f16vec4 tint_symbol;
+} v_1;
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;
+ f16vec4 a = v_1.tint_symbol;
+ float16_t b = v_1.tint_symbol.x;
+ float16_t c = v_1.tint_symbol[min(x, 3u)];
+ float16_t d = v_1.tint_symbol.z;
+ float16_t e = v_1.tint_symbol.w;
}
)");
}
@@ -904,11 +946,14 @@
precision highp int;
-uniform mat4 v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat4 tint_symbol;
+} v_1;
void main() {
- mat4 a = v;
- vec4 b = v[3u];
- float c = v[1u].z;
+ mat4 a = v_1.tint_symbol;
+ vec4 b = v_1.tint_symbol[3u];
+ float c = v_1.tint_symbol[1u].z;
}
)");
}
@@ -932,11 +977,15 @@
precision highp int;
-uniform mat2x3 v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+} v_1;
void main() {
- mat2x3 a = v;
- vec3 b = v[1u];
- float c = v[1u].z;
+ mat2x3 a = mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1);
+ vec3 b = mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1u];
+ float c = mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1u][2u];
}
)");
}
@@ -960,11 +1009,15 @@
precision highp int;
-uniform f16mat2x3 v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+} v_1;
void main() {
- f16mat2x3 a = v;
- f16vec3 b = v[1u];
- float16_t c = v[1u].z;
+ f16mat2x3 a = f16mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1);
+ f16vec3 b = f16mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1u];
+ float16_t c = f16mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1u][2u];
}
)");
}
@@ -988,11 +1041,16 @@
precision highp int;
-uniform mat3x2 v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+} v_1;
void main() {
- mat3x2 a = v;
- vec2 b = v[1u];
- float c = v[1u].y;
+ mat3x2 a = mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2);
+ vec2 b = mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1u];
+ float c = mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1u][1u];
}
)");
}
@@ -1016,11 +1074,15 @@
precision highp int;
-uniform mat2 v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+} v_1;
void main() {
- mat2 a = v;
- vec2 b = v[1u];
- float c = v[1u].y;
+ mat2 a = mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1);
+ vec2 b = mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1u];
+ float c = mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1u][1u];
}
)");
}
@@ -1045,17 +1107,20 @@
precision highp int;
-uniform f16mat2 v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+} v_1;
void main() {
- f16mat2 a = v;
- f16vec2 b = v[1u];
- float16_t c = v[1u].y;
+ f16mat2 a = f16mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1);
+ f16vec2 b = f16mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1u];
+ float16_t c = f16mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1u][1u];
}
)");
}
-// TODO(dsinclair): Needs buffer block
-TEST_F(GlslWriterTest, DISABLED_AccessUniformArray) {
+TEST_F(GlslWriterTest, AccessUniformArray) {
auto* var = b.Var<uniform, array<vec3<f32>, 5>, core::Access::kRead>("v");
var->SetBindingPoint(0, 0);
@@ -1068,13 +1133,22 @@
});
ASSERT_TRUE(Generate()) << err_ << output_.glsl;
- EXPECT_EQ(output_.glsl, GlslHeader() + R"(
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ vec3 tint_symbol[5];
+} v_1;
+void main() {
+ vec3 a[5] = v_1.tint_symbol;
+ vec3 b = v_1.tint_symbol[3u];
+}
)");
}
-// TODO(dsinclair): Needs buffer block
-TEST_F(GlslWriterTest, DISABLED_AccessUniformArrayF16) {
+TEST_F(GlslWriterTest, AccessUniformArrayF16) {
auto* var = b.Var<uniform, array<vec3<f16>, 5>, core::Access::kRead>("v");
var->SetBindingPoint(0, 0);
@@ -1087,13 +1161,23 @@
});
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;
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ f16vec3 tint_symbol[5];
+} v_1;
+void main() {
+ f16vec3 a[5] = v_1.tint_symbol;
+ f16vec3 b = v_1.tint_symbol[3u];
+}
)");
}
-// TODO(dsinclair): Needs buffer block
-TEST_F(GlslWriterTest, DISABLED_AccessUniformArrayWhichCanHaveSizesOtherThenFive) {
+TEST_F(GlslWriterTest, AccessUniformArrayWhichCanHaveSizesOtherThenFive) {
auto* var = b.Var<uniform, array<vec3<f32>, 42>, core::Access::kRead>("v");
var->SetBindingPoint(0, 0);
@@ -1106,17 +1190,17 @@
});
ASSERT_TRUE(Generate()) << err_ << output_.glsl;
- EXPECT_EQ(output_.glsl, GlslHeader() + R"(
-precision highp float;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
precision highp int;
-layout(binding = 0, std140) uniform v_block_ubo {
- vec3 inner[42];
-} v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ vec3 tint_symbol[42];
+} v_1;
void main() {
- vec3 a[42] = v.inner;
- vec3 b = v.inner[3];
+ vec3 a[42] = v_1.tint_symbol;
+ vec3 b = v_1.tint_symbol[3u];
}
)");
}
@@ -1148,10 +1232,13 @@
precision highp int;
-uniform SB v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ SB tint_symbol;
+} v_1;
void main() {
- SB a = v;
- float b = v.b;
+ SB a = v_1.tint_symbol;
+ float b = v_1.tint_symbol.b;
}
)");
}
@@ -1184,10 +1271,13 @@
precision highp int;
-uniform SB v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ SB tint_symbol;
+} v_1;
void main() {
- SB a = v;
- float16_t b = v.b;
+ SB a = v_1.tint_symbol;
+ float16_t b = v_1.tint_symbol.b;
}
)");
}
@@ -1223,6 +1313,23 @@
ASSERT_TRUE(Generate()) << err_ << output_.glsl;
EXPECT_EQ(output_.glsl, GlslHeader() + R"(
+struct Inner_std140 {
+ vec3 s_col0;
+ vec3 s_col1;
+ vec3 s_col2;
+ vec3 t[5];
+};
+
+struct Outer_std140 {
+ float x;
+ Inner_std140 y;
+};
+
+struct SB_std140 {
+ int a;
+ Outer_std140 b;
+};
+
struct Inner {
mat3 s;
vec3 t[5];
@@ -1241,10 +1348,22 @@
precision highp int;
-uniform SB v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ SB_std140 tint_symbol;
+} v_1;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(mat3(tint_input.s_col0, tint_input.s_col1, tint_input.s_col2), tint_input.t);
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ return Outer(tint_input.x, tint_convert_Inner(tint_input.y));
+}
+SB tint_convert_SB(SB_std140 tint_input) {
+ return SB(tint_input.a, tint_convert_Outer(tint_input.b));
+}
void main() {
- SB a = v;
- float b = v.b.y.t[3u].z;
+ SB a = tint_convert_SB(v_1.tint_symbol);
+ float b = v_1.tint_symbol.b.y.t[3u].z;
}
)");
}
@@ -1265,9 +1384,12 @@
precision highp int;
-float v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v_1;
void main() {
- v = 2.0f;
+ v_1.tint_symbol = 2.0f;
}
)");
}
@@ -1289,9 +1411,12 @@
precision highp int;
-float16_t v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float16_t tint_symbol;
+} v_1;
void main() {
- v = 2.0hf;
+ v_1.tint_symbol = 2.0hf;
}
)");
}
@@ -1313,9 +1438,12 @@
precision highp int;
-vec3 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v_1;
void main() {
- v[1u] = 2.0f;
+ v_1.tint_symbol[1u] = 2.0f;
}
)");
}
@@ -1338,9 +1466,12 @@
precision highp int;
-f16vec3 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ f16vec3 tint_symbol;
+} v_1;
void main() {
- v[1u] = 2.0hf;
+ v_1.tint_symbol[1u] = 2.0hf;
}
)");
}
@@ -1362,9 +1493,12 @@
precision highp int;
-vec3 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v_1;
void main() {
- v = vec3(2.0f, 3.0f, 4.0f);
+ v_1.tint_symbol = vec3(2.0f, 3.0f, 4.0f);
}
)");
}
@@ -1387,9 +1521,12 @@
precision highp int;
-f16vec3 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ f16vec3 tint_symbol;
+} v_1;
void main() {
- v = f16vec3(2.0hf, 3.0hf, 4.0hf);
+ v_1.tint_symbol = f16vec3(2.0hf, 3.0hf, 4.0hf);
}
)");
}
@@ -1411,9 +1548,12 @@
precision highp int;
-mat4 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ mat4 tint_symbol;
+} v_1;
void main() {
- v[1u][2u] = 5.0f;
+ v_1.tint_symbol[1u][2u] = 5.0f;
}
)");
}
@@ -1436,9 +1576,12 @@
precision highp int;
-f16mat3x2 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ f16mat3x2 tint_symbol;
+} v_1;
void main() {
- v[2u][1u] = 5.0hf;
+ v_1.tint_symbol[2u][1u] = 5.0hf;
}
)");
}
@@ -1460,9 +1603,12 @@
precision highp int;
-mat4 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ mat4 tint_symbol;
+} v_1;
void main() {
- v[1u] = vec4(5.0f);
+ v_1.tint_symbol[1u] = vec4(5.0f);
}
)");
}
@@ -1485,9 +1631,12 @@
precision highp int;
-f16mat2x3 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ f16mat2x3 tint_symbol;
+} v_1;
void main() {
- v[1u] = f16vec3(5.0hf);
+ v_1.tint_symbol[1u] = f16vec3(5.0hf);
}
)");
}
@@ -1508,9 +1657,12 @@
precision highp int;
-mat4 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ mat4 tint_symbol;
+} v_1;
void main() {
- v = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
+ v_1.tint_symbol = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
}
)");
}
@@ -1532,9 +1684,12 @@
precision highp int;
-f16mat4 v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ f16mat4 tint_symbol;
+} v_1;
void main() {
- v = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+ v_1.tint_symbol = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
}
)");
}
@@ -1555,9 +1710,12 @@
precision highp int;
-float v[5];
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol[5];
+} v_1;
void main() {
- v[3u] = 1.0f;
+ v_1.tint_symbol[3u] = 1.0f;
}
)");
}
@@ -1579,9 +1737,12 @@
precision highp int;
-float16_t v[5];
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float16_t tint_symbol[5];
+} v_1;
void main() {
- v[3u] = 1.0hf;
+ v_1.tint_symbol[3u] = 1.0hf;
}
)");
}
@@ -1603,19 +1764,22 @@
precision highp int;
-vec3 v[5];
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol[5];
+} v_1;
void tint_store_and_preserve_padding(inout vec3 target[5], vec3 value_param[5]) {
{
- uint v_1 = 0u;
- v_1 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_2 = v_1;
- if ((v_2 >= 5u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 5u)) {
break;
}
- target[v_2] = value_param[v_2];
+ target[v_3] = value_param[v_3];
{
- v_1 = (v_2 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -1623,7 +1787,7 @@
}
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);
+ tint_store_and_preserve_padding(v_1.tint_symbol, ary);
}
)");
}
@@ -1654,9 +1818,12 @@
precision highp int;
-SB v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SB tint_symbol;
+} v_1;
void main() {
- v.b = 3.0f;
+ v_1.tint_symbol.b = 3.0f;
}
)");
}
@@ -1688,9 +1855,12 @@
precision highp int;
-SB v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SB tint_symbol;
+} v_1;
void main() {
- v.b = 3.0hf;
+ v_1.tint_symbol.b = 3.0hf;
}
)");
}
@@ -1741,9 +1911,12 @@
precision highp int;
-SB v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SB tint_symbol;
+} v_1;
void main() {
- v.b.x = 2.0f;
+ v_1.tint_symbol.b.x = 2.0f;
}
)");
}
@@ -1794,7 +1967,10 @@
precision highp int;
-SB v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SB tint_symbol;
+} v_1;
void tint_store_and_preserve_padding_2(inout Inner target, Inner value_param) {
target.s = value_param.s;
target.t = value_param.t;
@@ -1809,7 +1985,7 @@
}
void main() {
SB s = SB(0, Outer(0.0f, Inner(0.0f, vec3(0.0f))));
- tint_store_and_preserve_padding(v, s);
+ tint_store_and_preserve_padding(v_1.tint_symbol, s);
}
)");
}
@@ -1861,19 +2037,22 @@
precision highp int;
-SB v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SB tint_symbol;
+} v_1;
void tint_store_and_preserve_padding_4(inout vec3 target[5], vec3 value_param[5]) {
{
- uint v_1 = 0u;
- v_1 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_2 = v_1;
- if ((v_2 >= 5u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 5u)) {
break;
}
- target[v_2] = value_param[v_2];
+ target[v_3] = value_param[v_3];
{
- v_1 = (v_2 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -1898,7 +2077,7 @@
}
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);
+ tint_store_and_preserve_padding(v_1.tint_symbol, s);
}
)");
}
@@ -1931,10 +2110,13 @@
precision highp int;
-SB v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SB tint_symbol;
+} v_1;
void main() {
- float b = v.b.y;
- float c = v.b.z;
+ float b = v_1.tint_symbol.b.y;
+ float c = v_1.tint_symbol.b.z;
}
)");
}
@@ -1967,10 +2149,13 @@
precision highp int;
-uniform SB v;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ SB tint_symbol;
+} v_1;
void main() {
- float b = v.d.y;
- float c = v.d.z;
+ float b = v_1.tint_symbol.d.y;
+ float c = v_1.tint_symbol.d.z;
}
)");
}
diff --git a/src/tint/lang/glsl/writer/printer/printer.cc b/src/tint/lang/glsl/writer/printer/printer.cc
index 42930d0..1d8ee0b 100644
--- a/src/tint/lang/glsl/writer/printer/printer.cc
+++ b/src/tint/lang/glsl/writer/printer/printer.cc
@@ -94,6 +94,13 @@
namespace {
constexpr const char* kAMDGpuShaderHalfFloat = "GL_AMD_gpu_shader_half_float";
+constexpr const char* kOESSampleVariables = "GL_OES_sample_variables";
+constexpr const char* kEXTBlendFuncExtended = "GL_EXT_blend_func_extended";
+
+enum class LayoutFormat : uint8_t {
+ kStd140,
+ kStd430,
+};
/// PIMPL class for the MSL generator
class Printer : public tint::TextGenerator {
@@ -120,8 +127,7 @@
}
}
- // Emit module-scope declarations.
- EmitBlock(ir_.root_block);
+ EmitRootBlock();
// Emit functions.
for (auto& func : ir_.DependencyOrderedFunctions()) {
@@ -189,6 +195,18 @@
return name;
}
+ void EmitRootBlock() {
+ TINT_SCOPED_ASSIGNMENT(current_block_, ir_.root_block);
+
+ for (auto* inst : *ir_.root_block) {
+ tint::Switch(
+ inst, //
+ [&](core::ir::Var* v) { EmitGlobalVar(v); },
+
+ TINT_ICE_ON_NO_MATCH);
+ }
+ }
+
/// Emit the function
/// @param func the function to emit
void EmitFunction(const core::ir::Function* func) {
@@ -772,10 +790,10 @@
}
void EmitVar(StringStream& out, const core::ir::Var* var) {
- EmitTypeAndName(out, var->Result(0)->Type(), NameOf(var->Result(0)));
-
auto* ptr = var->Result(0)->Type()->As<core::type::Pointer>();
auto space = ptr->AddressSpace();
+
+ EmitTypeAndName(out, var->Result(0)->Type(), NameOf(var->Result(0)));
if (var->Initializer()) {
out << " = ";
EmitValue(out, var->Initializer());
@@ -788,6 +806,257 @@
out << ";";
}
+ void EmitGlobalVar(core::ir::Var* var) {
+ auto* ptr = var->Result(0)->Type()->As<core::type::Pointer>();
+ auto space = ptr->AddressSpace();
+
+ switch (space) {
+ case core::AddressSpace::kStorage:
+ EmitStorageVar(var);
+ break;
+ case core::AddressSpace::kUniform:
+ EmitUniformVar(var);
+ break;
+ case core::AddressSpace::kWorkgroup:
+ EmitWorkgroupVar(var);
+ break;
+ case core::AddressSpace::kHandle:
+ EmitHandleVar(var);
+ break;
+ case core::AddressSpace::kPushConstant:
+ EmitPushConstantVar(var);
+ break;
+ case core::AddressSpace::kIn:
+ case core::AddressSpace::kOut:
+ EmitIOVar(var);
+ break;
+ case core::AddressSpace::kPixelLocal:
+ TINT_UNREACHABLE() << "PixelLocal not supported";
+ default: {
+ auto out = Line();
+ EmitVar(out, var);
+ break;
+ }
+ }
+ }
+
+ void EmitStorageVar(core::ir::Var* var) {
+ const auto& bp = var->BindingPoint();
+ TINT_ASSERT(bp.has_value());
+
+ EmitLayoutBinding(Line(), bp.value(), std::nullopt, {LayoutFormat::kStd430});
+
+ auto* ptr = var->Result(0)->Type()->As<core::type::Pointer>();
+ EmitVarStruct("buffer", NameOf(var->Result(0)), "ssbo",
+ ptr->UnwrapPtr()->As<core::type::Struct>());
+ }
+
+ void EmitUniformVar(core::ir::Var* var) {
+ const auto& bp = var->BindingPoint();
+ TINT_ASSERT(bp.has_value());
+
+ EmitLayoutBinding(Line(), bp.value(), std::nullopt, {LayoutFormat::kStd140});
+
+ auto* ptr = var->Result(0)->Type()->As<core::type::Pointer>();
+ EmitVarStruct("uniform", NameOf(var->Result(0)), "ubo",
+ ptr->UnwrapPtr()->As<core::type::Struct>());
+ }
+
+ void EmitWorkgroupVar(core::ir::Var* var) {
+ auto out = Line();
+ out << "shared ";
+ EmitVar(out, var);
+ }
+
+ void EmitHandleVar(core::ir::Var* var) {
+ auto* ptr = var->Result(0)->Type()->As<core::type::Pointer>();
+
+ // GLSL ignores sampler variables.
+ if (ptr->UnwrapPtr()->Is<core::type::Sampler>()) {
+ return;
+ }
+
+ auto out = Line();
+ if (auto* storage = ptr->UnwrapPtr()->As<core::type::StorageTexture>()) {
+ const auto& bp = var->BindingPoint();
+
+ TINT_ASSERT(bp.has_value());
+ EmitLayoutBinding(out, bp.value(), {storage->TexelFormat()}, std::nullopt);
+ out << " ";
+ }
+
+ EmitVar(out, var);
+ }
+
+ void EmitPushConstantVar(core::ir::Var* var) {
+ auto out = Line();
+ EmitLayoutLocation(out, {0}, std::nullopt);
+ EmitVar(out, var);
+ }
+
+ void EmitIOVar(core::ir::Var* var) {
+ auto& attrs = var->Attributes();
+
+ if (attrs.builtin.has_value()) {
+ if (version_.IsES() && (attrs.builtin == tint::core::BuiltinValue::kSampleIndex ||
+ attrs.builtin == tint::core::BuiltinValue::kSampleMask)) {
+ EmitExtension(kOESSampleVariables);
+ }
+
+ // Do not emit builtin (gl_) variables.
+ return;
+ }
+
+ auto out = Line();
+ EmitLayoutLocation(out, attrs.location, attrs.blend_src);
+ if (attrs.interpolation.has_value()) {
+ EmitInterpolation(out, attrs.interpolation.value());
+ }
+ EmitVar(out, var);
+ }
+
+ void EmitVarStruct(std::string_view kind,
+ std::string_view name,
+ std::string_view type_suffix,
+ const core::type::Struct* str) {
+ TINT_ASSERT(str);
+
+ Line() << kind << " " << UniqueIdentifier(StructName(str)) << "_" << type_suffix << " {";
+
+ {
+ ScopedIndent si(current_buffer_);
+
+ for (auto* mem : str->Members()) {
+ auto out = Line();
+ EmitTypeAndName(out, mem->Type(), mem->Name().Name());
+ out << ";";
+ }
+ }
+
+ Line() << "} " << name << ";";
+ }
+
+ void EmitLayoutLocation(StringStream& out,
+ std::optional<uint32_t> location,
+ std::optional<uint32_t> blend_src) {
+ if (location.has_value()) {
+ out << "layout(location = " << location.value();
+ if (blend_src.has_value()) {
+ EmitExtension(kEXTBlendFuncExtended);
+
+ out << ", index = " << blend_src.value();
+ }
+ out << ") ";
+ }
+ }
+
+ void EmitLayoutBinding(StringStream& out,
+ const tint::BindingPoint& bp,
+ std::optional<core::TexelFormat> texel_format,
+ std::optional<LayoutFormat> layout_format) {
+ TINT_ASSERT(!(texel_format.has_value() && layout_format.has_value()));
+
+ out << "layout(binding = " << bp.binding;
+
+ if (layout_format.has_value()) {
+ out << ", ";
+ switch (layout_format.value()) {
+ case LayoutFormat::kStd140:
+ out << "std140";
+ break;
+ case LayoutFormat::kStd430:
+ out << "std430";
+ break;
+ }
+ }
+
+ if (texel_format.has_value()) {
+ out << ", ";
+ switch (texel_format.value()) {
+ case core::TexelFormat::kBgra8Unorm:
+ TINT_ICE() << "bgra8unorm should have been polyfilled to rgba8unorm";
+ case core::TexelFormat::kR32Uint:
+ out << "r32ui";
+ break;
+ case core::TexelFormat::kR32Sint:
+ out << "r32i";
+ break;
+ case core::TexelFormat::kR32Float:
+ out << "r32f";
+ break;
+ case core::TexelFormat::kRgba8Unorm:
+ out << "rgba8";
+ break;
+ case core::TexelFormat::kRgba8Snorm:
+ out << "rgba8_snorm";
+ break;
+ case core::TexelFormat::kRgba8Uint:
+ out << "rgba8ui";
+ break;
+ case core::TexelFormat::kRgba8Sint:
+ out << "rgba8i";
+ break;
+ case core::TexelFormat::kRg32Uint:
+ out << "rg32ui";
+ break;
+ case core::TexelFormat::kRg32Sint:
+ out << "rg32i";
+ break;
+ case core::TexelFormat::kRg32Float:
+ out << "rg32f";
+ break;
+ case core::TexelFormat::kRgba16Uint:
+ out << "rgba16ui";
+ break;
+ case core::TexelFormat::kRgba16Sint:
+ out << "rgba16i";
+ break;
+ case core::TexelFormat::kRgba16Float:
+ out << "rgba16f";
+ break;
+ case core::TexelFormat::kRgba32Uint:
+ out << "rgba32ui";
+ break;
+ case core::TexelFormat::kRgba32Sint:
+ out << "rgba32i";
+ break;
+ case core::TexelFormat::kRgba32Float:
+ out << "rgba32f";
+ break;
+ case core::TexelFormat::kR8Unorm:
+ out << "r8";
+ break;
+ case core::TexelFormat::kUndefined:
+ TINT_UNREACHABLE() << "invalid texel format";
+ }
+ }
+ out << ")";
+ }
+
+ void EmitInterpolation(StringStream& out, const core::Interpolation& interp) {
+ switch (interp.type) {
+ case core::InterpolationType::kPerspective:
+ case core::InterpolationType::kLinear:
+ case core::InterpolationType::kUndefined:
+ break;
+ case core::InterpolationType::kFlat:
+ out << "flat ";
+ break;
+ }
+
+ switch (interp.sampling) {
+ case core::InterpolationSampling::kCentroid:
+ out << "centroid ";
+ break;
+ case core::InterpolationSampling::kSample:
+ case core::InterpolationSampling::kCenter:
+ case core::InterpolationSampling::kFirst:
+ case core::InterpolationSampling::kEither:
+ case core::InterpolationSampling::kUndefined:
+ break;
+ }
+ }
+
/// Emits the zero value for the given type
/// @param out the stream to emit too
/// @param ty the type
diff --git a/src/tint/lang/glsl/writer/raise/raise.cc b/src/tint/lang/glsl/writer/raise/raise.cc
index 6d87810..458a5d5 100644
--- a/src/tint/lang/glsl/writer/raise/raise.cc
+++ b/src/tint/lang/glsl/writer/raise/raise.cc
@@ -31,15 +31,18 @@
#include "src/tint/lang/core/ir/transform/array_length_from_uniform.h"
#include "src/tint/lang/core/ir/transform/binary_polyfill.h"
#include "src/tint/lang/core/ir/transform/binding_remapper.h"
+#include "src/tint/lang/core/ir/transform/block_decorated_structs.h"
#include "src/tint/lang/core/ir/transform/builtin_polyfill.h"
#include "src/tint/lang/core/ir/transform/conversion_polyfill.h"
#include "src/tint/lang/core/ir/transform/demote_to_helper.h"
#include "src/tint/lang/core/ir/transform/direct_variable_access.h"
#include "src/tint/lang/core/ir/transform/multiplanar_external_texture.h"
#include "src/tint/lang/core/ir/transform/preserve_padding.h"
+#include "src/tint/lang/core/ir/transform/remove_continue_in_switch.h"
#include "src/tint/lang/core/ir/transform/remove_terminator_args.h"
#include "src/tint/lang/core/ir/transform/rename_conflicts.h"
#include "src/tint/lang/core/ir/transform/robustness.h"
+#include "src/tint/lang/core/ir/transform/std140.h"
#include "src/tint/lang/core/ir/transform/value_to_let.h"
#include "src/tint/lang/core/ir/transform/vectorize_scalar_matrix_constructors.h"
#include "src/tint/lang/core/ir/transform/zero_init_workgroup_memory.h"
@@ -103,16 +106,15 @@
RUN_TRANSFORM(core::ir::transform::MultiplanarExternalTexture, module, multiplanar_map);
+ RUN_TRANSFORM(core::ir::transform::BlockDecoratedStructs, module);
+
// TODO(dsinclair): SingleEntryPoint
// TODO(dsinclair): TextureBuiltinsFromUniform
- // TODO(dsinclair): AddBlockAttribute
// TODO(dsinclair): OffsetFirstIndex
// TODO(dsinclair): ClampFragDepth
// TODO(dsinclair): ShaderIO
// TODO(dsinclair): CombineSamplers
// TODO(dsinclair): PadStructs
- // TODO(dsinclair): RemoveContinueInSwitch
- // TODO(dsinclair): Std140
// TODO(dsinclair): Texture1DTo2D
RUN_TRANSFORM(core::ir::transform::DirectVariableAccess, module,
@@ -124,12 +126,15 @@
RUN_TRANSFORM(core::ir::transform::PreservePadding, module);
RUN_TRANSFORM(core::ir::transform::VectorizeScalarMatrixConstructors, module);
+ RUN_TRANSFORM(core::ir::transform::RemoveContinueInSwitch, module);
// DemoteToHelper must come before any transform that introduces non-core instructions.
RUN_TRANSFORM(core::ir::transform::DemoteToHelper, module);
RUN_TRANSFORM(core::ir::transform::AddEmptyEntryPoint, module);
+ RUN_TRANSFORM(core::ir::transform::Std140, module);
+
// These transforms need to be run last as various transforms introduce terminator arguments,
// naming conflicts, and expressions that need to be explicitly not inlined.
RUN_TRANSFORM(core::ir::transform::RemoveTerminatorArgs, module);
diff --git a/src/tint/lang/glsl/writer/type_test.cc b/src/tint/lang/glsl/writer/type_test.cc
index f3f26ed..f120d93 100644
--- a/src/tint/lang/glsl/writer/type_test.cc
+++ b/src/tint/lang/glsl/writer/type_test.cc
@@ -265,7 +265,7 @@
});
ASSERT_TRUE(Generate()) << err_ << output_.glsl;
EXPECT_EQ(output_.glsl, GlslHeader() + R"(
-uint a;
+shared uint a;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
@@ -278,7 +278,7 @@
});
ASSERT_TRUE(Generate()) << err_ << output_.glsl;
EXPECT_EQ(output_.glsl, GlslHeader() + R"(
-int a;
+shared int a;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
diff --git a/src/tint/lang/glsl/writer/var_and_let_test.cc b/src/tint/lang/glsl/writer/var_and_let_test.cc
index f352763..8a43ab9 100644
--- a/src/tint/lang/glsl/writer/var_and_let_test.cc
+++ b/src/tint/lang/glsl/writer/var_and_let_test.cc
@@ -25,6 +25,8 @@
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#include "src/tint/lang/core/type/depth_texture.h"
+#include "src/tint/lang/core/type/storage_texture.h"
#include "src/tint/lang/glsl/writer/helper_test.h"
using namespace tint::core::fluent_types; // NOLINT
@@ -103,5 +105,288 @@
)");
}
+// Not emitted in GLSL
+TEST_F(GlslWriterTest, VarSampler) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kHandle, ty.sampler()));
+ v->SetBindingPoint(1, 2);
+ });
+
+ 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() {
+}
+)");
+}
+
+// Not emitted in GLSL
+TEST_F(GlslWriterTest, VarInBuiltin) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kIn, ty.u32()));
+ core::IOAttributes attrs = {};
+ attrs.builtin = core::BuiltinValue::kLocalInvocationIndex;
+ v->SetAttributes(attrs);
+ v->SetBindingPoint(1, 2);
+ });
+
+ 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() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarIn) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kIn, ty.u32()));
+ core::IOAttributes attrs = {};
+ attrs.location = 1;
+ attrs.interpolation = {core::InterpolationType::kFlat,
+ core::InterpolationSampling::kUndefined};
+ v->SetAttributes(attrs);
+ });
+
+ auto* func = b.Function("main", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] { b.Return(func); });
+ ASSERT_TRUE(Generate({}, tint::ast::PipelineStage::kFragment)) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+
+layout(location = 1) flat in uint v;
+void main() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarOutBlendSrc) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kOut, ty.u32()));
+ core::IOAttributes attrs = {};
+ attrs.location = 1;
+ attrs.blend_src = 1;
+ v->SetAttributes(attrs);
+ });
+
+ auto* func = b.Function("main", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] { b.Return(func); });
+
+ ASSERT_TRUE(Generate({}, tint::ast::PipelineStage::kFragment)) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(#extension GL_EXT_blend_func_extended: require
+precision highp float;
+precision highp int;
+
+
+layout(location = 1, index = 1) out uint v;
+void main() {
+}
+)");
+}
+
+// Not emitted in GLSL
+TEST_F(GlslWriterTest, VarOutBuiltin) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kOut, ty.u32()));
+ core::IOAttributes attrs = {};
+ attrs.builtin = core::BuiltinValue::kFragDepth;
+ v->SetAttributes(attrs);
+ });
+
+ auto* func = b.Function("main", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] { b.Return(func); });
+
+ ASSERT_TRUE(Generate({}, tint::ast::PipelineStage::kFragment)) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(precision highp float;
+precision highp int;
+
+
+void main() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarBuiltinSampleIndex_ES) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kOut, ty.u32()));
+ core::IOAttributes attrs = {};
+ attrs.builtin = core::BuiltinValue::kSampleIndex;
+ v->SetAttributes(attrs);
+ });
+
+ auto* func = b.Function("main", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] { b.Return(func); });
+
+ ASSERT_TRUE(Generate({}, tint::ast::PipelineStage::kFragment)) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(#extension GL_OES_sample_variables: require
+precision highp float;
+precision highp int;
+
+
+void main() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarBuiltinSampleMask_ES) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kOut, ty.u32()));
+ core::IOAttributes attrs = {};
+ attrs.builtin = core::BuiltinValue::kSampleMask;
+ v->SetAttributes(attrs);
+ });
+
+ auto* func = b.Function("main", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] { b.Return(func); });
+
+ ASSERT_TRUE(Generate({}, tint::ast::PipelineStage::kFragment)) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(#extension GL_OES_sample_variables: require
+precision highp float;
+precision highp int;
+
+
+void main() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarBuiltinSampled_NonES) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kOut, ty.u32()));
+ core::IOAttributes attrs = {};
+ attrs.builtin = core::BuiltinValue::kSampleIndex;
+ v->SetAttributes(attrs);
+ });
+
+ auto* func = b.Function("main", ty.void_(), core::ir::Function::PipelineStage::kFragment);
+ b.Append(func->Block(), [&] { b.Return(func); });
+
+ Options opts{};
+ opts.version = Version(Version::Standard::kDesktop, 4, 6);
+ ASSERT_TRUE(Generate(opts, tint::ast::PipelineStage::kFragment)) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, R"(#version 460
+precision highp float;
+precision highp int;
+
+
+void main() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarStorageUint32) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kStorage, ty.u32()));
+ v->SetBindingPoint(0, 1);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(
+layout(binding = 1, std430)
+buffer tint_symbol_1_1_ssbo {
+ uint tint_symbol;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarStorageStruct) {
+ auto* sb = ty.Struct(mod.symbols.New("SB"), {
+ {mod.symbols.New("a"), ty.i32()},
+ {mod.symbols.New("b"), ty.f32()},
+ });
+
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kStorage, sb));
+ v->SetBindingPoint(0, 1);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(
+struct SB {
+ int a;
+ float b;
+};
+
+layout(binding = 1, std430)
+buffer tint_symbol_1_1_ssbo {
+ SB tint_symbol;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarUniform) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v = b.Var("v", ty.ptr(core::AddressSpace::kUniform, ty.u32()));
+ v->SetBindingPoint(0, 1);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(
+layout(binding = 1, std140)
+uniform tint_symbol_1_1_ubo {
+ uint tint_symbol;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarHandleStorageTexture) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v =
+ b.Var("v", ty.ptr(core::AddressSpace::kHandle,
+ ty.Get<core::type::StorageTexture>(core::type::TextureDimension::k2d,
+ core::TexelFormat::kR32Float,
+ core::Access::kWrite, ty.f32())));
+ v->SetBindingPoint(0, 1);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(
+layout(binding = 1, r32f) uniform highp writeonly image2D v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarHandleDepthTexture) {
+ b.Append(b.ir.root_block, [&] {
+ auto* v =
+ b.Var("v", ty.ptr(core::AddressSpace::kHandle,
+ ty.Get<core::type::DepthTexture>(core::type::TextureDimension::k2d)));
+ v->SetBindingPoint(0, 1);
+ });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(
+uniform highp sampler2DShadow v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+}
+)");
+}
+
+TEST_F(GlslWriterTest, VarWorkgroup) {
+ b.Append(b.ir.root_block,
+ [&] { b.Var("v", ty.ptr(core::AddressSpace::kWorkgroup, ty.u32())); });
+
+ ASSERT_TRUE(Generate()) << err_ << output_.glsl;
+ EXPECT_EQ(output_.glsl, GlslHeader() + R"(
+shared uint v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+}
+)");
+}
+
} // namespace
} // namespace tint::glsl::writer
diff --git a/test/tint/access/let/matrix.wgsl.expected.ir.glsl b/test/tint/access/let/matrix.wgsl.expected.ir.glsl
index 7d8e0d4..206bedb 100644
--- a/test/tint/access/let/matrix.wgsl.expected.ir.glsl
+++ b/test/tint/access/let/matrix.wgsl.expected.ir.glsl
@@ -1,10 +1,13 @@
#version 310 es
-float s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ float tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat3 m = mat3(vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));
vec3 v = m[1];
float f = v[1];
- s = f;
+ v_1.tint_symbol_1 = f;
}
diff --git a/test/tint/access/let/vector.wgsl.expected.ir.glsl b/test/tint/access/let/vector.wgsl.expected.ir.glsl
index 7f8f542..664e430 100644
--- a/test/tint/access/let/vector.wgsl.expected.ir.glsl
+++ b/test/tint/access/let/vector.wgsl.expected.ir.glsl
@@ -1,12 +1,15 @@
#version 310 es
-vec3 s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ vec3 tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
vec3 v = vec3(1.0f, 2.0f, 3.0f);
float scalar = v[1u];
vec2 swizzle2 = v.xz;
vec3 swizzle3 = v.xzy;
- vec3 v_1 = vec3(scalar);
- s = ((v_1 + vec3(swizzle2, 1.0f)) + swizzle3);
+ vec3 v_2 = vec3(scalar);
+ v_1.tint_symbol_1 = ((v_2 + vec3(swizzle2, 1.0f)) + swizzle3);
}
diff --git a/test/tint/access/var/matrix.wgsl.expected.ir.glsl b/test/tint/access/var/matrix.wgsl.expected.ir.glsl
index 5764c73..a3ae6f1 100644
--- a/test/tint/access/var/matrix.wgsl.expected.ir.glsl
+++ b/test/tint/access/var/matrix.wgsl.expected.ir.glsl
@@ -1,10 +1,13 @@
#version 310 es
-float s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ float tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat3 m = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f));
vec3 v = m[1];
float f = v[1];
- s = f;
+ v_1.tint_symbol_1 = f;
}
diff --git a/test/tint/access/var/vector.wgsl.expected.ir.glsl b/test/tint/access/var/vector.wgsl.expected.ir.glsl
index 5090881..6a05e89 100644
--- a/test/tint/access/var/vector.wgsl.expected.ir.glsl
+++ b/test/tint/access/var/vector.wgsl.expected.ir.glsl
@@ -1,12 +1,15 @@
#version 310 es
-vec3 s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ vec3 tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
vec3 v = vec3(0.0f);
float scalar = v.y;
vec2 swizzle2 = v.xz;
vec3 swizzle3 = v.xzy;
- vec3 v_1 = vec3(scalar);
- s = ((v_1 + vec3(swizzle2, 1.0f)) + swizzle3);
+ vec3 v_2 = vec3(scalar);
+ v_1.tint_symbol_1 = ((v_2 + vec3(swizzle2, 1.0f)) + swizzle3);
}
diff --git a/test/tint/array/function_parameter.wgsl.expected.ir.glsl b/test/tint/array/function_parameter.wgsl.expected.ir.glsl
index 81d455a..d063ce6 100644
--- a/test/tint/array/function_parameter.wgsl.expected.ir.glsl
+++ b/test/tint/array/function_parameter.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-float s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ float tint_symbol_1;
+} v;
float f1(float a[4]) {
return a[3];
}
@@ -18,5 +21,5 @@
float v1 = f1(a1);
float v2 = f2(a2);
float v3 = f3(a3);
- s = ((v1 + v2) + v3);
+ v.tint_symbol_1 = ((v1 + v2) + v3);
}
diff --git a/test/tint/array/function_return_type.wgsl.expected.ir.glsl b/test/tint/array/function_return_type.wgsl.expected.ir.glsl
index 0a089a1..aaedc4b 100644
--- a/test/tint/array/function_return_type.wgsl.expected.ir.glsl
+++ b/test/tint/array/function_return_type.wgsl.expected.ir.glsl
@@ -1,22 +1,25 @@
#version 310 es
-float s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ float tint_symbol_1;
+} v;
float[4] f1() {
return float[4](0.0f, 0.0f, 0.0f, 0.0f);
}
float[3][4] f2() {
- float v[4] = f1();
float v_1[4] = f1();
- return float[3][4](v, v_1, f1());
+ float v_2[4] = f1();
+ return float[3][4](v_1, v_2, f1());
}
float[2][3][4] f3() {
- float v_2[3][4] = f2();
- return float[2][3][4](v_2, f2());
+ float v_3[3][4] = f2();
+ return float[2][3][4](v_3, f2());
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
float a1[4] = f1();
float a2[3][4] = f2();
float a3[2][3][4] = f3();
- s = ((a1[0] + a2[0][0]) + a3[0][0][0]);
+ v.tint_symbol_1 = ((a1[0] + a2[0][0]) + a3[0][0][0]);
}
diff --git a/test/tint/array/size.wgsl.expected.ir.glsl b/test/tint/array/size.wgsl.expected.ir.glsl
index 640c889..17179e1 100644
--- a/test/tint/array/size.wgsl.expected.ir.glsl
+++ b/test/tint/array/size.wgsl.expected.ir.glsl
@@ -3,7 +3,10 @@
precision highp int;
-float s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ float tint_symbol_1;
+} v;
void main() {
float signed_literal[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
float unsigned_literal[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
@@ -14,5 +17,5 @@
signed_constant = signed_literal;
unsigned_constant = signed_literal;
shr_const_expr = signed_literal;
- s = ((((signed_literal[0] + unsigned_literal[0]) + signed_constant[0]) + unsigned_constant[0]) + shr_const_expr[0]);
+ v.tint_symbol_1 = ((((signed_literal[0] + unsigned_literal[0]) + signed_constant[0]) + unsigned_constant[0]) + shr_const_expr[0]);
}
diff --git a/test/tint/array/strides.spvasm.expected.ir.glsl b/test/tint/array/strides.spvasm.expected.ir.glsl
index 70b233b..78b0ac3 100644
--- a/test/tint/array/strides.spvasm.expected.ir.glsl
+++ b/test/tint/array/strides.spvasm.expected.ir.glsl
@@ -12,22 +12,25 @@
strided_arr_1 a[4];
};
-S s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v;
void tint_store_and_preserve_padding_4(inout strided_arr target, strided_arr value_param) {
target.el = value_param.el;
}
void tint_store_and_preserve_padding_3(inout strided_arr target[2], strided_arr value_param[2]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_1 = 0u;
+ v_1 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 2u)) {
+ uint v_2 = v_1;
+ if ((v_2 >= 2u)) {
break;
}
- tint_store_and_preserve_padding_4(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_4(target[v_2], value_param[v_2]);
{
- v = (v_1 + 1u);
+ v_1 = (v_2 + 1u);
}
continue;
}
@@ -35,16 +38,16 @@
}
void tint_store_and_preserve_padding_2(inout strided_arr target[3][2], strided_arr value_param[3][2]) {
{
- uint v_2 = 0u;
- v_2 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_3 = v_2;
- if ((v_3 >= 3u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 3u)) {
break;
}
- tint_store_and_preserve_padding_3(target[v_3], value_param[v_3]);
+ tint_store_and_preserve_padding_3(target[v_4], value_param[v_4]);
{
- v_2 = (v_3 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
@@ -55,28 +58,28 @@
}
void tint_store_and_preserve_padding(inout strided_arr_1 target[4], strided_arr_1 value_param[4]) {
{
- uint v_4 = 0u;
- v_4 = 0u;
+ uint v_5 = 0u;
+ v_5 = 0u;
while(true) {
- uint v_5 = v_4;
- if ((v_5 >= 4u)) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_5], value_param[v_5]);
+ tint_store_and_preserve_padding_1(target[v_6], value_param[v_6]);
{
- v_4 = (v_5 + 1u);
+ v_5 = (v_6 + 1u);
}
continue;
}
}
}
void f_1() {
- strided_arr_1 x_19[4] = s.a;
- strided_arr x_24[3][2] = s.a[3].el;
- strided_arr x_28[2] = s.a[3].el[2];
- float x_32 = s.a[3].el[2][1].el;
- tint_store_and_preserve_padding(s.a, strided_arr_1[4](strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)))), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)))), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)))), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f))))));
- s.a[3].el[2][1].el = 5.0f;
+ strided_arr_1 x_19[4] = v.tint_symbol.a;
+ strided_arr x_24[3][2] = v.tint_symbol.a[3].el;
+ strided_arr x_28[2] = v.tint_symbol.a[3].el[2];
+ float x_32 = v.tint_symbol.a[3].el[2][1].el;
+ tint_store_and_preserve_padding(v.tint_symbol.a, strided_arr_1[4](strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)))), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)))), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)))), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f)), strided_arr[2](strided_arr(0.0f), strided_arr(0.0f))))));
+ v.tint_symbol.a[3].el[2][1].el = 5.0f;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/array/type_initializer.wgsl.expected.ir.glsl b/test/tint/array/type_initializer.wgsl.expected.ir.glsl
index 0538df1..bf71d61 100644
--- a/test/tint/array/type_initializer.wgsl.expected.ir.glsl
+++ b/test/tint/array/type_initializer.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ int tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int x = 42;
@@ -9,13 +12,13 @@
int nonempty_with_expr[4] = int[4](1, x, (x + 1), nonempty[3]);
int nested_empty[2][3][4] = int[2][3][4](int[3][4](int[4](0, 0, 0, 0), int[4](0, 0, 0, 0), int[4](0, 0, 0, 0)), int[3][4](int[4](0, 0, 0, 0), int[4](0, 0, 0, 0), int[4](0, 0, 0, 0)));
int nested_nonempty[2][3][4] = int[2][3][4](int[3][4](int[4](1, 2, 3, 4), int[4](5, 6, 7, 8), int[4](9, 10, 11, 12)), int[3][4](int[4](13, 14, 15, 16), int[4](17, 18, 19, 20), int[4](21, 22, 23, 24)));
- int v[4] = int[4](1, 2, x, (x + 1));
- int nested_nonempty_with_expr[2][3][4] = int[2][3][4](int[3][4](v, int[4](5, 6, nonempty[2], (nonempty[3] + 1)), nonempty), nested_nonempty[1]);
+ int v_1[4] = int[4](1, 2, x, (x + 1));
+ int nested_nonempty_with_expr[2][3][4] = int[2][3][4](int[3][4](v_1, int[4](5, 6, nonempty[2], (nonempty[3] + 1)), nonempty), nested_nonempty[1]);
int subexpr_empty = 0;
int subexpr_nonempty = 3;
int subexpr_nonempty_with_expr = int[4](1, x, (x + 1), nonempty[3])[2];
int subexpr_nested_empty[4] = int[4](0, 0, 0, 0);
int subexpr_nested_nonempty[4] = int[4](5, 6, 7, 8);
int subexpr_nested_nonempty_with_expr[4] = int[2][4](int[4](1, x, (x + 1), nonempty[3]), nested_nonempty[1][2])[1];
- s = (((((((((((empty[0] + nonempty[0]) + nonempty_with_expr[0]) + nested_empty[0][0][0]) + nested_nonempty[0][0][0]) + nested_nonempty_with_expr[0][0][0]) + subexpr_empty) + subexpr_nonempty) + subexpr_nonempty_with_expr) + subexpr_nested_empty[0]) + subexpr_nested_nonempty[0]) + subexpr_nested_nonempty_with_expr[0]);
+ v.tint_symbol_1 = (((((((((((empty[0] + nonempty[0]) + nonempty_with_expr[0]) + nested_empty[0][0][0]) + nested_nonempty[0][0][0]) + nested_nonempty_with_expr[0][0][0]) + subexpr_empty) + subexpr_nonempty) + subexpr_nonempty_with_expr) + subexpr_nested_empty[0]) + subexpr_nested_nonempty[0]) + subexpr_nested_nonempty_with_expr[0]);
}
diff --git a/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.glsl b/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.glsl
index 3be50cf..9e6acd0 100644
--- a/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.glsl
@@ -32,19 +32,22 @@
Inner array_struct_inner[4];
};
-S sb;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ S tint_symbol_1;
+} v;
void tint_store_and_preserve_padding_3(inout vec3 target[2], vec3 value_param[2]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_1 = 0u;
+ v_1 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 2u)) {
+ uint v_2 = v_1;
+ if ((v_2 >= 2u)) {
break;
}
- target[v_1] = value_param[v_1];
+ target[v_2] = value_param[v_2];
{
- v = (v_1 + 1u);
+ v_1 = (v_2 + 1u);
}
continue;
}
@@ -67,28 +70,28 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- sb.scalar_f32 = 0.0f;
- sb.scalar_i32 = 0;
- sb.scalar_u32 = 0u;
- sb.vec2_f32 = vec2(0.0f);
- sb.vec2_i32 = ivec2(0);
- sb.vec2_u32 = uvec2(0u);
- sb.vec3_f32 = vec3(0.0f);
- sb.vec3_i32 = ivec3(0);
- sb.vec3_u32 = uvec3(0u);
- sb.vec4_f32 = vec4(0.0f);
- sb.vec4_i32 = ivec4(0);
- sb.vec4_u32 = uvec4(0u);
- sb.mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
- tint_store_and_preserve_padding(sb.mat2x3_f32, mat2x3(vec3(0.0f), vec3(0.0f)));
- sb.mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
- sb.mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
- tint_store_and_preserve_padding_1(sb.mat3x3_f32, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
- sb.mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
- sb.mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
- tint_store_and_preserve_padding_2(sb.mat4x3_f32, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
- sb.mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
- tint_store_and_preserve_padding_3(sb.arr2_vec3_f32, vec3[2](vec3(0.0f), vec3(0.0f)));
- sb.struct_inner = Inner(0, 0.0f);
- sb.array_struct_inner = Inner[4](Inner(0, 0.0f), Inner(0, 0.0f), Inner(0, 0.0f), Inner(0, 0.0f));
+ v.tint_symbol_1.scalar_f32 = 0.0f;
+ v.tint_symbol_1.scalar_i32 = 0;
+ v.tint_symbol_1.scalar_u32 = 0u;
+ v.tint_symbol_1.vec2_f32 = vec2(0.0f);
+ v.tint_symbol_1.vec2_i32 = ivec2(0);
+ v.tint_symbol_1.vec2_u32 = uvec2(0u);
+ v.tint_symbol_1.vec3_f32 = vec3(0.0f);
+ v.tint_symbol_1.vec3_i32 = ivec3(0);
+ v.tint_symbol_1.vec3_u32 = uvec3(0u);
+ v.tint_symbol_1.vec4_f32 = vec4(0.0f);
+ v.tint_symbol_1.vec4_i32 = ivec4(0);
+ v.tint_symbol_1.vec4_u32 = uvec4(0u);
+ v.tint_symbol_1.mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
+ tint_store_and_preserve_padding(v.tint_symbol_1.mat2x3_f32, mat2x3(vec3(0.0f), vec3(0.0f)));
+ v.tint_symbol_1.mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
+ v.tint_symbol_1.mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
+ tint_store_and_preserve_padding_1(v.tint_symbol_1.mat3x3_f32, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+ v.tint_symbol_1.mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
+ v.tint_symbol_1.mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
+ tint_store_and_preserve_padding_2(v.tint_symbol_1.mat4x3_f32, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+ v.tint_symbol_1.mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
+ tint_store_and_preserve_padding_3(v.tint_symbol_1.arr2_vec3_f32, vec3[2](vec3(0.0f), vec3(0.0f)));
+ v.tint_symbol_1.struct_inner = Inner(0, 0.0f);
+ v.tint_symbol_1.array_struct_inner = Inner[4](Inner(0, 0.0f), Inner(0, 0.0f), Inner(0, 0.0f), Inner(0, 0.0f));
}
diff --git a/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.ir.glsl
index cf5a8de..eb07a1d 100644
--- a/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.ir.glsl
@@ -48,7 +48,10 @@
Inner array_struct_inner[4];
};
-S sb;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ S tint_symbol_1;
+} v;
void tint_store_and_preserve_padding_7(inout Inner target, Inner value_param) {
target.scalar_i32 = value_param.scalar_i32;
target.scalar_f32 = value_param.scalar_f32;
@@ -56,16 +59,16 @@
}
void tint_store_and_preserve_padding_8(inout Inner target[4], Inner value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_1 = 0u;
+ v_1 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_2 = v_1;
+ if ((v_2 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_7(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_7(target[v_2], value_param[v_2]);
{
- v = (v_1 + 1u);
+ v_1 = (v_2 + 1u);
}
continue;
}
@@ -73,16 +76,16 @@
}
void tint_store_and_preserve_padding_6(inout vec3 target[2], vec3 value_param[2]) {
{
- uint v_2 = 0u;
- v_2 = 0u;
+ uint v_3 = 0u;
+ v_3 = 0u;
while(true) {
- uint v_3 = v_2;
- if ((v_3 >= 2u)) {
+ uint v_4 = v_3;
+ if ((v_4 >= 2u)) {
break;
}
- target[v_3] = value_param[v_3];
+ target[v_4] = value_param[v_4];
{
- v_2 = (v_3 + 1u);
+ v_3 = (v_4 + 1u);
}
continue;
}
@@ -120,42 +123,42 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- sb.scalar_f32 = 0.0f;
- sb.scalar_i32 = 0;
- sb.scalar_u32 = 0u;
- sb.scalar_f16 = 0.0hf;
- sb.vec2_f32 = vec2(0.0f);
- sb.vec2_i32 = ivec2(0);
- sb.vec2_u32 = uvec2(0u);
- sb.vec2_f16 = f16vec2(0.0hf);
- sb.vec3_f32 = vec3(0.0f);
- sb.vec3_i32 = ivec3(0);
- sb.vec3_u32 = uvec3(0u);
- sb.vec3_f16 = f16vec3(0.0hf);
- sb.vec4_f32 = vec4(0.0f);
- sb.vec4_i32 = ivec4(0);
- sb.vec4_u32 = uvec4(0u);
- sb.vec4_f16 = f16vec4(0.0hf);
- sb.mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
- tint_store_and_preserve_padding(sb.mat2x3_f32, mat2x3(vec3(0.0f), vec3(0.0f)));
- sb.mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
- sb.mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
- tint_store_and_preserve_padding_1(sb.mat3x3_f32, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
- sb.mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
- sb.mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
- tint_store_and_preserve_padding_2(sb.mat4x3_f32, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
- sb.mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
- sb.mat2x2_f16 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
- tint_store_and_preserve_padding_3(sb.mat2x3_f16, f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)));
- sb.mat2x4_f16 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
- sb.mat3x2_f16 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
- tint_store_and_preserve_padding_4(sb.mat3x3_f16, f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
- sb.mat3x4_f16 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
- sb.mat4x2_f16 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
- tint_store_and_preserve_padding_5(sb.mat4x3_f16, f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
- sb.mat4x4_f16 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
- tint_store_and_preserve_padding_6(sb.arr2_vec3_f32, vec3[2](vec3(0.0f), vec3(0.0f)));
- sb.arr2_mat4x2_f16 = f16mat4x2[2](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)));
- tint_store_and_preserve_padding_7(sb.struct_inner, Inner(0, 0.0f, 0.0hf));
- tint_store_and_preserve_padding_8(sb.array_struct_inner, Inner[4](Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf)));
+ v.tint_symbol_1.scalar_f32 = 0.0f;
+ v.tint_symbol_1.scalar_i32 = 0;
+ v.tint_symbol_1.scalar_u32 = 0u;
+ v.tint_symbol_1.scalar_f16 = 0.0hf;
+ v.tint_symbol_1.vec2_f32 = vec2(0.0f);
+ v.tint_symbol_1.vec2_i32 = ivec2(0);
+ v.tint_symbol_1.vec2_u32 = uvec2(0u);
+ v.tint_symbol_1.vec2_f16 = f16vec2(0.0hf);
+ v.tint_symbol_1.vec3_f32 = vec3(0.0f);
+ v.tint_symbol_1.vec3_i32 = ivec3(0);
+ v.tint_symbol_1.vec3_u32 = uvec3(0u);
+ v.tint_symbol_1.vec3_f16 = f16vec3(0.0hf);
+ v.tint_symbol_1.vec4_f32 = vec4(0.0f);
+ v.tint_symbol_1.vec4_i32 = ivec4(0);
+ v.tint_symbol_1.vec4_u32 = uvec4(0u);
+ v.tint_symbol_1.vec4_f16 = f16vec4(0.0hf);
+ v.tint_symbol_1.mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
+ tint_store_and_preserve_padding(v.tint_symbol_1.mat2x3_f32, mat2x3(vec3(0.0f), vec3(0.0f)));
+ v.tint_symbol_1.mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
+ v.tint_symbol_1.mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
+ tint_store_and_preserve_padding_1(v.tint_symbol_1.mat3x3_f32, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+ v.tint_symbol_1.mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
+ v.tint_symbol_1.mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
+ tint_store_and_preserve_padding_2(v.tint_symbol_1.mat4x3_f32, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+ v.tint_symbol_1.mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
+ v.tint_symbol_1.mat2x2_f16 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
+ tint_store_and_preserve_padding_3(v.tint_symbol_1.mat2x3_f16, f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)));
+ v.tint_symbol_1.mat2x4_f16 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
+ v.tint_symbol_1.mat3x2_f16 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+ tint_store_and_preserve_padding_4(v.tint_symbol_1.mat3x3_f16, f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+ v.tint_symbol_1.mat3x4_f16 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+ v.tint_symbol_1.mat4x2_f16 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+ tint_store_and_preserve_padding_5(v.tint_symbol_1.mat4x3_f16, f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+ v.tint_symbol_1.mat4x4_f16 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+ tint_store_and_preserve_padding_6(v.tint_symbol_1.arr2_vec3_f32, vec3[2](vec3(0.0f), vec3(0.0f)));
+ v.tint_symbol_1.arr2_mat4x2_f16 = f16mat4x2[2](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)));
+ tint_store_and_preserve_padding_7(v.tint_symbol_1.struct_inner, Inner(0, 0.0f, 0.0hf));
+ tint_store_and_preserve_padding_8(v.tint_symbol_1.array_struct_inner, Inner[4](Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf)));
}
diff --git a/test/tint/buffer/storage/types/array4_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/array4_f16.wgsl.expected.ir.glsl
index ce2ca20..76838ce 100644
--- a/test/tint/buffer/storage/types/array4_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/array4_f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-float16_t tint_symbol[4];
-float16_t tint_symbol_1[4];
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ float16_t tint_symbol_3[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ float16_t tint_symbol_5[4];
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.glsl
index 129cbf0..e0b9710 100644
--- a/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-float tint_symbol[4];
-float tint_symbol_1[4];
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ float tint_symbol_3[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ float tint_symbol_5[4];
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/f16.wgsl.expected.ir.glsl
index fb6d5a7..ae27b42d 100644
--- a/test/tint/buffer/storage/types/f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-float16_t tint_symbol;
-float16_t tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ float16_t tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ float16_t tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/f32.wgsl.expected.ir.glsl
index 15a935a..b680aa1 100644
--- a/test/tint/buffer/storage/types/f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-float tint_symbol;
-float tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ float tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ float tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/i32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/i32.wgsl.expected.ir.glsl
index c6a7a2f..d8612ca 100644
--- a/test/tint/buffer/storage/types/i32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/i32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-int tint_symbol;
-int tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ int tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ int tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.glsl
index 8172cdf..467a6f3 100644
--- a/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat2 tint_symbol;
-f16mat2 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat2 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16mat2 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.glsl
index 75a8360..2b6f7a6 100644
--- a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-mat2 tint_symbol;
-mat2 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat2 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ mat2 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.glsl
index 24dbcd3..14c5218 100644
--- a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.glsl
@@ -1,13 +1,19 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat2x3 tint_symbol;
-f16mat2x3 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat2x3 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16mat2x3 tint_symbol_5;
+} v_1;
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(tint_symbol_1, tint_symbol);
+ tint_store_and_preserve_padding(v_1.tint_symbol_5, v.tint_symbol_3);
}
diff --git a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.glsl
index 83d542d..d4a7d01 100644
--- a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.glsl
@@ -1,12 +1,18 @@
#version 310 es
-mat2x3 tint_symbol;
-mat2x3 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat2x3 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ mat2x3 tint_symbol_5;
+} v_1;
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(tint_symbol_1, tint_symbol);
+ tint_store_and_preserve_padding(v_1.tint_symbol_5, v.tint_symbol_3);
}
diff --git a/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.glsl
index 1d69a13..ec88559 100644
--- a/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat2x4 tint_symbol;
-f16mat2x4 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat2x4 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16mat2x4 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.glsl
index 7f89ae8..36ea3f7 100644
--- a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-mat2x4 tint_symbol;
-mat2x4 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat2x4 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ mat2x4 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.glsl
index 256f3f8..51dec09 100644
--- a/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat3x2 tint_symbol;
-f16mat3x2 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat3x2 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16mat3x2 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.glsl
index 6a60e03..910a141 100644
--- a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-mat3x2 tint_symbol;
-mat3x2 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat3x2 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ mat3x2 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.glsl
index 72e64db..ca18c2f 100644
--- a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat3 tint_symbol;
-f16mat3 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat3 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16mat3 tint_symbol_5;
+} v_1;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +16,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol_1, tint_symbol);
+ tint_store_and_preserve_padding(v_1.tint_symbol_5, v.tint_symbol_3);
}
diff --git a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.glsl
index 2e1b50c..e17ee2b 100644
--- a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.glsl
@@ -1,7 +1,13 @@
#version 310 es
-mat3 tint_symbol;
-mat3 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat3 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ mat3 tint_symbol_5;
+} v_1;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +15,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol_1, tint_symbol);
+ tint_store_and_preserve_padding(v_1.tint_symbol_5, v.tint_symbol_3);
}
diff --git a/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.glsl
index d579c17..dcbd2ac 100644
--- a/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat3x4 tint_symbol;
-f16mat3x4 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat3x4 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16mat3x4 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.glsl
index 73f4c16..3860f2e 100644
--- a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-mat3x4 tint_symbol;
-mat3x4 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat3x4 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ mat3x4 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.glsl
index e2289a9..d7a62ba 100644
--- a/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat4x2 tint_symbol;
-f16mat4x2 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat4x2 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16mat4x2 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.glsl
index 3130b11..8d71376 100644
--- a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-mat4x2 tint_symbol;
-mat4x2 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat4x2 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ mat4x2 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.glsl
index 4fc0453..cd5fc0f 100644
--- a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat4x3 tint_symbol;
-f16mat4x3 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat4x3 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16mat4x3 tint_symbol_5;
+} v_1;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,5 +17,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol_1, tint_symbol);
+ tint_store_and_preserve_padding(v_1.tint_symbol_5, v.tint_symbol_3);
}
diff --git a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.glsl
index c4240da..e461518 100644
--- a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.glsl
@@ -1,7 +1,13 @@
#version 310 es
-mat4x3 tint_symbol;
-mat4x3 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat4x3 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ mat4x3 tint_symbol_5;
+} v_1;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +16,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol_1, tint_symbol);
+ tint_store_and_preserve_padding(v_1.tint_symbol_5, v.tint_symbol_3);
}
diff --git a/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.glsl
index 8343960..08d7667 100644
--- a/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat4 tint_symbol;
-f16mat4 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat4 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16mat4 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.glsl
index 0db9c72..ae3b697 100644
--- a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-mat4 tint_symbol;
-mat4 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat4 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ mat4 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.glsl
index ffb69ed..722f0b7 100644
--- a/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.glsl
@@ -1,19 +1,15 @@
-SKIP: FAILED
-
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-float16_t tint_symbol[];
-float16_t tint_symbol_1[];
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ float16_t tint_symbol_3[];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ float16_t tint_symbol_5[];
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1[0] = tint_symbol[0];
+ v_1.tint_symbol_5[0] = v.tint_symbol_3[0];
}
-error: Error parsing GLSL shader:
-ERROR: 0:4: '' : array size required
-ERROR: 1 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.glsl
index f013b64..af1f3fa 100644
--- a/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.glsl
@@ -1,18 +1,14 @@
-SKIP: FAILED
-
#version 310 es
-float tint_symbol[];
-float tint_symbol_1[];
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ float tint_symbol_3[];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ float tint_symbol_5[];
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1[0] = tint_symbol[0];
+ v_1.tint_symbol_5[0] = v.tint_symbol_3[0];
}
-error: Error parsing GLSL shader:
-ERROR: 0:3: '' : array size required
-ERROR: 1 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.glsl
index 913c168..4c31d2b 100644
--- a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.glsl
@@ -11,8 +11,14 @@
Inner inner;
};
-S tint_symbol;
-S tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ S tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ S tint_symbol_5;
+} v_1;
void tint_store_and_preserve_padding_1(inout Inner target, Inner value_param) {
target.scalar_f16 = value_param.scalar_f16;
target.vec3_f16 = value_param.vec3_f16;
@@ -23,6 +29,6 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- S t = tint_symbol;
- tint_store_and_preserve_padding(tint_symbol_1, t);
+ S t = v.tint_symbol_3;
+ tint_store_and_preserve_padding(v_1.tint_symbol_5, t);
}
diff --git a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.glsl
index c5f4266..572b729 100644
--- a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.glsl
@@ -10,8 +10,14 @@
Inner inner;
};
-S tint_symbol;
-S tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ S tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ S tint_symbol_5;
+} v_1;
void tint_store_and_preserve_padding_1(inout Inner target, Inner value_param) {
target.scalar_f32 = value_param.scalar_f32;
target.vec3_f32 = value_param.vec3_f32;
@@ -22,6 +28,6 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- S t = tint_symbol;
- tint_store_and_preserve_padding(tint_symbol_1, t);
+ S t = v.tint_symbol_3;
+ tint_store_and_preserve_padding(v_1.tint_symbol_5, t);
}
diff --git a/test/tint/buffer/storage/types/u32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/u32.wgsl.expected.ir.glsl
index e682834..aa7d4bc 100644
--- a/test/tint/buffer/storage/types/u32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/u32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-uint tint_symbol;
-uint tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ uint tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ uint tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.glsl
index 60fb846..bca2949 100644
--- a/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16vec2 tint_symbol;
-f16vec2 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16vec2 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16vec2 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.glsl
index bddb84f..5d2f7f9 100644
--- a/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-vec2 tint_symbol;
-vec2 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ vec2 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ vec2 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.glsl
index 0c93b56..fa1f4de 100644
--- a/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-ivec2 tint_symbol;
-ivec2 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ ivec2 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ ivec2 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.glsl
index 46376f2..5400324 100644
--- a/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-uvec2 tint_symbol;
-uvec2 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ uvec2 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ uvec2 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.glsl
index 21a3082..56ec962 100644
--- a/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16vec3 tint_symbol;
-f16vec3 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16vec3 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16vec3 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.glsl
index f8123fd..818d7c4 100644
--- a/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-vec3 tint_symbol;
-vec3 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ vec3 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ vec3 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.glsl
index 7bf0ec0..65096a4 100644
--- a/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-ivec3 tint_symbol;
-ivec3 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ ivec3 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ ivec3 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.glsl
index d4eea94..b46585d 100644
--- a/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-uvec3 tint_symbol;
-uvec3 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ uvec3 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ uvec3 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.glsl
index 3ec0b0f..34ac047 100644
--- a/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16vec4 tint_symbol;
-f16vec4 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16vec4 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ f16vec4 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.glsl
index dcc2263..38ce4f8 100644
--- a/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-vec4 tint_symbol;
-vec4 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ vec4 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ vec4 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.glsl
index 66ea2d0..d8ee91a 100644
--- a/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-ivec4 tint_symbol;
-ivec4 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ ivec4 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ ivec4 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.glsl
index 88e7764..8cd5b37 100644
--- a/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.glsl
@@ -1,8 +1,14 @@
#version 310 es
-uvec4 tint_symbol;
-uvec4 tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ uvec4 tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ uvec4 tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..e656cfc 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,47 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat2x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x2_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ int v_2 = i();
+ mat2 v_3 = mat2(v.tint_symbol[v_2].col0, v.tint_symbol[v_2].col1);
+ vec2 v_4 = v_3[i()];
+ mat2x2_f32_std140 v_5[4] = v.tint_symbol;
+ mat2 v_6[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)));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = mat2(v_5[v_8].col0, v_5[v_8].col1);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ mat2 l_a[4] = v_6;
+ mat2 l_a_i = v_3;
+ vec2 l_a_i_i = v_4;
+ v_1.tint_symbol_2 = (((v_4[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..5266328 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,40 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat2x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x2_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat2 v_2 = mat2(v.tint_symbol[2].col0, v.tint_symbol[2].col1);
+ mat2x2_f32_std140 v_3[4] = v.tint_symbol;
+ mat2 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = mat2(v_3[v_6].col0, v_3[v_6].col1);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ mat2 l_a[4] = v_4;
+ mat2 l_a_i = v_2;
+ vec2 l_a_i_i = v_2[1];
+ v_1.tint_symbol_2 = (((v_2[1][0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl
index 35e69b0..ca3ed023 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x2_f32/to_builtin.wgsl.expected.ir.glsl
@@ -1,12 +1,23 @@
#version 310 es
-uniform mat2 u[4];
-float s;
+struct mat2x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x2_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat2 t = transpose(u[2]);
- float l = length(u[0][1].yx);
- float a = abs(u[0][1].yx[0u]);
- float v = (t[0][0u] + float(l));
- s = (v + float(a));
+ mat2 t = transpose(mat2(v.tint_symbol[2].col0, v.tint_symbol[2].col1));
+ float l = length(v.tint_symbol[0].col1.yx);
+ float a = abs(v.tint_symbol[0].col1.yx[0u]);
+ float v_2 = (t[0][0u] + float(l));
+ v_1.tint_symbol_2 = (v_2 + float(a));
}
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 0c1acc3..9e9e0e6 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,7 +1,18 @@
#version 310 es
-uniform mat2 u[4];
-float s;
+struct mat2x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x2_f32_std140 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_2;
float a(mat2 a_1[4]) {
return a_1[0][0][0u];
}
@@ -16,8 +27,25 @@
}
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]));
+ mat2x2_f32_std140 v_3[4] = v_1.tint_symbol;
+ mat2 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = mat2(v_3[v_6].col0, v_3[v_6].col1);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ float v_7 = a(v_4);
+ float v_8 = (v_7 + b(mat2(v_1.tint_symbol[1].col0, v_1.tint_symbol[1].col1)));
+ float v_9 = (v_8 + c(v_1.tint_symbol[1].col0.yx));
+ v_2.tint_symbol_2 = (v_9 + d(v_1.tint_symbol[1].col0.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 01955e5..f537280 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,13 +1,41 @@
#version 310 es
-uniform mat2 u[4];
-float s;
+struct mat2x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x2_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
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;
+ mat2x2_f32_std140 v_2[4] = v.tint_symbol;
+ mat2 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = mat2(v_2[v_5].col0, v_2[v_5].col1);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_3;
+ p[1] = mat2(v.tint_symbol[2].col0, v.tint_symbol[2].col1);
+ p[1][0] = v.tint_symbol[0].col1.yx;
+ p[1][0][0u] = v.tint_symbol[0].col1.x;
+ v_1.tint_symbol_2 = 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 f118684..b51a294 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,39 @@
#version 310 es
-uniform mat2 u[4];
-mat2 s[4];
+struct mat2x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x2_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat2 tint_symbol_2[4];
+} v_1;
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;
+ mat2x2_f32_std140 v_2[4] = v.tint_symbol;
+ mat2 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = mat2(v_2[v_5].col0, v_2[v_5].col1);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ v_1.tint_symbol_2 = v_3;
+ v_1.tint_symbol_2[1] = mat2(v.tint_symbol[2].col0, v.tint_symbol[2].col1);
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0].col1.yx;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0].col1.x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..ed61fa2 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,48 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat2x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ int v_2 = i();
+ f16mat2x3 v_3 = f16mat2x3(v.tint_symbol[v_2].col0, v.tint_symbol[v_2].col1);
+ f16vec3 v_4 = v_3[i()];
+ mat2x3_f16_std140 v_5[4] = v.tint_symbol;
+ f16mat2x3 v_6[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)));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = f16mat2x3(v_5[v_8].col0, v_5[v_8].col1);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ f16mat2x3 l_a[4] = v_6;
+ f16mat2x3 l_a_i = v_3;
+ f16vec3 l_a_i_i = v_4;
+ v_1.tint_symbol_2 = (((v_4[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..5a9332e 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,41 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat2x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2x3 v_2 = f16mat2x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1);
+ mat2x3_f16_std140 v_3[4] = v.tint_symbol;
+ f16mat2x3 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = f16mat2x3(v_3[v_6].col0, v_3[v_6].col1);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ f16mat2x3 l_a[4] = v_4;
+ f16mat2x3 l_a_i = v_2;
+ f16vec3 l_a_i_i = v_2[1];
+ v_1.tint_symbol_2 = (((v_2[1][0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl
index ed7bbb8..ef615bd 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_builtin.wgsl.expected.ir.glsl
@@ -1,13 +1,24 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x3 u[4];
-float16_t s;
+struct mat2x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat3x2 t = transpose(u[2]);
- float16_t l = length(u[0][1].zxy);
- float16_t a = abs(u[0][1].zxy[0u]);
- float16_t v = float16_t(a);
- s = ((v + float16_t(l)) + t[0][0u]);
+ f16mat3x2 t = transpose(f16mat2x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1));
+ float16_t l = length(v.tint_symbol[0].col1.zxy);
+ float16_t a = abs(v.tint_symbol[0].col1.zxy[0u]);
+ float16_t v_2 = float16_t(a);
+ v_1.tint_symbol_2 = ((v_2 + float16_t(l)) + t[0][0u]);
}
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 97e2bb0..885bee2 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,8 +1,19 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x3 u[4];
-float16_t s;
+struct mat2x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f16_std140 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_2;
float16_t a(f16mat2x3 a_1[4]) {
return a_1[0][0][0u];
}
@@ -17,8 +28,25 @@
}
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]));
+ mat2x3_f16_std140 v_3[4] = v_1.tint_symbol;
+ f16mat2x3 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = f16mat2x3(v_3[v_6].col0, v_3[v_6].col1);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ float16_t v_7 = a(v_4);
+ float16_t v_8 = (v_7 + b(f16mat2x3(v_1.tint_symbol[1].col0, v_1.tint_symbol[1].col1)));
+ float16_t v_9 = (v_8 + c(v_1.tint_symbol[1].col0.zxy));
+ v_2.tint_symbol_2 = (v_9 + d(v_1.tint_symbol[1].col0.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 927fc00..5bd634f 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,14 +1,42 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x3 u[4];
-float16_t s;
+struct mat2x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
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;
+ mat2x3_f16_std140 v_2[4] = v.tint_symbol;
+ f16mat2x3 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = f16mat2x3(v_2[v_5].col0, v_2[v_5].col1);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_3;
+ p[1] = f16mat2x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1);
+ p[1][0] = v.tint_symbol[0].col1.zxy;
+ p[1][0][0u] = v.tint_symbol[0].col1.x;
+ v_1.tint_symbol_2 = 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 b5f531a..444c0d5 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,24 +1,35 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x3 u[4];
-f16mat2x3 s[4];
+struct mat2x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat2x3 tint_symbol_2[4];
+} v_1;
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;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -26,8 +37,25 @@
}
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;
+ mat2x3_f16_std140 v_4[4] = v.tint_symbol;
+ f16mat2x3 v_5[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)));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = f16mat2x3(v_4[v_7].col0, v_4[v_7].col1);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], f16mat2x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1));
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0].col1.zxy;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0].col1.x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..811fcf9 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,47 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat2x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ int v_2 = i();
+ mat2x3 v_3 = mat2x3(v.tint_symbol[v_2].col0, v.tint_symbol[v_2].col1);
+ vec3 v_4 = v_3[i()];
+ mat2x3_f32_std140 v_5[4] = v.tint_symbol;
+ mat2x3 v_6[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)));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = mat2x3(v_5[v_8].col0, v_5[v_8].col1);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ mat2x3 l_a[4] = v_6;
+ mat2x3 l_a_i = v_3;
+ vec3 l_a_i_i = v_4;
+ v_1.tint_symbol_2 = (((v_4[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..96f4ff8 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,40 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat2x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat2x3 v_2 = mat2x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1);
+ mat2x3_f32_std140 v_3[4] = v.tint_symbol;
+ mat2x3 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = mat2x3(v_3[v_6].col0, v_3[v_6].col1);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ mat2x3 l_a[4] = v_4;
+ mat2x3 l_a_i = v_2;
+ vec3 l_a_i_i = v_2[1];
+ v_1.tint_symbol_2 = (((v_2[1][0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl
index c4060b5..1cd6f65 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_builtin.wgsl.expected.ir.glsl
@@ -1,12 +1,23 @@
#version 310 es
-uniform mat2x3 u[4];
-float s;
+struct mat2x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat3x2 t = transpose(u[2]);
- float l = length(u[0][1].zxy);
- float a = abs(u[0][1].zxy[0u]);
- float v = (t[0][0u] + float(l));
- s = (v + float(a));
+ mat3x2 t = transpose(mat2x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1));
+ float l = length(v.tint_symbol[0].col1.zxy);
+ float a = abs(v.tint_symbol[0].col1.zxy[0u]);
+ float v_2 = (t[0][0u] + float(l));
+ v_1.tint_symbol_2 = (v_2 + float(a));
}
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 2fc8aee..3116a4d 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,7 +1,18 @@
#version 310 es
-uniform mat2x3 u[4];
-float s;
+struct mat2x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f32_std140 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_2;
float a(mat2x3 a_1[4]) {
return a_1[0][0][0u];
}
@@ -16,8 +27,25 @@
}
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]));
+ mat2x3_f32_std140 v_3[4] = v_1.tint_symbol;
+ mat2x3 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = mat2x3(v_3[v_6].col0, v_3[v_6].col1);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ float v_7 = a(v_4);
+ float v_8 = (v_7 + b(mat2x3(v_1.tint_symbol[1].col0, v_1.tint_symbol[1].col1)));
+ float v_9 = (v_8 + c(v_1.tint_symbol[1].col0.zxy));
+ v_2.tint_symbol_2 = (v_9 + d(v_1.tint_symbol[1].col0.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 ec95663..8428aa9 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,13 +1,41 @@
#version 310 es
-uniform mat2x3 u[4];
-float s;
+struct mat2x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
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;
+ mat2x3_f32_std140 v_2[4] = v.tint_symbol;
+ mat2x3 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = mat2x3(v_2[v_5].col0, v_2[v_5].col1);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_3;
+ p[1] = mat2x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1);
+ p[1][0] = v.tint_symbol[0].col1.zxy;
+ p[1][0][0u] = v.tint_symbol[0].col1.x;
+ v_1.tint_symbol_2 = 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 456d7bc..8e6aaf6 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,23 +1,34 @@
#version 310 es
-uniform mat2x3 u[4];
-mat2x3 s[4];
+struct mat2x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat2x3 tint_symbol_2[4];
+} v_1;
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;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -25,8 +36,25 @@
}
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;
+ mat2x3_f32_std140 v_4[4] = v.tint_symbol;
+ mat2x3 v_5[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)));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = mat2x3(v_4[v_7].col0, v_4[v_7].col1);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], mat2x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1));
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0].col1.zxy;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0].col1.x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..8b6a0d2 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,48 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat2x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x4_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ int v_2 = i();
+ f16mat2x4 v_3 = f16mat2x4(v.tint_symbol[v_2].col0, v.tint_symbol[v_2].col1);
+ f16vec4 v_4 = v_3[i()];
+ mat2x4_f16_std140 v_5[4] = v.tint_symbol;
+ f16mat2x4 v_6[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)));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = f16mat2x4(v_5[v_8].col0, v_5[v_8].col1);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ f16mat2x4 l_a[4] = v_6;
+ f16mat2x4 l_a_i = v_3;
+ f16vec4 l_a_i_i = v_4;
+ v_1.tint_symbol_2 = (((v_4[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..b80d7d8 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,41 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat2x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x4_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2x4 v_2 = f16mat2x4(v.tint_symbol[2].col0, v.tint_symbol[2].col1);
+ mat2x4_f16_std140 v_3[4] = v.tint_symbol;
+ f16mat2x4 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = f16mat2x4(v_3[v_6].col0, v_3[v_6].col1);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ f16mat2x4 l_a[4] = v_4;
+ f16mat2x4 l_a_i = v_2;
+ f16vec4 l_a_i_i = v_2[1];
+ v_1.tint_symbol_2 = (((v_2[1][0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl
index 549bfb1..168c623 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f16/to_builtin.wgsl.expected.ir.glsl
@@ -1,13 +1,24 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x4 u[4];
-float16_t s;
+struct mat2x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x4_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat4x2 t = transpose(u[2]);
- float16_t l = length(u[0][1].ywxz);
- float16_t a = abs(u[0][1].ywxz[0u]);
- float16_t v = (t[0][0u] + float16_t(l));
- s = (v + float16_t(a));
+ f16mat4x2 t = transpose(f16mat2x4(v.tint_symbol[2].col0, v.tint_symbol[2].col1));
+ float16_t l = length(v.tint_symbol[0].col1.ywxz);
+ float16_t a = abs(v.tint_symbol[0].col1.ywxz[0u]);
+ float16_t v_2 = (t[0][0u] + float16_t(l));
+ v_1.tint_symbol_2 = (v_2 + float16_t(a));
}
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 e485610..d7d2312 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,8 +1,19 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x4 u[4];
-float16_t s;
+struct mat2x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x4_f16_std140 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_2;
float16_t a(f16mat2x4 a_1[4]) {
return a_1[0][0][0u];
}
@@ -17,8 +28,25 @@
}
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]));
+ mat2x4_f16_std140 v_3[4] = v_1.tint_symbol;
+ f16mat2x4 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = f16mat2x4(v_3[v_6].col0, v_3[v_6].col1);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ float16_t v_7 = a(v_4);
+ float16_t v_8 = (v_7 + b(f16mat2x4(v_1.tint_symbol[1].col0, v_1.tint_symbol[1].col1)));
+ float16_t v_9 = (v_8 + c(v_1.tint_symbol[1].col0.ywxz));
+ v_2.tint_symbol_2 = (v_9 + d(v_1.tint_symbol[1].col0.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 b23998f..6f07774 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,14 +1,42 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x4 u[4];
-float16_t s;
+struct mat2x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x4_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
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;
+ mat2x4_f16_std140 v_2[4] = v.tint_symbol;
+ f16mat2x4 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = f16mat2x4(v_2[v_5].col0, v_2[v_5].col1);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_3;
+ p[1] = f16mat2x4(v.tint_symbol[2].col0, v.tint_symbol[2].col1);
+ p[1][0] = v.tint_symbol[0].col1.ywxz;
+ p[1][0][0u] = v.tint_symbol[0].col1.x;
+ v_1.tint_symbol_2 = 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 8cecd01..1ab7180 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,12 +1,40 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x4 u[4];
-f16mat2x4 s[4];
+struct mat2x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat2x4_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat2x4 tint_symbol_2[4];
+} v_1;
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;
+ mat2x4_f16_std140 v_2[4] = v.tint_symbol;
+ f16mat2x4 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = f16mat2x4(v_2[v_5].col0, v_2[v_5].col1);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ v_1.tint_symbol_2 = v_3;
+ v_1.tint_symbol_2[1] = f16mat2x4(v.tint_symbol[2].col0, v.tint_symbol[2].col1);
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0].col1.ywxz;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0].col1.x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl
index 5053603..93eecb0 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x4_f32/to_builtin.wgsl.expected.ir.glsl
@@ -1,12 +1,18 @@
#version 310 es
-uniform mat2x4 u[4];
-float s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat2x4 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat4x2 t = transpose(u[2]);
- float l = length(u[0][1].ywxz);
- float a = abs(u[0][1].ywxz[0u]);
- float v = (t[0][0u] + float(l));
- s = (v + float(a));
+ mat4x2 t = transpose(v.tint_symbol[2]);
+ float l = length(v.tint_symbol[0][1].ywxz);
+ float a = abs(v.tint_symbol[0][1].ywxz[0u]);
+ float v_2 = (t[0][0u] + float(l));
+ v_1.tint_symbol_2 = (v_2 + float(a));
}
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 cd8b05d..ee313dd 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,7 +1,13 @@
#version 310 es
-uniform mat2x4 u[4];
-float s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat2x4 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_2;
float a(mat2x4 a_1[4]) {
return a_1[0][0][0u];
}
@@ -16,8 +22,8 @@
}
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]));
+ float v_3 = a(v_1.tint_symbol);
+ float v_4 = (v_3 + b(v_1.tint_symbol[1]));
+ float v_5 = (v_4 + c(v_1.tint_symbol[1][0].ywxz));
+ v_2.tint_symbol_2 = (v_5 + d(v_1.tint_symbol[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 c9ea1d9..f43927e 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,13 +1,19 @@
#version 310 es
-uniform mat2x4 u[4];
-float s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat2x4 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
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;
+ p = v.tint_symbol;
+ p[1] = v.tint_symbol[2];
+ p[1][0] = v.tint_symbol[0][1].ywxz;
+ p[1][0][0u] = v.tint_symbol[0][1].x;
+ v_1.tint_symbol_2 = 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 82d22eb..c86de30 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,17 @@
#version 310 es
-uniform mat2x4 u[4];
-mat2x4 s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat2x4 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat2x4 tint_symbol_2[4];
+} v_1;
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;
+ v_1.tint_symbol_2 = v.tint_symbol;
+ v_1.tint_symbol_2[1] = v.tint_symbol[2];
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0][1].ywxz;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0][1].x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..2199f35 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,48 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat3x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat3x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ int v_2 = i();
+ mat3 v_3 = mat3(v.tint_symbol[v_2].col0, v.tint_symbol[v_2].col1, v.tint_symbol[v_2].col2);
+ vec3 v_4 = v_3[i()];
+ mat3x3_f32_std140 v_5[4] = v.tint_symbol;
+ mat3 v_6[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)));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = mat3(v_5[v_8].col0, v_5[v_8].col1, v_5[v_8].col2);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ mat3 l_a[4] = v_6;
+ mat3 l_a_i = v_3;
+ vec3 l_a_i_i = v_4;
+ v_1.tint_symbol_2 = (((v_4[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..fd53c51 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,41 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat3x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat3x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat3 v_2 = mat3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2);
+ mat3x3_f32_std140 v_3[4] = v.tint_symbol;
+ mat3 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = mat3(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ mat3 l_a[4] = v_4;
+ mat3 l_a_i = v_2;
+ vec3 l_a_i_i = v_2[1];
+ v_1.tint_symbol_2 = (((v_2[1][0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl
index 4e7d27b..a0e6802 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_builtin.wgsl.expected.ir.glsl
@@ -1,12 +1,24 @@
#version 310 es
-uniform mat3 u[4];
-float s;
+struct mat3x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat3x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat3 t = transpose(u[2]);
- float l = length(u[0][1].zxy);
- float a = abs(u[0][1].zxy[0u]);
- float v = (t[0][0u] + float(l));
- s = (v + float(a));
+ mat3 t = transpose(mat3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2));
+ float l = length(v.tint_symbol[0].col1.zxy);
+ float a = abs(v.tint_symbol[0].col1.zxy[0u]);
+ float v_2 = (t[0][0u] + float(l));
+ v_1.tint_symbol_2 = (v_2 + float(a));
}
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 1583f13..d735018 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,7 +1,19 @@
#version 310 es
-uniform mat3 u[4];
-float s;
+struct mat3x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat3x3_f32_std140 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_2;
float a(mat3 a_1[4]) {
return a_1[0][0][0u];
}
@@ -16,8 +28,25 @@
}
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]));
+ mat3x3_f32_std140 v_3[4] = v_1.tint_symbol;
+ mat3 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = mat3(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ float v_7 = a(v_4);
+ float v_8 = (v_7 + b(mat3(v_1.tint_symbol[1].col0, v_1.tint_symbol[1].col1, v_1.tint_symbol[1].col2)));
+ float v_9 = (v_8 + c(v_1.tint_symbol[1].col0.zxy));
+ v_2.tint_symbol_2 = (v_9 + d(v_1.tint_symbol[1].col0.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 3df2911..bf3c870 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,13 +1,42 @@
#version 310 es
-uniform mat3 u[4];
-float s;
+struct mat3x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat3x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
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;
+ mat3x3_f32_std140 v_2[4] = v.tint_symbol;
+ mat3 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = mat3(v_2[v_5].col0, v_2[v_5].col1, v_2[v_5].col2);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_3;
+ p[1] = mat3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2);
+ p[1][0] = v.tint_symbol[0].col1.zxy;
+ p[1][0][0u] = v.tint_symbol[0].col1.x;
+ v_1.tint_symbol_2 = 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 ff71e5d..5eb4da5 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,7 +1,19 @@
#version 310 es
-uniform mat3 u[4];
-mat3 s[4];
+struct mat3x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat3x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat3 tint_symbol_2[4];
+} v_1;
void tint_store_and_preserve_padding_1(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,16 +21,16 @@
}
void tint_store_and_preserve_padding(inout mat3 target[4], mat3 value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -26,8 +38,25 @@
}
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;
+ mat3x3_f32_std140 v_4[4] = v.tint_symbol;
+ mat3 v_5[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)));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = mat3(v_4[v_7].col0, v_4[v_7].col1, v_4[v_7].col2);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], mat3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2));
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0].col1.zxy;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0].col1.x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl
index 97c369c..3c1b272 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x4_f32/to_builtin.wgsl.expected.ir.glsl
@@ -1,12 +1,18 @@
#version 310 es
-uniform mat3x4 u[4];
-float s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat3x4 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat4x3 t = transpose(u[2]);
- float l = length(u[0][1].ywxz);
- float a = abs(u[0][1].ywxz[0u]);
- float v = (t[0][0u] + float(l));
- s = (v + float(a));
+ mat4x3 t = transpose(v.tint_symbol[2]);
+ float l = length(v.tint_symbol[0][1].ywxz);
+ float a = abs(v.tint_symbol[0][1].ywxz[0u]);
+ float v_2 = (t[0][0u] + float(l));
+ v_1.tint_symbol_2 = (v_2 + float(a));
}
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 8fafacb..97aaca3 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,7 +1,13 @@
#version 310 es
-uniform mat3x4 u[4];
-float s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat3x4 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_2;
float a(mat3x4 a_1[4]) {
return a_1[0][0][0u];
}
@@ -16,8 +22,8 @@
}
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]));
+ float v_3 = a(v_1.tint_symbol);
+ float v_4 = (v_3 + b(v_1.tint_symbol[1]));
+ float v_5 = (v_4 + c(v_1.tint_symbol[1][0].ywxz));
+ v_2.tint_symbol_2 = (v_5 + d(v_1.tint_symbol[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 db619a5..1302205 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,13 +1,19 @@
#version 310 es
-uniform mat3x4 u[4];
-float s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat3x4 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
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;
+ p = v.tint_symbol;
+ p[1] = v.tint_symbol[2];
+ p[1][0] = v.tint_symbol[0][1].ywxz;
+ p[1][0][0u] = v.tint_symbol[0][1].x;
+ v_1.tint_symbol_2 = 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 d5c36b9..519a637 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,17 @@
#version 310 es
-uniform mat3x4 u[4];
-mat3x4 s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat3x4 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat3x4 tint_symbol_2[4];
+} v_1;
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;
+ v_1.tint_symbol_2 = v.tint_symbol;
+ v_1.tint_symbol_2[1] = v.tint_symbol[2];
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0][1].ywxz;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0][1].x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..ea4dd09 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,50 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat4x2_f16_std140 {
+ f16vec2 col0;
+ f16vec2 col1;
+ f16vec2 col2;
+ f16vec2 col3;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ int v_2 = i();
+ f16mat4x2 v_3 = f16mat4x2(v.tint_symbol[v_2].col0, v.tint_symbol[v_2].col1, v.tint_symbol[v_2].col2, v.tint_symbol[v_2].col3);
+ f16vec2 v_4 = v_3[i()];
+ mat4x2_f16_std140 v_5[4] = v.tint_symbol;
+ f16mat4x2 v_6[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)));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = f16mat4x2(v_5[v_8].col0, v_5[v_8].col1, v_5[v_8].col2, v_5[v_8].col3);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ f16mat4x2 l_a[4] = v_6;
+ f16mat4x2 l_a_i = v_3;
+ f16vec2 l_a_i_i = v_4;
+ v_1.tint_symbol_2 = (((v_4[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..c96a6d6 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,43 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat4x2_f16_std140 {
+ f16vec2 col0;
+ f16vec2 col1;
+ f16vec2 col2;
+ f16vec2 col3;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4x2 v_2 = f16mat4x2(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ mat4x2_f16_std140 v_3[4] = v.tint_symbol;
+ f16mat4x2 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = f16mat4x2(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2, v_3[v_6].col3);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ f16mat4x2 l_a[4] = v_4;
+ f16mat4x2 l_a_i = v_2;
+ f16vec2 l_a_i_i = v_2[1];
+ v_1.tint_symbol_2 = (((v_2[1][0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl
index 6be925f..8ae8928 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f16/to_builtin.wgsl.expected.ir.glsl
@@ -1,13 +1,26 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x2 u[4];
-float16_t s;
+struct mat4x2_f16_std140 {
+ f16vec2 col0;
+ f16vec2 col1;
+ f16vec2 col2;
+ f16vec2 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat2x4 t = transpose(u[2]);
- float16_t l = length(u[0][1].yx);
- float16_t a = abs(u[0][1].yx[0u]);
- float16_t v = (t[0][0u] + float16_t(l));
- s = (v + float16_t(a));
+ f16mat2x4 t = transpose(f16mat4x2(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3));
+ float16_t l = length(v.tint_symbol[0].col1.yx);
+ float16_t a = abs(v.tint_symbol[0].col1.yx[0u]);
+ float16_t v_2 = (t[0][0u] + float16_t(l));
+ v_1.tint_symbol_2 = (v_2 + float16_t(a));
}
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 27f64ae..dd4f2e5 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,8 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x2 u[4];
-float16_t s;
+struct mat4x2_f16_std140 {
+ f16vec2 col0;
+ f16vec2 col1;
+ f16vec2 col2;
+ f16vec2 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f16_std140 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_2;
float16_t a(f16mat4x2 a_1[4]) {
return a_1[0][0][0u];
}
@@ -17,8 +30,25 @@
}
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]));
+ mat4x2_f16_std140 v_3[4] = v_1.tint_symbol;
+ f16mat4x2 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = f16mat4x2(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2, v_3[v_6].col3);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ float16_t v_7 = a(v_4);
+ float16_t v_8 = (v_7 + b(f16mat4x2(v_1.tint_symbol[1].col0, v_1.tint_symbol[1].col1, v_1.tint_symbol[1].col2, v_1.tint_symbol[1].col3)));
+ float16_t v_9 = (v_8 + c(v_1.tint_symbol[1].col0.yx));
+ v_2.tint_symbol_2 = (v_9 + d(v_1.tint_symbol[1].col0.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 8eee845..46a92db 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,14 +1,44 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x2 u[4];
-float16_t s;
+struct mat4x2_f16_std140 {
+ f16vec2 col0;
+ f16vec2 col1;
+ f16vec2 col2;
+ f16vec2 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
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;
+ mat4x2_f16_std140 v_2[4] = v.tint_symbol;
+ f16mat4x2 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = f16mat4x2(v_2[v_5].col0, v_2[v_5].col1, v_2[v_5].col2, v_2[v_5].col3);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_3;
+ p[1] = f16mat4x2(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ p[1][0] = v.tint_symbol[0].col1.yx;
+ p[1][0][0u] = v.tint_symbol[0].col1.x;
+ v_1.tint_symbol_2 = 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 75b5141..23e826e 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,12 +1,42 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x2 u[4];
-f16mat4x2 s[4];
+struct mat4x2_f16_std140 {
+ f16vec2 col0;
+ f16vec2 col1;
+ f16vec2 col2;
+ f16vec2 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat4x2 tint_symbol_2[4];
+} v_1;
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;
+ mat4x2_f16_std140 v_2[4] = v.tint_symbol;
+ f16mat4x2 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = f16mat4x2(v_2[v_5].col0, v_2[v_5].col1, v_2[v_5].col2, v_2[v_5].col3);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ v_1.tint_symbol_2 = v_3;
+ v_1.tint_symbol_2[1] = f16mat4x2(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0].col1.yx;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0].col1.x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..8e0bc3d 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,49 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat4x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+ vec2 col2;
+ vec2 col3;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ int v_2 = i();
+ mat4x2 v_3 = mat4x2(v.tint_symbol[v_2].col0, v.tint_symbol[v_2].col1, v.tint_symbol[v_2].col2, v.tint_symbol[v_2].col3);
+ vec2 v_4 = v_3[i()];
+ mat4x2_f32_std140 v_5[4] = v.tint_symbol;
+ mat4x2 v_6[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)));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = mat4x2(v_5[v_8].col0, v_5[v_8].col1, v_5[v_8].col2, v_5[v_8].col3);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ mat4x2 l_a[4] = v_6;
+ mat4x2 l_a_i = v_3;
+ vec2 l_a_i_i = v_4;
+ v_1.tint_symbol_2 = (((v_4[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..2f58186 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,42 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat4x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+ vec2 col2;
+ vec2 col3;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat4x2 v_2 = mat4x2(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ mat4x2_f32_std140 v_3[4] = v.tint_symbol;
+ mat4x2 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = mat4x2(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2, v_3[v_6].col3);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ mat4x2 l_a[4] = v_4;
+ mat4x2 l_a_i = v_2;
+ vec2 l_a_i_i = v_2[1];
+ v_1.tint_symbol_2 = (((v_2[1][0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl
index 544d3de..9559b27 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x2_f32/to_builtin.wgsl.expected.ir.glsl
@@ -1,12 +1,25 @@
#version 310 es
-uniform mat4x2 u[4];
-float s;
+struct mat4x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+ vec2 col2;
+ vec2 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat2x4 t = transpose(u[2]);
- float l = length(u[0][1].yx);
- float a = abs(u[0][1].yx[0u]);
- float v = (t[0][0u] + float(l));
- s = (v + float(a));
+ mat2x4 t = transpose(mat4x2(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3));
+ float l = length(v.tint_symbol[0].col1.yx);
+ float a = abs(v.tint_symbol[0].col1.yx[0u]);
+ float v_2 = (t[0][0u] + float(l));
+ v_1.tint_symbol_2 = (v_2 + float(a));
}
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 4281537..11ae122 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,7 +1,20 @@
#version 310 es
-uniform mat4x2 u[4];
-float s;
+struct mat4x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+ vec2 col2;
+ vec2 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f32_std140 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_2;
float a(mat4x2 a_1[4]) {
return a_1[0][0][0u];
}
@@ -16,8 +29,25 @@
}
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]));
+ mat4x2_f32_std140 v_3[4] = v_1.tint_symbol;
+ mat4x2 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = mat4x2(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2, v_3[v_6].col3);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ float v_7 = a(v_4);
+ float v_8 = (v_7 + b(mat4x2(v_1.tint_symbol[1].col0, v_1.tint_symbol[1].col1, v_1.tint_symbol[1].col2, v_1.tint_symbol[1].col3)));
+ float v_9 = (v_8 + c(v_1.tint_symbol[1].col0.yx));
+ v_2.tint_symbol_2 = (v_9 + d(v_1.tint_symbol[1].col0.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 96798f7..4288bf9 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,13 +1,43 @@
#version 310 es
-uniform mat4x2 u[4];
-float s;
+struct mat4x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+ vec2 col2;
+ vec2 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
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;
+ mat4x2_f32_std140 v_2[4] = v.tint_symbol;
+ mat4x2 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = mat4x2(v_2[v_5].col0, v_2[v_5].col1, v_2[v_5].col2, v_2[v_5].col3);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_3;
+ p[1] = mat4x2(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ p[1][0] = v.tint_symbol[0].col1.yx;
+ p[1][0][0u] = v.tint_symbol[0].col1.x;
+ v_1.tint_symbol_2 = 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 8188a77..ce00513 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,41 @@
#version 310 es
-uniform mat4x2 u[4];
-mat4x2 s[4];
+struct mat4x2_f32_std140 {
+ vec2 col0;
+ vec2 col1;
+ vec2 col2;
+ vec2 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x2_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat4x2 tint_symbol_2[4];
+} v_1;
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;
+ mat4x2_f32_std140 v_2[4] = v.tint_symbol;
+ mat4x2 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = mat4x2(v_2[v_5].col0, v_2[v_5].col1, v_2[v_5].col2, v_2[v_5].col3);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ v_1.tint_symbol_2 = v_3;
+ v_1.tint_symbol_2[1] = mat4x2(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0].col1.yx;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0].col1.x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..1bc4a1a 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,50 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat4x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+ f16vec3 col2;
+ f16vec3 col3;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ int v_2 = i();
+ f16mat4x3 v_3 = f16mat4x3(v.tint_symbol[v_2].col0, v.tint_symbol[v_2].col1, v.tint_symbol[v_2].col2, v.tint_symbol[v_2].col3);
+ f16vec3 v_4 = v_3[i()];
+ mat4x3_f16_std140 v_5[4] = v.tint_symbol;
+ f16mat4x3 v_6[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)));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = f16mat4x3(v_5[v_8].col0, v_5[v_8].col1, v_5[v_8].col2, v_5[v_8].col3);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ f16mat4x3 l_a[4] = v_6;
+ f16mat4x3 l_a_i = v_3;
+ f16vec3 l_a_i_i = v_4;
+ v_1.tint_symbol_2 = (((v_4[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..f26160e 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,43 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat4x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+ f16vec3 col2;
+ f16vec3 col3;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4x3 v_2 = f16mat4x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ mat4x3_f16_std140 v_3[4] = v.tint_symbol;
+ f16mat4x3 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = f16mat4x3(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2, v_3[v_6].col3);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ f16mat4x3 l_a[4] = v_4;
+ f16mat4x3 l_a_i = v_2;
+ f16vec3 l_a_i_i = v_2[1];
+ v_1.tint_symbol_2 = (((v_2[1][0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl
index 3f9e0b6..ed8b179 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_builtin.wgsl.expected.ir.glsl
@@ -1,13 +1,26 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x3 u[4];
-float16_t s;
+struct mat4x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+ f16vec3 col2;
+ f16vec3 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat3x4 t = transpose(u[2]);
- float16_t l = length(u[0][1].zxy);
- float16_t a = abs(u[0][1].zxy[0u]);
- float16_t v = (t[0][0u] + float16_t(l));
- s = (v + float16_t(a));
+ f16mat3x4 t = transpose(f16mat4x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3));
+ float16_t l = length(v.tint_symbol[0].col1.zxy);
+ float16_t a = abs(v.tint_symbol[0].col1.zxy[0u]);
+ float16_t v_2 = (t[0][0u] + float16_t(l));
+ v_1.tint_symbol_2 = (v_2 + float16_t(a));
}
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 5df0efc..4bcd106 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,8 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x3 u[4];
-float16_t s;
+struct mat4x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+ f16vec3 col2;
+ f16vec3 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f16_std140 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_2;
float16_t a(f16mat4x3 a_1[4]) {
return a_1[0][0][0u];
}
@@ -17,8 +30,25 @@
}
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]));
+ mat4x3_f16_std140 v_3[4] = v_1.tint_symbol;
+ f16mat4x3 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = f16mat4x3(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2, v_3[v_6].col3);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ float16_t v_7 = a(v_4);
+ float16_t v_8 = (v_7 + b(f16mat4x3(v_1.tint_symbol[1].col0, v_1.tint_symbol[1].col1, v_1.tint_symbol[1].col2, v_1.tint_symbol[1].col3)));
+ float16_t v_9 = (v_8 + c(v_1.tint_symbol[1].col0.zxy));
+ v_2.tint_symbol_2 = (v_9 + d(v_1.tint_symbol[1].col0.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 229c910..7c81ba5 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,14 +1,44 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x3 u[4];
-float16_t s;
+struct mat4x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+ f16vec3 col2;
+ f16vec3 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
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;
+ mat4x3_f16_std140 v_2[4] = v.tint_symbol;
+ f16mat4x3 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = f16mat4x3(v_2[v_5].col0, v_2[v_5].col1, v_2[v_5].col2, v_2[v_5].col3);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_3;
+ p[1] = f16mat4x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ p[1][0] = v.tint_symbol[0].col1.zxy;
+ p[1][0][0u] = v.tint_symbol[0].col1.x;
+ v_1.tint_symbol_2 = 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 d9a0ddf..d55b18a 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,8 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x3 u[4];
-f16mat4x3 s[4];
+struct mat4x3_f16_std140 {
+ f16vec3 col0;
+ f16vec3 col1;
+ f16vec3 col2;
+ f16vec3 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat4x3 tint_symbol_2[4];
+} v_1;
void tint_store_and_preserve_padding_1(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,16 +24,16 @@
}
void tint_store_and_preserve_padding(inout f16mat4x3 target[4], f16mat4x3 value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -28,8 +41,25 @@
}
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;
+ mat4x3_f16_std140 v_4[4] = v.tint_symbol;
+ f16mat4x3 v_5[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)));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = f16mat4x3(v_4[v_7].col0, v_4[v_7].col1, v_4[v_7].col2, v_4[v_7].col3);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], f16mat4x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3));
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0].col1.zxy;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0].col1.x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..1d6c3ee 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,49 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat4x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+ vec3 col3;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ int v_2 = i();
+ mat4x3 v_3 = mat4x3(v.tint_symbol[v_2].col0, v.tint_symbol[v_2].col1, v.tint_symbol[v_2].col2, v.tint_symbol[v_2].col3);
+ vec3 v_4 = v_3[i()];
+ mat4x3_f32_std140 v_5[4] = v.tint_symbol;
+ mat4x3 v_6[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)));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = mat4x3(v_5[v_8].col0, v_5[v_8].col1, v_5[v_8].col2, v_5[v_8].col3);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ mat4x3 l_a[4] = v_6;
+ mat4x3 l_a_i = v_3;
+ vec3 l_a_i_i = v_4;
+ v_1.tint_symbol_2 = (((v_4[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..3220403 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,42 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat4x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+ vec3 col3;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat4x3 v_2 = mat4x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ mat4x3_f32_std140 v_3[4] = v.tint_symbol;
+ mat4x3 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = mat4x3(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2, v_3[v_6].col3);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ mat4x3 l_a[4] = v_4;
+ mat4x3 l_a_i = v_2;
+ vec3 l_a_i_i = v_2[1];
+ v_1.tint_symbol_2 = (((v_2[1][0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl
index 881319b..68d75ce 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_builtin.wgsl.expected.ir.glsl
@@ -1,12 +1,25 @@
#version 310 es
-uniform mat4x3 u[4];
-float s;
+struct mat4x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+ vec3 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat3x4 t = transpose(u[2]);
- float l = length(u[0][1].zxy);
- float a = abs(u[0][1].zxy[0u]);
- float v = (t[0][0u] + float(l));
- s = (v + float(a));
+ mat3x4 t = transpose(mat4x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3));
+ float l = length(v.tint_symbol[0].col1.zxy);
+ float a = abs(v.tint_symbol[0].col1.zxy[0u]);
+ float v_2 = (t[0][0u] + float(l));
+ v_1.tint_symbol_2 = (v_2 + float(a));
}
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 89d0af7..38adc46 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,7 +1,20 @@
#version 310 es
-uniform mat4x3 u[4];
-float s;
+struct mat4x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+ vec3 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f32_std140 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_2;
float a(mat4x3 a_1[4]) {
return a_1[0][0][0u];
}
@@ -16,8 +29,25 @@
}
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]));
+ mat4x3_f32_std140 v_3[4] = v_1.tint_symbol;
+ mat4x3 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = mat4x3(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2, v_3[v_6].col3);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ float v_7 = a(v_4);
+ float v_8 = (v_7 + b(mat4x3(v_1.tint_symbol[1].col0, v_1.tint_symbol[1].col1, v_1.tint_symbol[1].col2, v_1.tint_symbol[1].col3)));
+ float v_9 = (v_8 + c(v_1.tint_symbol[1].col0.zxy));
+ v_2.tint_symbol_2 = (v_9 + d(v_1.tint_symbol[1].col0.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 308277c..f787ff1 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,13 +1,43 @@
#version 310 es
-uniform mat4x3 u[4];
-float s;
+struct mat4x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+ vec3 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
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;
+ mat4x3_f32_std140 v_2[4] = v.tint_symbol;
+ mat4x3 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = mat4x3(v_2[v_5].col0, v_2[v_5].col1, v_2[v_5].col2, v_2[v_5].col3);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_3;
+ p[1] = mat4x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ p[1][0] = v.tint_symbol[0].col1.zxy;
+ p[1][0][0u] = v.tint_symbol[0].col1.x;
+ v_1.tint_symbol_2 = 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 1480802..f16c129 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,7 +1,20 @@
#version 310 es
-uniform mat4x3 u[4];
-mat4x3 s[4];
+struct mat4x3_f32_std140 {
+ vec3 col0;
+ vec3 col1;
+ vec3 col2;
+ vec3 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x3_f32_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat4x3 tint_symbol_2[4];
+} v_1;
void tint_store_and_preserve_padding_1(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,16 +23,16 @@
}
void tint_store_and_preserve_padding(inout mat4x3 target[4], mat4x3 value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -27,8 +40,25 @@
}
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;
+ mat4x3_f32_std140 v_4[4] = v.tint_symbol;
+ mat4x3 v_5[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)));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = mat4x3(v_4[v_7].col0, v_4[v_7].col1, v_4[v_7].col2, v_4[v_7].col3);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], mat4x3(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3));
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0].col1.zxy;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0].col1.x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..1efd1c3 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,50 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat4x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+ f16vec4 col2;
+ f16vec4 col3;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x4_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ int v_2 = i();
+ f16mat4 v_3 = f16mat4(v.tint_symbol[v_2].col0, v.tint_symbol[v_2].col1, v.tint_symbol[v_2].col2, v.tint_symbol[v_2].col3);
+ f16vec4 v_4 = v_3[i()];
+ mat4x4_f16_std140 v_5[4] = v.tint_symbol;
+ f16mat4 v_6[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)));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = f16mat4(v_5[v_8].col0, v_5[v_8].col1, v_5[v_8].col2, v_5[v_8].col3);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ f16mat4 l_a[4] = v_6;
+ f16mat4 l_a_i = v_3;
+ f16vec4 l_a_i_i = v_4;
+ v_1.tint_symbol_2 = (((v_4[0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..5f70809 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,43 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 mat4x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+ f16vec4 col2;
+ f16vec4 col3;
+};
-tint executable returned error: signal: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x4_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4 v_2 = f16mat4(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ mat4x4_f16_std140 v_3[4] = v.tint_symbol;
+ f16mat4 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = f16mat4(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2, v_3[v_6].col3);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ f16mat4 l_a[4] = v_4;
+ f16mat4 l_a_i = v_2;
+ f16vec4 l_a_i_i = v_2[1];
+ v_1.tint_symbol_2 = (((v_2[1][0u] + l_a[0][0][0u]) + l_a_i[0][0u]) + l_a_i_i[0u]);
+}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl
index c10c393..de8d6ff 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f16/to_builtin.wgsl.expected.ir.glsl
@@ -1,13 +1,26 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4 u[4];
-float16_t s;
+struct mat4x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+ f16vec4 col2;
+ f16vec4 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x4_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat4 t = transpose(u[2]);
- float16_t l = length(u[0][1].ywxz);
- float16_t a = abs(u[0][1].ywxz[0u]);
- float16_t v = (t[0][0u] + float16_t(l));
- s = (v + float16_t(a));
+ f16mat4 t = transpose(f16mat4(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3));
+ float16_t l = length(v.tint_symbol[0].col1.ywxz);
+ float16_t a = abs(v.tint_symbol[0].col1.ywxz[0u]);
+ float16_t v_2 = (t[0][0u] + float16_t(l));
+ v_1.tint_symbol_2 = (v_2 + float16_t(a));
}
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 b826561..aad693b 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,8 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4 u[4];
-float16_t s;
+struct mat4x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+ f16vec4 col2;
+ f16vec4 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x4_f16_std140 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_2;
float16_t a(f16mat4 a_1[4]) {
return a_1[0][0][0u];
}
@@ -17,8 +30,25 @@
}
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]));
+ mat4x4_f16_std140 v_3[4] = v_1.tint_symbol;
+ f16mat4 v_4[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)));
+ {
+ uint v_5 = 0u;
+ v_5 = 0u;
+ while(true) {
+ uint v_6 = v_5;
+ if ((v_6 >= 4u)) {
+ break;
+ }
+ v_4[v_6] = f16mat4(v_3[v_6].col0, v_3[v_6].col1, v_3[v_6].col2, v_3[v_6].col3);
+ {
+ v_5 = (v_6 + 1u);
+ }
+ continue;
+ }
+ }
+ float16_t v_7 = a(v_4);
+ float16_t v_8 = (v_7 + b(f16mat4(v_1.tint_symbol[1].col0, v_1.tint_symbol[1].col1, v_1.tint_symbol[1].col2, v_1.tint_symbol[1].col3)));
+ float16_t v_9 = (v_8 + c(v_1.tint_symbol[1].col0.ywxz));
+ v_2.tint_symbol_2 = (v_9 + d(v_1.tint_symbol[1].col0.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 4e6ed8a..57b03ef 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,14 +1,44 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4 u[4];
-float16_t s;
+struct mat4x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+ f16vec4 col2;
+ f16vec4 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x4_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float16_t tint_symbol_2;
+} v_1;
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;
+ mat4x4_f16_std140 v_2[4] = v.tint_symbol;
+ f16mat4 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = f16mat4(v_2[v_5].col0, v_2[v_5].col1, v_2[v_5].col2, v_2[v_5].col3);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_3;
+ p[1] = f16mat4(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ p[1][0] = v.tint_symbol[0].col1.ywxz;
+ p[1][0][0u] = v.tint_symbol[0].col1.x;
+ v_1.tint_symbol_2 = 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 c2eeaa0..f851157 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,12 +1,42 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4 u[4];
-f16mat4 s[4];
+struct mat4x4_f16_std140 {
+ f16vec4 col0;
+ f16vec4 col1;
+ f16vec4 col2;
+ f16vec4 col3;
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ mat4x4_f16_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat4 tint_symbol_2[4];
+} v_1;
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;
+ mat4x4_f16_std140 v_2[4] = v.tint_symbol;
+ f16mat4 v_3[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)));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = f16mat4(v_2[v_5].col0, v_2[v_5].col1, v_2[v_5].col2, v_2[v_5].col3);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ v_1.tint_symbol_2 = v_3;
+ v_1.tint_symbol_2[1] = f16mat4(v.tint_symbol[2].col0, v.tint_symbol[2].col1, v.tint_symbol[2].col2, v.tint_symbol[2].col3);
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0].col1.ywxz;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0].col1.x;
}
diff --git a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl
index 3689075..711634e 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x4_f32/to_builtin.wgsl.expected.ir.glsl
@@ -1,12 +1,18 @@
#version 310 es
-uniform mat4 u[4];
-float s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat4 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat4 t = transpose(u[2]);
- float l = length(u[0][1].ywxz);
- float a = abs(u[0][1].ywxz[0u]);
- float v = (t[0][0u] + float(l));
- s = (v + float(a));
+ mat4 t = transpose(v.tint_symbol[2]);
+ float l = length(v.tint_symbol[0][1].ywxz);
+ float a = abs(v.tint_symbol[0][1].ywxz[0u]);
+ float v_2 = (t[0][0u] + float(l));
+ v_1.tint_symbol_2 = (v_2 + float(a));
}
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 89a92a6..0d204d0 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,7 +1,13 @@
#version 310 es
-uniform mat4 u[4];
-float s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat4 tint_symbol[4];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_2;
float a(mat4 a_1[4]) {
return a_1[0][0][0u];
}
@@ -16,8 +22,8 @@
}
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]));
+ float v_3 = a(v_1.tint_symbol);
+ float v_4 = (v_3 + b(v_1.tint_symbol[1]));
+ float v_5 = (v_4 + c(v_1.tint_symbol[1][0].ywxz));
+ v_2.tint_symbol_2 = (v_5 + d(v_1.tint_symbol[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 dc1f393..9405843 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,13 +1,19 @@
#version 310 es
-uniform mat4 u[4];
-float s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat4 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ float tint_symbol_2;
+} v_1;
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;
+ p = v.tint_symbol;
+ p[1] = v.tint_symbol[2];
+ p[1][0] = v.tint_symbol[0][1].ywxz;
+ p[1][0][0u] = v.tint_symbol[0][1].x;
+ v_1.tint_symbol_2 = 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 fe9b1a3..c468e8e 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,17 @@
#version 310 es
-uniform mat4 u[4];
-mat4 s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat4 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat4 tint_symbol_2[4];
+} v_1;
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;
+ v_1.tint_symbol_2 = v.tint_symbol;
+ v_1.tint_symbol_2[1] = v.tint_symbol[2];
+ v_1.tint_symbol_2[1][0] = v.tint_symbol[0][1].ywxz;
+ v_1.tint_symbol_2[1][0][0u] = v.tint_symbol[0][1].x;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
index 95bdf46..bb20a07 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -31,10 +31,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 4
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
@@ -146,7 +146,7 @@
%73 = OpAccessChain %_ptr_Function_Outer %55 %67
%75 = OpAccessChain %_ptr_Function_Outer_std140 %53 %67
%77 = OpLoad %Outer_std140 %75 None
- %78 = OpFunctionCall %Outer %convert_Outer %77
+ %78 = OpFunctionCall %Outer %tint_convert_Outer %77
OpStore %73 %78 None
OpBranch %64
%64 = OpLabel
@@ -155,7 +155,7 @@
%66 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %55 None
%81 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %81
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %81
%83 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %84 %83
OpBranch %89
@@ -175,7 +175,7 @@
%99 = OpAccessChain %_ptr_Function_Inner %86 %94
%101 = OpAccessChain %_ptr_Function_Inner_std140 %84 %94
%103 = OpLoad %Inner_std140 %101 None
- %104 = OpFunctionCall %Inner %convert_Inner %103
+ %104 = OpFunctionCall %Inner %tint_convert_Inner %103
OpStore %99 %104 None
OpBranch %91
%91 = OpLabel
@@ -184,26 +184,26 @@
%93 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %86 None
%107 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %107
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %107
%109 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %half %l_a_i_a_i_m_i %109
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %112
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %112
+ %tint_input = OpFunctionParameter %Inner_std140
%113 = OpLabel
- %114 = OpCompositeExtract %v2half %input 0
- %115 = OpCompositeExtract %v2half %input 1
+ %114 = OpCompositeExtract %v2half %tint_input 0
+ %115 = OpCompositeExtract %v2half %tint_input 1
%116 = OpCompositeConstruct %mat2v2half %114 %115
%117 = OpCompositeConstruct %Inner %116
OpReturnValue %117
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %119
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %119
+%tint_input_0 = OpFunctionParameter %Outer_std140
%120 = OpLabel
%122 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%123 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %88
- %121 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %121 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %122 %121
OpBranch %124
%124 = OpLabel
@@ -222,7 +222,7 @@
%134 = OpAccessChain %_ptr_Function_Inner %123 %129
%135 = OpAccessChain %_ptr_Function_Inner_std140 %122 %129
%136 = OpLoad %Inner_std140 %135 None
- %137 = OpFunctionCall %Inner %convert_Inner %136
+ %137 = OpFunctionCall %Inner %tint_convert_Inner %136
OpStore %134 %137 None
OpBranch %126
%126 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..d135b6e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,91 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ f16mat2 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(f16mat2(tint_input.m_col0, tint_input.m_col1));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2 v_4 = f16mat2(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))))), Outer(Inner[4](Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))))), Outer(Inner[4](Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))))), Outer(Inner[4](Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ f16mat2 l_a_3_a_2_m = v_4;
+ f16vec2 l_a_3_a_2_m_1 = v_4[1];
+ float16_t l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.spvasm
index 43a95f4..97d2215 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/static_index_via_ptr.wgsl.expected.spvasm
@@ -29,10 +29,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 4
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
@@ -125,7 +125,7 @@
%58 = OpAccessChain %_ptr_Function_Outer %40 %52
%60 = OpAccessChain %_ptr_Function_Outer_std140 %38 %52
%62 = OpLoad %Outer_std140 %60 None
- %63 = OpFunctionCall %Outer %convert_Outer %62
+ %63 = OpFunctionCall %Outer %tint_convert_Outer %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -134,7 +134,7 @@
%51 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %40 None
%66 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %66
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %66
%68 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %69 %68
OpBranch %74
@@ -154,7 +154,7 @@
%84 = OpAccessChain %_ptr_Function_Inner %71 %79
%86 = OpAccessChain %_ptr_Function_Inner_std140 %69 %79
%88 = OpLoad %Inner_std140 %86 None
- %89 = OpFunctionCall %Inner %convert_Inner %88
+ %89 = OpFunctionCall %Inner %tint_convert_Inner %88
OpStore %84 %89 None
OpBranch %76
%76 = OpLabel
@@ -163,25 +163,25 @@
%78 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %71 None
%92 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %92
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %92
%l_a_3_a_2_m_1_0 = OpCompositeExtract %half %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %96
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %96
+ %tint_input = OpFunctionParameter %Inner_std140
%97 = OpLabel
- %98 = OpCompositeExtract %v2half %input 0
- %99 = OpCompositeExtract %v2half %input 1
+ %98 = OpCompositeExtract %v2half %tint_input 0
+ %99 = OpCompositeExtract %v2half %tint_input 1
%100 = OpCompositeConstruct %mat2v2half %98 %99
%101 = OpCompositeConstruct %Inner %100
OpReturnValue %101
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %103
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %103
+%tint_input_0 = OpFunctionParameter %Outer_std140
%104 = OpLabel
%106 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%107 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %73
- %105 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %105 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %106 %105
OpBranch %108
%108 = OpLabel
@@ -200,7 +200,7 @@
%118 = OpAccessChain %_ptr_Function_Inner %107 %113
%119 = OpAccessChain %_ptr_Function_Inner_std140 %106 %113
%120 = OpLoad %Inner_std140 %119 None
- %121 = OpFunctionCall %Inner %convert_Inner %120
+ %121 = OpFunctionCall %Inner %tint_convert_Inner %120
OpStore %118 %121 None
OpBranch %110
%110 = OpLabel
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 fcf1aea..75fedb9 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,16 +1,20 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
+struct S_std140 {
int before;
- f16mat2 m;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ f16mat2 t = transpose(f16mat2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1));
+ float16_t l = length(v.tint_symbol[0].m_col1.yx);
+ float16_t a = abs(v.tint_symbol[0].m_col1.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 a545b07..2366734 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,13 +1,23 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ int after;
+};
+
struct S {
int before;
f16mat2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -18,11 +28,31 @@
}
void e(float16_t f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat2(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(f16mat2(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1));
+ d(v_1.tint_symbol[0].m_col1.yx);
+ e(v_1.tint_symbol[0].m_col1.yx[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.spvasm
index cc47287..3949e18 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_fn.wgsl.expected.spvasm
@@ -32,8 +32,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -134,7 +134,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -145,7 +145,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v2half %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v2half %74 None
@@ -164,14 +164,14 @@
%91 = OpFunctionCall %void %e %90
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %93
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %93
+ %tint_input = OpFunctionParameter %S_std140
%94 = OpLabel
- %95 = OpCompositeExtract %int %input 0
- %96 = OpCompositeExtract %v2half %input 1
- %97 = OpCompositeExtract %v2half %input 2
+ %95 = OpCompositeExtract %int %tint_input 0
+ %96 = OpCompositeExtract %v2half %tint_input 1
+ %97 = OpCompositeExtract %v2half %tint_input 2
%98 = OpCompositeConstruct %mat2v2half %96 %97
- %99 = OpCompositeExtract %int %input 3
+ %99 = OpCompositeExtract %int %tint_input 3
%100 = OpCompositeConstruct %S %95 %98 %99
OpReturnValue %100
OpFunctionEnd
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 0e72486..09d9a40 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,18 +1,48 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ int after;
+};
+
struct S {
int before;
f16mat2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat2(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = f16mat2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1);
+ p[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.spvasm
index 5ad6ed0..f35b08c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_private.wgsl.expected.spvasm
@@ -23,8 +23,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -102,7 +102,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -114,7 +114,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat2v2half %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v2half %1 %uint_0 %int_2 %uint_1
@@ -130,14 +130,14 @@
OpStore %67 %72 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %74
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %74
+ %tint_input = OpFunctionParameter %S_std140
%75 = OpLabel
- %76 = OpCompositeExtract %int %input 0
- %77 = OpCompositeExtract %v2half %input 1
- %78 = OpCompositeExtract %v2half %input 2
+ %76 = OpCompositeExtract %int %tint_input 0
+ %77 = OpCompositeExtract %v2half %tint_input 1
+ %78 = OpCompositeExtract %v2half %tint_input 2
%79 = OpCompositeConstruct %mat2v2half %77 %78
- %80 = OpCompositeExtract %int %input 3
+ %80 = OpCompositeExtract %int %tint_input 3
%81 = OpCompositeConstruct %S %76 %79 %80
OpReturnValue %81
OpFunctionEnd
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 2a29dfc..038b2aa 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,14 +1,30 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ int after;
+};
+
struct S {
int before;
f16mat2 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat2(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -16,16 +32,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -33,8 +49,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ v_1.tint_symbol_2[3].m = f16mat2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1);
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.spvasm
index 23cf057..78ab078 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.spvasm
@@ -29,8 +29,8 @@
OpName %tint_store_and_preserve_padding_0 "tint_store_and_preserve_padding"
OpName %target_indices "target_indices"
OpName %value_param_0 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -118,7 +118,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -129,7 +129,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -193,14 +193,14 @@
OpStore %107 %108 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %110
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %110
+ %tint_input = OpFunctionParameter %S_std140
%111 = OpLabel
- %112 = OpCompositeExtract %int %input 0
- %113 = OpCompositeExtract %v2half %input 1
- %114 = OpCompositeExtract %v2half %input 2
+ %112 = OpCompositeExtract %int %tint_input 0
+ %113 = OpCompositeExtract %v2half %tint_input 1
+ %114 = OpCompositeExtract %v2half %tint_input 2
%115 = OpCompositeConstruct %mat2v2half %113 %114
- %116 = OpCompositeExtract %int %input 3
+ %116 = OpCompositeExtract %int %tint_input 3
%117 = OpCompositeConstruct %S %112 %115 %116
OpReturnValue %117
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_workgroup.wgsl.expected.spvasm
index d2777b8..b944483 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_workgroup.wgsl.expected.spvasm
@@ -26,8 +26,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -134,7 +134,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -146,7 +146,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat2v2half %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v2half %1 %uint_0 %int_2 %uint_1
@@ -168,14 +168,14 @@
%94 = OpFunctionCall %void %f_inner %93
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %96
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %96
+ %tint_input = OpFunctionParameter %S_std140
%97 = OpLabel
- %98 = OpCompositeExtract %int %input 0
- %99 = OpCompositeExtract %v2half %input 1
- %100 = OpCompositeExtract %v2half %input 2
+ %98 = OpCompositeExtract %int %tint_input 0
+ %99 = OpCompositeExtract %v2half %tint_input 1
+ %100 = OpCompositeExtract %v2half %tint_input 2
%101 = OpCompositeConstruct %mat2v2half %99 %100
- %102 = OpCompositeExtract %int %input 3
+ %102 = OpCompositeExtract %int %tint_input 3
%103 = OpCompositeConstruct %S %98 %101 %102
OpReturnValue %103
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
index 378f0e2..71311f1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -28,10 +28,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
@@ -143,7 +143,7 @@
%73 = OpAccessChain %_ptr_Function_Outer %55 %67
%75 = OpAccessChain %_ptr_Function_Outer_std140 %53 %67
%77 = OpLoad %Outer_std140 %75 None
- %78 = OpFunctionCall %Outer %convert_Outer %77
+ %78 = OpFunctionCall %Outer %tint_convert_Outer %77
OpStore %73 %78 None
OpBranch %64
%64 = OpLabel
@@ -152,7 +152,7 @@
%66 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %55 None
%81 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %81
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %81
%83 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %84 %83
OpBranch %89
@@ -172,7 +172,7 @@
%99 = OpAccessChain %_ptr_Function_Inner %86 %94
%101 = OpAccessChain %_ptr_Function_Inner_std140 %84 %94
%103 = OpLoad %Inner_std140 %101 None
- %104 = OpFunctionCall %Inner %convert_Inner %103
+ %104 = OpFunctionCall %Inner %tint_convert_Inner %103
OpStore %99 %104 None
OpBranch %91
%91 = OpLabel
@@ -181,26 +181,26 @@
%93 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %86 None
%107 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %107
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %107
%109 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %float %l_a_i_a_i_m_i %109
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %112
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %112
+ %tint_input = OpFunctionParameter %Inner_std140
%113 = OpLabel
- %114 = OpCompositeExtract %v2float %input 0
- %115 = OpCompositeExtract %v2float %input 1
+ %114 = OpCompositeExtract %v2float %tint_input 0
+ %115 = OpCompositeExtract %v2float %tint_input 1
%116 = OpCompositeConstruct %mat2v2float %114 %115
%117 = OpCompositeConstruct %Inner %116
OpReturnValue %117
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %119
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %119
+%tint_input_0 = OpFunctionParameter %Outer_std140
%120 = OpLabel
%122 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%123 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %88
- %121 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %121 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %122 %121
OpBranch %124
%124 = OpLabel
@@ -219,7 +219,7 @@
%134 = OpAccessChain %_ptr_Function_Inner %123 %129
%135 = OpAccessChain %_ptr_Function_Inner_std140 %122 %129
%136 = OpLoad %Inner_std140 %135 None
- %137 = OpFunctionCall %Inner %convert_Inner %136
+ %137 = OpFunctionCall %Inner %tint_convert_Inner %136
OpStore %134 %137 None
OpBranch %126
%126 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..3359ca0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,90 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ vec2 m_col0;
+ vec2 m_col1;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ mat2 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(mat2(tint_input.m_col0, tint_input.m_col1));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat2 v_4 = mat2(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))))), Outer(Inner[4](Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))))), Outer(Inner[4](Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))))), Outer(Inner[4](Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))), Inner(mat2(vec2(0.0f), vec2(0.0f))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ mat2 l_a_3_a_2_m = v_4;
+ vec2 l_a_3_a_2_m_1 = v_4[1];
+ float l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.spvasm
index 4fcad7e..afe794d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/static_index_via_ptr.wgsl.expected.spvasm
@@ -26,10 +26,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
@@ -122,7 +122,7 @@
%58 = OpAccessChain %_ptr_Function_Outer %40 %52
%60 = OpAccessChain %_ptr_Function_Outer_std140 %38 %52
%62 = OpLoad %Outer_std140 %60 None
- %63 = OpFunctionCall %Outer %convert_Outer %62
+ %63 = OpFunctionCall %Outer %tint_convert_Outer %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -131,7 +131,7 @@
%51 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %40 None
%66 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %66
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %66
%68 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %69 %68
OpBranch %74
@@ -151,7 +151,7 @@
%84 = OpAccessChain %_ptr_Function_Inner %71 %79
%86 = OpAccessChain %_ptr_Function_Inner_std140 %69 %79
%88 = OpLoad %Inner_std140 %86 None
- %89 = OpFunctionCall %Inner %convert_Inner %88
+ %89 = OpFunctionCall %Inner %tint_convert_Inner %88
OpStore %84 %89 None
OpBranch %76
%76 = OpLabel
@@ -160,25 +160,25 @@
%78 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %71 None
%92 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %92
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %92
%l_a_3_a_2_m_1_0 = OpCompositeExtract %float %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %96
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %96
+ %tint_input = OpFunctionParameter %Inner_std140
%97 = OpLabel
- %98 = OpCompositeExtract %v2float %input 0
- %99 = OpCompositeExtract %v2float %input 1
+ %98 = OpCompositeExtract %v2float %tint_input 0
+ %99 = OpCompositeExtract %v2float %tint_input 1
%100 = OpCompositeConstruct %mat2v2float %98 %99
%101 = OpCompositeConstruct %Inner %100
OpReturnValue %101
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %103
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %103
+%tint_input_0 = OpFunctionParameter %Outer_std140
%104 = OpLabel
%106 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%107 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %73
- %105 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %105 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %106 %105
OpBranch %108
%108 = OpLabel
@@ -197,7 +197,7 @@
%118 = OpAccessChain %_ptr_Function_Inner %107 %113
%119 = OpAccessChain %_ptr_Function_Inner_std140 %106 %113
%120 = OpLoad %Inner_std140 %119 None
- %121 = OpFunctionCall %Inner %convert_Inner %120
+ %121 = OpFunctionCall %Inner %tint_convert_Inner %120
OpStore %118 %121 None
OpBranch %110
%110 = OpLabel
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 2f39494..59efa89 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,15 +1,19 @@
#version 310 es
-struct S {
+struct S_std140 {
int before;
- mat2 m;
+ vec2 m_col0;
+ vec2 m_col1;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ mat2 t = transpose(mat2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1));
+ float l = length(v.tint_symbol[0].m_col1.yx);
+ float a = abs(v.tint_symbol[0].m_col1.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 1017ca8..a83cbcf 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,12 +1,22 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec2 m_col0;
+ vec2 m_col1;
+ int after;
+};
+
struct S {
int before;
mat2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -17,11 +27,31 @@
}
void e(float f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat2(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(mat2(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1));
+ d(v_1.tint_symbol[0].m_col1.yx);
+ e(v_1.tint_symbol[0].m_col1.yx[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.spvasm
index 5615126..d72d2c7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_fn.wgsl.expected.spvasm
@@ -29,8 +29,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -131,7 +131,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -142,7 +142,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v2float %74 None
@@ -161,14 +161,14 @@
%91 = OpFunctionCall %void %e %90
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %93
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %93
+ %tint_input = OpFunctionParameter %S_std140
%94 = OpLabel
- %95 = OpCompositeExtract %int %input 0
- %96 = OpCompositeExtract %v2float %input 1
- %97 = OpCompositeExtract %v2float %input 2
+ %95 = OpCompositeExtract %int %tint_input 0
+ %96 = OpCompositeExtract %v2float %tint_input 1
+ %97 = OpCompositeExtract %v2float %tint_input 2
%98 = OpCompositeConstruct %mat2v2float %96 %97
- %99 = OpCompositeExtract %int %input 3
+ %99 = OpCompositeExtract %int %tint_input 3
%100 = OpCompositeConstruct %S %95 %98 %99
OpReturnValue %100
OpFunctionEnd
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 dbaffc4..bb7e023 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,17 +1,47 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec2 m_col0;
+ vec2 m_col1;
+ int after;
+};
+
struct S {
int before;
mat2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat2(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = mat2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1);
+ p[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.spvasm
index f54837e..3feff92 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_private.wgsl.expected.spvasm
@@ -20,8 +20,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -99,7 +99,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -111,7 +111,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat2v2float %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %int_2 %uint_1
@@ -127,14 +127,14 @@
OpStore %67 %72 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %74
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %74
+ %tint_input = OpFunctionParameter %S_std140
%75 = OpLabel
- %76 = OpCompositeExtract %int %input 0
- %77 = OpCompositeExtract %v2float %input 1
- %78 = OpCompositeExtract %v2float %input 2
+ %76 = OpCompositeExtract %int %tint_input 0
+ %77 = OpCompositeExtract %v2float %tint_input 1
+ %78 = OpCompositeExtract %v2float %tint_input 2
%79 = OpCompositeConstruct %mat2v2float %77 %78
- %80 = OpCompositeExtract %int %input 3
+ %80 = OpCompositeExtract %int %tint_input 3
%81 = OpCompositeConstruct %S %76 %79 %80
OpReturnValue %81
OpFunctionEnd
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 5d67343..39eae52 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,13 +1,29 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec2 m_col0;
+ vec2 m_col1;
+ int after;
+};
+
struct S {
int before;
mat2 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat2(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -15,16 +31,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -32,8 +48,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ v_1.tint_symbol_2[3].m = mat2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1);
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.spvasm
index c5a3fdc..e4b6275 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.spvasm
@@ -26,8 +26,8 @@
OpName %tint_store_and_preserve_padding_0 "tint_store_and_preserve_padding"
OpName %target_indices "target_indices"
OpName %value_param_0 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -115,7 +115,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -126,7 +126,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -190,14 +190,14 @@
OpStore %107 %108 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %110
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %110
+ %tint_input = OpFunctionParameter %S_std140
%111 = OpLabel
- %112 = OpCompositeExtract %int %input 0
- %113 = OpCompositeExtract %v2float %input 1
- %114 = OpCompositeExtract %v2float %input 2
+ %112 = OpCompositeExtract %int %tint_input 0
+ %113 = OpCompositeExtract %v2float %tint_input 1
+ %114 = OpCompositeExtract %v2float %tint_input 2
%115 = OpCompositeConstruct %mat2v2float %113 %114
- %116 = OpCompositeExtract %int %input 3
+ %116 = OpCompositeExtract %int %tint_input 3
%117 = OpCompositeConstruct %S %112 %115 %116
OpReturnValue %117
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.spvasm
index b72c731..5d7f21b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_workgroup.wgsl.expected.spvasm
@@ -23,8 +23,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -131,7 +131,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -143,7 +143,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat2v2float %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %int_2 %uint_1
@@ -165,14 +165,14 @@
%94 = OpFunctionCall %void %f_inner %93
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %96
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %96
+ %tint_input = OpFunctionParameter %S_std140
%97 = OpLabel
- %98 = OpCompositeExtract %int %input 0
- %99 = OpCompositeExtract %v2float %input 1
- %100 = OpCompositeExtract %v2float %input 2
+ %98 = OpCompositeExtract %int %tint_input 0
+ %99 = OpCompositeExtract %v2float %tint_input 1
+ %100 = OpCompositeExtract %v2float %tint_input 2
%101 = OpCompositeConstruct %mat2v2float %99 %100
- %102 = OpCompositeExtract %int %input 3
+ %102 = OpCompositeExtract %int %tint_input 3
%103 = OpCompositeConstruct %S %98 %101 %102
OpReturnValue %103
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
index 8ec53cd..85d1818 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -31,10 +31,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
@@ -146,7 +146,7 @@
%73 = OpAccessChain %_ptr_Function_Outer %55 %67
%75 = OpAccessChain %_ptr_Function_Outer_std140 %53 %67
%77 = OpLoad %Outer_std140 %75 None
- %78 = OpFunctionCall %Outer %convert_Outer %77
+ %78 = OpFunctionCall %Outer %tint_convert_Outer %77
OpStore %73 %78 None
OpBranch %64
%64 = OpLabel
@@ -155,7 +155,7 @@
%66 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %55 None
%81 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %81
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %81
%83 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %84 %83
OpBranch %89
@@ -175,7 +175,7 @@
%99 = OpAccessChain %_ptr_Function_Inner %86 %94
%101 = OpAccessChain %_ptr_Function_Inner_std140 %84 %94
%103 = OpLoad %Inner_std140 %101 None
- %104 = OpFunctionCall %Inner %convert_Inner %103
+ %104 = OpFunctionCall %Inner %tint_convert_Inner %103
OpStore %99 %104 None
OpBranch %91
%91 = OpLabel
@@ -184,26 +184,26 @@
%93 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %86 None
%107 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %107
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %107
%109 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %half %l_a_i_a_i_m_i %109
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %112
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %112
+ %tint_input = OpFunctionParameter %Inner_std140
%113 = OpLabel
- %114 = OpCompositeExtract %v3half %input 0
- %115 = OpCompositeExtract %v3half %input 1
+ %114 = OpCompositeExtract %v3half %tint_input 0
+ %115 = OpCompositeExtract %v3half %tint_input 1
%116 = OpCompositeConstruct %mat2v3half %114 %115
%117 = OpCompositeConstruct %Inner %116
OpReturnValue %117
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %119
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %119
+%tint_input_0 = OpFunctionParameter %Outer_std140
%120 = OpLabel
%122 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%123 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %88
- %121 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %121 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %122 %121
OpBranch %124
%124 = OpLabel
@@ -222,7 +222,7 @@
%134 = OpAccessChain %_ptr_Function_Inner %123 %129
%135 = OpAccessChain %_ptr_Function_Inner_std140 %122 %129
%136 = OpLoad %Inner_std140 %135 None
- %137 = OpFunctionCall %Inner %convert_Inner %136
+ %137 = OpFunctionCall %Inner %tint_convert_Inner %136
OpStore %134 %137 None
OpBranch %126
%126 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..280e235 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,91 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ f16mat2x3 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(f16mat2x3(tint_input.m_col0, tint_input.m_col1));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2x3 v_4 = f16mat2x3(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))))), Outer(Inner[4](Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))))), Outer(Inner[4](Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))))), Outer(Inner[4](Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ f16mat2x3 l_a_3_a_2_m = v_4;
+ f16vec3 l_a_3_a_2_m_1 = v_4[1];
+ float16_t l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.spvasm
index 558adfa..5b1c691 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/static_index_via_ptr.wgsl.expected.spvasm
@@ -29,10 +29,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
@@ -125,7 +125,7 @@
%58 = OpAccessChain %_ptr_Function_Outer %40 %52
%60 = OpAccessChain %_ptr_Function_Outer_std140 %38 %52
%62 = OpLoad %Outer_std140 %60 None
- %63 = OpFunctionCall %Outer %convert_Outer %62
+ %63 = OpFunctionCall %Outer %tint_convert_Outer %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -134,7 +134,7 @@
%51 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %40 None
%66 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %66
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %66
%68 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %69 %68
OpBranch %74
@@ -154,7 +154,7 @@
%84 = OpAccessChain %_ptr_Function_Inner %71 %79
%86 = OpAccessChain %_ptr_Function_Inner_std140 %69 %79
%88 = OpLoad %Inner_std140 %86 None
- %89 = OpFunctionCall %Inner %convert_Inner %88
+ %89 = OpFunctionCall %Inner %tint_convert_Inner %88
OpStore %84 %89 None
OpBranch %76
%76 = OpLabel
@@ -163,25 +163,25 @@
%78 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %71 None
%92 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %92
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %92
%l_a_3_a_2_m_1_0 = OpCompositeExtract %half %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %96
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %96
+ %tint_input = OpFunctionParameter %Inner_std140
%97 = OpLabel
- %98 = OpCompositeExtract %v3half %input 0
- %99 = OpCompositeExtract %v3half %input 1
+ %98 = OpCompositeExtract %v3half %tint_input 0
+ %99 = OpCompositeExtract %v3half %tint_input 1
%100 = OpCompositeConstruct %mat2v3half %98 %99
%101 = OpCompositeConstruct %Inner %100
OpReturnValue %101
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %103
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %103
+%tint_input_0 = OpFunctionParameter %Outer_std140
%104 = OpLabel
%106 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%107 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %73
- %105 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %105 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %106 %105
OpBranch %108
%108 = OpLabel
@@ -200,7 +200,7 @@
%118 = OpAccessChain %_ptr_Function_Inner %107 %113
%119 = OpAccessChain %_ptr_Function_Inner_std140 %106 %113
%120 = OpLoad %Inner_std140 %119 None
- %121 = OpFunctionCall %Inner %convert_Inner %120
+ %121 = OpFunctionCall %Inner %tint_convert_Inner %120
OpStore %118 %121 None
OpBranch %110
%110 = OpLabel
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 4f65e85..2ada101 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,16 +1,20 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
+struct S_std140 {
int before;
- f16mat2x3 m;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ f16mat3x2 t = transpose(f16mat2x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1));
+ float16_t l = length(v.tint_symbol[0].m_col1.zxy);
+ float16_t a = abs(v.tint_symbol[0].m_col1.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 737fa3d..e5a11fe 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,13 +1,23 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ int after;
+};
+
struct S {
int before;
f16mat2x3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -18,11 +28,31 @@
}
void e(float16_t f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat2x3(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(f16mat2x3(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1));
+ d(v_1.tint_symbol[0].m_col1.zxy);
+ e(v_1.tint_symbol[0].m_col1.zxy[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.spvasm
index 389d8c9..ee606bb 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_fn.wgsl.expected.spvasm
@@ -32,8 +32,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -134,7 +134,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -145,7 +145,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v3half %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v3half %74 None
@@ -164,14 +164,14 @@
%91 = OpFunctionCall %void %e %90
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %93
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %93
+ %tint_input = OpFunctionParameter %S_std140
%94 = OpLabel
- %95 = OpCompositeExtract %int %input 0
- %96 = OpCompositeExtract %v3half %input 1
- %97 = OpCompositeExtract %v3half %input 2
+ %95 = OpCompositeExtract %int %tint_input 0
+ %96 = OpCompositeExtract %v3half %tint_input 1
+ %97 = OpCompositeExtract %v3half %tint_input 2
%98 = OpCompositeConstruct %mat2v3half %96 %97
- %99 = OpCompositeExtract %int %input 3
+ %99 = OpCompositeExtract %int %tint_input 3
%100 = OpCompositeConstruct %S %95 %98 %99
OpReturnValue %100
OpFunctionEnd
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 e726585..d26715a 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,18 +1,48 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ int after;
+};
+
struct S {
int before;
f16mat2x3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat2x3(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = f16mat2x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1);
+ p[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.spvasm
index 942e3e1..d5a3079 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_private.wgsl.expected.spvasm
@@ -23,8 +23,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -102,7 +102,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -114,7 +114,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat2v3half %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v3half %1 %uint_0 %int_2 %uint_1
@@ -130,14 +130,14 @@
OpStore %67 %72 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %74
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %74
+ %tint_input = OpFunctionParameter %S_std140
%75 = OpLabel
- %76 = OpCompositeExtract %int %input 0
- %77 = OpCompositeExtract %v3half %input 1
- %78 = OpCompositeExtract %v3half %input 2
+ %76 = OpCompositeExtract %int %tint_input 0
+ %77 = OpCompositeExtract %v3half %tint_input 1
+ %78 = OpCompositeExtract %v3half %tint_input 2
%79 = OpCompositeConstruct %mat2v3half %77 %78
- %80 = OpCompositeExtract %int %input 3
+ %80 = OpCompositeExtract %int %tint_input 3
%81 = OpCompositeConstruct %S %76 %79 %80
OpReturnValue %81
OpFunctionEnd
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 51022ae..47fdddd 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,14 +1,30 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ int after;
+};
+
struct S {
int before;
f16mat2x3 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat2x3(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
void tint_store_and_preserve_padding_2(inout f16mat2x3 target, f16mat2x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -20,16 +36,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -37,8 +53,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ tint_store_and_preserve_padding_2(v_1.tint_symbol_2[3].m, f16mat2x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1));
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.spvasm
index 0704c1d..0a570c8 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.spvasm
@@ -32,8 +32,8 @@
OpName %tint_store_and_preserve_padding_1 "tint_store_and_preserve_padding"
OpName %target_indices_0 "target_indices"
OpName %value_param_1 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -121,7 +121,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -132,7 +132,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -210,14 +210,14 @@
OpStore %119 %120 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %122
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %122
+ %tint_input = OpFunctionParameter %S_std140
%123 = OpLabel
- %124 = OpCompositeExtract %int %input 0
- %125 = OpCompositeExtract %v3half %input 1
- %126 = OpCompositeExtract %v3half %input 2
+ %124 = OpCompositeExtract %int %tint_input 0
+ %125 = OpCompositeExtract %v3half %tint_input 1
+ %126 = OpCompositeExtract %v3half %tint_input 2
%127 = OpCompositeConstruct %mat2v3half %125 %126
- %128 = OpCompositeExtract %int %input 3
+ %128 = OpCompositeExtract %int %tint_input 3
%129 = OpCompositeConstruct %S %124 %127 %128
OpReturnValue %129
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_workgroup.wgsl.expected.spvasm
index a37d84e..b258662 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_workgroup.wgsl.expected.spvasm
@@ -26,8 +26,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -134,7 +134,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -146,7 +146,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat2v3half %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v3half %1 %uint_0 %int_2 %uint_1
@@ -168,14 +168,14 @@
%94 = OpFunctionCall %void %f_inner %93
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %96
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %96
+ %tint_input = OpFunctionParameter %S_std140
%97 = OpLabel
- %98 = OpCompositeExtract %int %input 0
- %99 = OpCompositeExtract %v3half %input 1
- %100 = OpCompositeExtract %v3half %input 2
+ %98 = OpCompositeExtract %int %tint_input 0
+ %99 = OpCompositeExtract %v3half %tint_input 1
+ %100 = OpCompositeExtract %v3half %tint_input 2
%101 = OpCompositeConstruct %mat2v3half %99 %100
- %102 = OpCompositeExtract %int %input 3
+ %102 = OpCompositeExtract %int %tint_input 3
%103 = OpCompositeConstruct %S %98 %101 %102
OpReturnValue %103
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
index 158bc55..8326bfe 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -28,10 +28,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 16
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
@@ -143,7 +143,7 @@
%73 = OpAccessChain %_ptr_Function_Outer %55 %67
%75 = OpAccessChain %_ptr_Function_Outer_std140 %53 %67
%77 = OpLoad %Outer_std140 %75 None
- %78 = OpFunctionCall %Outer %convert_Outer %77
+ %78 = OpFunctionCall %Outer %tint_convert_Outer %77
OpStore %73 %78 None
OpBranch %64
%64 = OpLabel
@@ -152,7 +152,7 @@
%66 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %55 None
%81 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %81
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %81
%83 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %84 %83
OpBranch %89
@@ -172,7 +172,7 @@
%99 = OpAccessChain %_ptr_Function_Inner %86 %94
%101 = OpAccessChain %_ptr_Function_Inner_std140 %84 %94
%103 = OpLoad %Inner_std140 %101 None
- %104 = OpFunctionCall %Inner %convert_Inner %103
+ %104 = OpFunctionCall %Inner %tint_convert_Inner %103
OpStore %99 %104 None
OpBranch %91
%91 = OpLabel
@@ -181,26 +181,26 @@
%93 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %86 None
%107 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %107
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %107
%109 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %float %l_a_i_a_i_m_i %109
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %112
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %112
+ %tint_input = OpFunctionParameter %Inner_std140
%113 = OpLabel
- %114 = OpCompositeExtract %v3float %input 0
- %115 = OpCompositeExtract %v3float %input 1
+ %114 = OpCompositeExtract %v3float %tint_input 0
+ %115 = OpCompositeExtract %v3float %tint_input 1
%116 = OpCompositeConstruct %mat2v3float %114 %115
%117 = OpCompositeConstruct %Inner %116
OpReturnValue %117
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %119
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %119
+%tint_input_0 = OpFunctionParameter %Outer_std140
%120 = OpLabel
%122 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%123 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %88
- %121 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %121 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %122 %121
OpBranch %124
%124 = OpLabel
@@ -219,7 +219,7 @@
%134 = OpAccessChain %_ptr_Function_Inner %123 %129
%135 = OpAccessChain %_ptr_Function_Inner_std140 %122 %129
%136 = OpLoad %Inner_std140 %135 None
- %137 = OpFunctionCall %Inner %convert_Inner %136
+ %137 = OpFunctionCall %Inner %tint_convert_Inner %136
OpStore %134 %137 None
OpBranch %126
%126 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..6acc614 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,90 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ vec3 m_col0;
+ vec3 m_col1;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ mat2x3 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(mat2x3(tint_input.m_col0, tint_input.m_col1));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat2x3 v_4 = mat2x3(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))))), Outer(Inner[4](Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))))), Outer(Inner[4](Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))))), Outer(Inner[4](Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))), Inner(mat2x3(vec3(0.0f), vec3(0.0f))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ mat2x3 l_a_3_a_2_m = v_4;
+ vec3 l_a_3_a_2_m_1 = v_4[1];
+ float l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.spvasm
index 5d93cec..4a24c67 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/static_index_via_ptr.wgsl.expected.spvasm
@@ -26,10 +26,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 16
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
@@ -122,7 +122,7 @@
%58 = OpAccessChain %_ptr_Function_Outer %40 %52
%60 = OpAccessChain %_ptr_Function_Outer_std140 %38 %52
%62 = OpLoad %Outer_std140 %60 None
- %63 = OpFunctionCall %Outer %convert_Outer %62
+ %63 = OpFunctionCall %Outer %tint_convert_Outer %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -131,7 +131,7 @@
%51 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %40 None
%66 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %66
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %66
%68 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %69 %68
OpBranch %74
@@ -151,7 +151,7 @@
%84 = OpAccessChain %_ptr_Function_Inner %71 %79
%86 = OpAccessChain %_ptr_Function_Inner_std140 %69 %79
%88 = OpLoad %Inner_std140 %86 None
- %89 = OpFunctionCall %Inner %convert_Inner %88
+ %89 = OpFunctionCall %Inner %tint_convert_Inner %88
OpStore %84 %89 None
OpBranch %76
%76 = OpLabel
@@ -160,25 +160,25 @@
%78 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %71 None
%92 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %92
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %92
%l_a_3_a_2_m_1_0 = OpCompositeExtract %float %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %96
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %96
+ %tint_input = OpFunctionParameter %Inner_std140
%97 = OpLabel
- %98 = OpCompositeExtract %v3float %input 0
- %99 = OpCompositeExtract %v3float %input 1
+ %98 = OpCompositeExtract %v3float %tint_input 0
+ %99 = OpCompositeExtract %v3float %tint_input 1
%100 = OpCompositeConstruct %mat2v3float %98 %99
%101 = OpCompositeConstruct %Inner %100
OpReturnValue %101
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %103
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %103
+%tint_input_0 = OpFunctionParameter %Outer_std140
%104 = OpLabel
%106 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%107 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %73
- %105 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %105 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %106 %105
OpBranch %108
%108 = OpLabel
@@ -197,7 +197,7 @@
%118 = OpAccessChain %_ptr_Function_Inner %107 %113
%119 = OpAccessChain %_ptr_Function_Inner_std140 %106 %113
%120 = OpLoad %Inner_std140 %119 None
- %121 = OpFunctionCall %Inner %convert_Inner %120
+ %121 = OpFunctionCall %Inner %tint_convert_Inner %120
OpStore %118 %121 None
OpBranch %110
%110 = OpLabel
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 070d1c7..5e8fd1e 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,15 +1,19 @@
#version 310 es
-struct S {
+struct S_std140 {
int before;
- mat2x3 m;
+ vec3 m_col0;
+ vec3 m_col1;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ mat3x2 t = transpose(mat2x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1));
+ float l = length(v.tint_symbol[0].m_col1.zxy);
+ float a = abs(v.tint_symbol[0].m_col1.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 9a15f5b..c4ba7d8 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,12 +1,22 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec3 m_col0;
+ vec3 m_col1;
+ int after;
+};
+
struct S {
int before;
mat2x3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -17,11 +27,31 @@
}
void e(float f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat2x3(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(mat2x3(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1));
+ d(v_1.tint_symbol[0].m_col1.zxy);
+ e(v_1.tint_symbol[0].m_col1.zxy[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.spvasm
index 6f7e7ed..7ee445b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_fn.wgsl.expected.spvasm
@@ -29,8 +29,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -131,7 +131,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -142,7 +142,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v3float %74 None
@@ -161,14 +161,14 @@
%91 = OpFunctionCall %void %e %90
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %93
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %93
+ %tint_input = OpFunctionParameter %S_std140
%94 = OpLabel
- %95 = OpCompositeExtract %int %input 0
- %96 = OpCompositeExtract %v3float %input 1
- %97 = OpCompositeExtract %v3float %input 2
+ %95 = OpCompositeExtract %int %tint_input 0
+ %96 = OpCompositeExtract %v3float %tint_input 1
+ %97 = OpCompositeExtract %v3float %tint_input 2
%98 = OpCompositeConstruct %mat2v3float %96 %97
- %99 = OpCompositeExtract %int %input 3
+ %99 = OpCompositeExtract %int %tint_input 3
%100 = OpCompositeConstruct %S %95 %98 %99
OpReturnValue %100
OpFunctionEnd
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 d2af835..13f12e4 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,17 +1,47 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec3 m_col0;
+ vec3 m_col1;
+ int after;
+};
+
struct S {
int before;
mat2x3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat2x3(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = mat2x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1);
+ p[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.spvasm
index 9a36fb4..3847d81 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_private.wgsl.expected.spvasm
@@ -20,8 +20,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -99,7 +99,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -111,7 +111,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat2v3float %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %int_2 %uint_1
@@ -127,14 +127,14 @@
OpStore %67 %72 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %74
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %74
+ %tint_input = OpFunctionParameter %S_std140
%75 = OpLabel
- %76 = OpCompositeExtract %int %input 0
- %77 = OpCompositeExtract %v3float %input 1
- %78 = OpCompositeExtract %v3float %input 2
+ %76 = OpCompositeExtract %int %tint_input 0
+ %77 = OpCompositeExtract %v3float %tint_input 1
+ %78 = OpCompositeExtract %v3float %tint_input 2
%79 = OpCompositeConstruct %mat2v3float %77 %78
- %80 = OpCompositeExtract %int %input 3
+ %80 = OpCompositeExtract %int %tint_input 3
%81 = OpCompositeConstruct %S %76 %79 %80
OpReturnValue %81
OpFunctionEnd
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 eb7c52c..ff68a3a 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,13 +1,29 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec3 m_col0;
+ vec3 m_col1;
+ int after;
+};
+
struct S {
int before;
mat2x3 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat2x3(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
void tint_store_and_preserve_padding_2(inout mat2x3 target, mat2x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -19,16 +35,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -36,8 +52,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ tint_store_and_preserve_padding_2(v_1.tint_symbol_2[3].m, mat2x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1));
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.spvasm
index c8fb2ef..7db594c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.spvasm
@@ -29,8 +29,8 @@
OpName %tint_store_and_preserve_padding_1 "tint_store_and_preserve_padding"
OpName %target_indices_0 "target_indices"
OpName %value_param_1 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -118,7 +118,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -129,7 +129,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -207,14 +207,14 @@
OpStore %119 %120 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %122
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %122
+ %tint_input = OpFunctionParameter %S_std140
%123 = OpLabel
- %124 = OpCompositeExtract %int %input 0
- %125 = OpCompositeExtract %v3float %input 1
- %126 = OpCompositeExtract %v3float %input 2
+ %124 = OpCompositeExtract %int %tint_input 0
+ %125 = OpCompositeExtract %v3float %tint_input 1
+ %126 = OpCompositeExtract %v3float %tint_input 2
%127 = OpCompositeConstruct %mat2v3float %125 %126
- %128 = OpCompositeExtract %int %input 3
+ %128 = OpCompositeExtract %int %tint_input 3
%129 = OpCompositeConstruct %S %124 %127 %128
OpReturnValue %129
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.spvasm
index 8690f41..d591d2c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_workgroup.wgsl.expected.spvasm
@@ -23,8 +23,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -131,7 +131,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -143,7 +143,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat2v3float %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %int_2 %uint_1
@@ -165,14 +165,14 @@
%94 = OpFunctionCall %void %f_inner %93
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %96
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %96
+ %tint_input = OpFunctionParameter %S_std140
%97 = OpLabel
- %98 = OpCompositeExtract %int %input 0
- %99 = OpCompositeExtract %v3float %input 1
- %100 = OpCompositeExtract %v3float %input 2
+ %98 = OpCompositeExtract %int %tint_input 0
+ %99 = OpCompositeExtract %v3float %tint_input 1
+ %100 = OpCompositeExtract %v3float %tint_input 2
%101 = OpCompositeConstruct %mat2v3float %99 %100
- %102 = OpCompositeExtract %int %input 3
+ %102 = OpCompositeExtract %int %tint_input 3
%103 = OpCompositeConstruct %S %98 %101 %102
OpReturnValue %103
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
index 3a27840..a412c51 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -31,10 +31,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
@@ -146,7 +146,7 @@
%73 = OpAccessChain %_ptr_Function_Outer %55 %67
%75 = OpAccessChain %_ptr_Function_Outer_std140 %53 %67
%77 = OpLoad %Outer_std140 %75 None
- %78 = OpFunctionCall %Outer %convert_Outer %77
+ %78 = OpFunctionCall %Outer %tint_convert_Outer %77
OpStore %73 %78 None
OpBranch %64
%64 = OpLabel
@@ -155,7 +155,7 @@
%66 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %55 None
%81 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %81
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %81
%83 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %84 %83
OpBranch %89
@@ -175,7 +175,7 @@
%99 = OpAccessChain %_ptr_Function_Inner %86 %94
%101 = OpAccessChain %_ptr_Function_Inner_std140 %84 %94
%103 = OpLoad %Inner_std140 %101 None
- %104 = OpFunctionCall %Inner %convert_Inner %103
+ %104 = OpFunctionCall %Inner %tint_convert_Inner %103
OpStore %99 %104 None
OpBranch %91
%91 = OpLabel
@@ -184,26 +184,26 @@
%93 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %86 None
%107 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %107
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %107
%109 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %half %l_a_i_a_i_m_i %109
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %112
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %112
+ %tint_input = OpFunctionParameter %Inner_std140
%113 = OpLabel
- %114 = OpCompositeExtract %v4half %input 0
- %115 = OpCompositeExtract %v4half %input 1
+ %114 = OpCompositeExtract %v4half %tint_input 0
+ %115 = OpCompositeExtract %v4half %tint_input 1
%116 = OpCompositeConstruct %mat2v4half %114 %115
%117 = OpCompositeConstruct %Inner %116
OpReturnValue %117
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %119
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %119
+%tint_input_0 = OpFunctionParameter %Outer_std140
%120 = OpLabel
%122 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%123 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %88
- %121 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %121 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %122 %121
OpBranch %124
%124 = OpLabel
@@ -222,7 +222,7 @@
%134 = OpAccessChain %_ptr_Function_Inner %123 %129
%135 = OpAccessChain %_ptr_Function_Inner_std140 %122 %129
%136 = OpLoad %Inner_std140 %135 None
- %137 = OpFunctionCall %Inner %convert_Inner %136
+ %137 = OpFunctionCall %Inner %tint_convert_Inner %136
OpStore %134 %137 None
OpBranch %126
%126 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..7cf52dd 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,91 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ f16mat2x4 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(f16mat2x4(tint_input.m_col0, tint_input.m_col1));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2x4 v_4 = f16mat2x4(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))))), Outer(Inner[4](Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))))), Outer(Inner[4](Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))))), Outer(Inner[4](Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ f16mat2x4 l_a_3_a_2_m = v_4;
+ f16vec4 l_a_3_a_2_m_1 = v_4[1];
+ float16_t l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.spvasm
index c728102..4d84af0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/static_index_via_ptr.wgsl.expected.spvasm
@@ -29,10 +29,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpDecorate %_arr_Inner_std140_uint_4 ArrayStride 64
@@ -125,7 +125,7 @@
%58 = OpAccessChain %_ptr_Function_Outer %40 %52
%60 = OpAccessChain %_ptr_Function_Outer_std140 %38 %52
%62 = OpLoad %Outer_std140 %60 None
- %63 = OpFunctionCall %Outer %convert_Outer %62
+ %63 = OpFunctionCall %Outer %tint_convert_Outer %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -134,7 +134,7 @@
%51 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %40 None
%66 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %66
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %66
%68 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %69 %68
OpBranch %74
@@ -154,7 +154,7 @@
%84 = OpAccessChain %_ptr_Function_Inner %71 %79
%86 = OpAccessChain %_ptr_Function_Inner_std140 %69 %79
%88 = OpLoad %Inner_std140 %86 None
- %89 = OpFunctionCall %Inner %convert_Inner %88
+ %89 = OpFunctionCall %Inner %tint_convert_Inner %88
OpStore %84 %89 None
OpBranch %76
%76 = OpLabel
@@ -163,25 +163,25 @@
%78 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %71 None
%92 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %92
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %92
%l_a_3_a_2_m_1_0 = OpCompositeExtract %half %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %96
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %96
+ %tint_input = OpFunctionParameter %Inner_std140
%97 = OpLabel
- %98 = OpCompositeExtract %v4half %input 0
- %99 = OpCompositeExtract %v4half %input 1
+ %98 = OpCompositeExtract %v4half %tint_input 0
+ %99 = OpCompositeExtract %v4half %tint_input 1
%100 = OpCompositeConstruct %mat2v4half %98 %99
%101 = OpCompositeConstruct %Inner %100
OpReturnValue %101
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %103
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %103
+%tint_input_0 = OpFunctionParameter %Outer_std140
%104 = OpLabel
%106 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%107 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %73
- %105 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %105 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %106 %105
OpBranch %108
%108 = OpLabel
@@ -200,7 +200,7 @@
%118 = OpAccessChain %_ptr_Function_Inner %107 %113
%119 = OpAccessChain %_ptr_Function_Inner_std140 %106 %113
%120 = OpLoad %Inner_std140 %119 None
- %121 = OpFunctionCall %Inner %convert_Inner %120
+ %121 = OpFunctionCall %Inner %tint_convert_Inner %120
OpStore %118 %121 None
OpBranch %110
%110 = OpLabel
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 921c395..fce1c25 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,16 +1,20 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
+struct S_std140 {
int before;
- f16mat2x4 m;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ f16mat4x2 t = transpose(f16mat2x4(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1));
+ float16_t l = length(v.tint_symbol[0].m_col1.ywxz);
+ float16_t a = abs(v.tint_symbol[0].m_col1.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 99ae1f6..d8c5fee 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,13 +1,23 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ int after;
+};
+
struct S {
int before;
f16mat2x4 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -18,11 +28,31 @@
}
void e(float16_t f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat2x4(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(f16mat2x4(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1));
+ d(v_1.tint_symbol[0].m_col1.ywxz);
+ e(v_1.tint_symbol[0].m_col1.ywxz[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.spvasm
index f3f3307..47488c1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_fn.wgsl.expected.spvasm
@@ -32,8 +32,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -134,7 +134,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -145,7 +145,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v4half %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v4half %74 None
@@ -164,14 +164,14 @@
%91 = OpFunctionCall %void %e %90
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %93
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %93
+ %tint_input = OpFunctionParameter %S_std140
%94 = OpLabel
- %95 = OpCompositeExtract %int %input 0
- %96 = OpCompositeExtract %v4half %input 1
- %97 = OpCompositeExtract %v4half %input 2
+ %95 = OpCompositeExtract %int %tint_input 0
+ %96 = OpCompositeExtract %v4half %tint_input 1
+ %97 = OpCompositeExtract %v4half %tint_input 2
%98 = OpCompositeConstruct %mat2v4half %96 %97
- %99 = OpCompositeExtract %int %input 3
+ %99 = OpCompositeExtract %int %tint_input 3
%100 = OpCompositeConstruct %S %95 %98 %99
OpReturnValue %100
OpFunctionEnd
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 143732f..1433b00 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,18 +1,48 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ int after;
+};
+
struct S {
int before;
f16mat2x4 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat2x4(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = f16mat2x4(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1);
+ p[1].m[0] = v.tint_symbol[0].m_col1.ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.spvasm
index 1e66bea..a79d806 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_private.wgsl.expected.spvasm
@@ -23,8 +23,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -102,7 +102,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -114,7 +114,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat2v4half %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v4half %1 %uint_0 %int_2 %uint_1
@@ -130,14 +130,14 @@
OpStore %67 %72 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %74
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %74
+ %tint_input = OpFunctionParameter %S_std140
%75 = OpLabel
- %76 = OpCompositeExtract %int %input 0
- %77 = OpCompositeExtract %v4half %input 1
- %78 = OpCompositeExtract %v4half %input 2
+ %76 = OpCompositeExtract %int %tint_input 0
+ %77 = OpCompositeExtract %v4half %tint_input 1
+ %78 = OpCompositeExtract %v4half %tint_input 2
%79 = OpCompositeConstruct %mat2v4half %77 %78
- %80 = OpCompositeExtract %int %input 3
+ %80 = OpCompositeExtract %int %tint_input 3
%81 = OpCompositeConstruct %S %76 %79 %80
OpReturnValue %81
OpFunctionEnd
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 28ae045..7f566b4 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,14 +1,30 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ int after;
+};
+
struct S {
int before;
f16mat2x4 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat2x4(tint_input.m_col0, tint_input.m_col1), tint_input.after);
+}
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -16,16 +32,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -33,8 +49,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ v_1.tint_symbol_2[3].m = f16mat2x4(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1);
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.spvasm
index 668b756..a845164 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.spvasm
@@ -29,8 +29,8 @@
OpName %tint_store_and_preserve_padding_0 "tint_store_and_preserve_padding"
OpName %target_indices "target_indices"
OpName %value_param_0 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -118,7 +118,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -129,7 +129,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -193,14 +193,14 @@
OpStore %107 %108 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %110
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %110
+ %tint_input = OpFunctionParameter %S_std140
%111 = OpLabel
- %112 = OpCompositeExtract %int %input 0
- %113 = OpCompositeExtract %v4half %input 1
- %114 = OpCompositeExtract %v4half %input 2
+ %112 = OpCompositeExtract %int %tint_input 0
+ %113 = OpCompositeExtract %v4half %tint_input 1
+ %114 = OpCompositeExtract %v4half %tint_input 2
%115 = OpCompositeConstruct %mat2v4half %113 %114
- %116 = OpCompositeExtract %int %input 3
+ %116 = OpCompositeExtract %int %tint_input 3
%117 = OpCompositeConstruct %S %112 %115 %116
OpReturnValue %117
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_workgroup.wgsl.expected.spvasm
index 69c35f4..39c1859 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_workgroup.wgsl.expected.spvasm
@@ -26,8 +26,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -134,7 +134,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -146,7 +146,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat2v4half %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v4half %1 %uint_0 %int_2 %uint_1
@@ -168,14 +168,14 @@
%94 = OpFunctionCall %void %f_inner %93
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %96
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %96
+ %tint_input = OpFunctionParameter %S_std140
%97 = OpLabel
- %98 = OpCompositeExtract %int %input 0
- %99 = OpCompositeExtract %v4half %input 1
- %100 = OpCompositeExtract %v4half %input 2
+ %98 = OpCompositeExtract %int %tint_input 0
+ %99 = OpCompositeExtract %v4half %tint_input 1
+ %100 = OpCompositeExtract %v4half %tint_input 2
%101 = OpCompositeConstruct %mat2v4half %99 %100
- %102 = OpCompositeExtract %int %input 3
+ %102 = OpCompositeExtract %int %tint_input 3
%103 = OpCompositeConstruct %S %98 %101 %102
OpReturnValue %103
OpFunctionEnd
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 b143e67..a779719 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
@@ -6,10 +6,13 @@
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v;
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]);
+ mat4x2 t = transpose(v.tint_symbol[2].m);
+ float l = length(v.tint_symbol[0].m[1].ywxz);
+ float a = abs(v.tint_symbol[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 222890e..6b23067 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
@@ -6,7 +6,10 @@
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -19,9 +22,9 @@
}
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]);
+ a(v_1.tint_symbol);
+ b(v_1.tint_symbol[2]);
+ c(v_1.tint_symbol[2].m);
+ d(v_1.tint_symbol[0].m[1].ywxz);
+ e(v_1.tint_symbol[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 38bc18a..4dea7d0 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
@@ -6,12 +6,15 @@
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v;
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;
+ p = v.tint_symbol;
+ p[1] = v.tint_symbol[2];
+ p[3].m = v.tint_symbol[2].m;
+ p[1].m[0] = v.tint_symbol[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 f84945e..3b6980d 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
@@ -6,8 +6,14 @@
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -15,16 +21,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -32,8 +38,8 @@
}
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;
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v.tint_symbol);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], v.tint_symbol[2]);
+ v_1.tint_symbol_2[3].m = v.tint_symbol[2].m;
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m[1].ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
index 8e0426d..f013389 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -32,10 +32,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 4
OpMemberDecorate %Inner_std140 2 Offset 8
@@ -151,7 +151,7 @@
%76 = OpAccessChain %_ptr_Function_Outer %58 %70
%78 = OpAccessChain %_ptr_Function_Outer_std140 %56 %70
%80 = OpLoad %Outer_std140 %78 None
- %81 = OpFunctionCall %Outer %convert_Outer %80
+ %81 = OpFunctionCall %Outer %tint_convert_Outer %80
OpStore %76 %81 None
OpBranch %67
%67 = OpLabel
@@ -160,7 +160,7 @@
%69 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %58 None
%84 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %84
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %84
%86 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %87 %86
OpBranch %92
@@ -180,7 +180,7 @@
%102 = OpAccessChain %_ptr_Function_Inner %89 %97
%104 = OpAccessChain %_ptr_Function_Inner_std140 %87 %97
%106 = OpLoad %Inner_std140 %104 None
- %107 = OpFunctionCall %Inner %convert_Inner %106
+ %107 = OpFunctionCall %Inner %tint_convert_Inner %106
OpStore %102 %107 None
OpBranch %94
%94 = OpLabel
@@ -189,27 +189,27 @@
%96 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %89 None
%110 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %110
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %110
%112 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %half %l_a_i_a_i_m_i %112
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %115
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %115
+ %tint_input = OpFunctionParameter %Inner_std140
%116 = OpLabel
- %117 = OpCompositeExtract %v2half %input 0
- %118 = OpCompositeExtract %v2half %input 1
- %119 = OpCompositeExtract %v2half %input 2
+ %117 = OpCompositeExtract %v2half %tint_input 0
+ %118 = OpCompositeExtract %v2half %tint_input 1
+ %119 = OpCompositeExtract %v2half %tint_input 2
%120 = OpCompositeConstruct %mat3v2half %117 %118 %119
%121 = OpCompositeConstruct %Inner %120
OpReturnValue %121
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %123
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %123
+%tint_input_0 = OpFunctionParameter %Outer_std140
%124 = OpLabel
%126 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%127 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %91
- %125 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %125 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %126 %125
OpBranch %128
%128 = OpLabel
@@ -228,7 +228,7 @@
%138 = OpAccessChain %_ptr_Function_Inner %127 %133
%139 = OpAccessChain %_ptr_Function_Inner_std140 %126 %133
%140 = OpLoad %Inner_std140 %139 None
- %141 = OpFunctionCall %Inner %convert_Inner %140
+ %141 = OpFunctionCall %Inner %tint_convert_Inner %140
OpStore %138 %141 None
OpBranch %130
%130 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..b279a38 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,92 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ f16vec2 m_col2;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ f16mat3x2 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(f16mat3x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat3x2 v_4 = f16mat3x2(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1, v.tint_symbol[3].a[2].m_col2);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))))), Outer(Inner[4](Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))))), Outer(Inner[4](Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))))), Outer(Inner[4](Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ f16mat3x2 l_a_3_a_2_m = v_4;
+ f16vec2 l_a_3_a_2_m_1 = v_4[1];
+ float16_t l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.spvasm
index 485b648..c302f29 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/static_index_via_ptr.wgsl.expected.spvasm
@@ -30,10 +30,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 4
OpMemberDecorate %Inner_std140 2 Offset 8
@@ -130,7 +130,7 @@
%61 = OpAccessChain %_ptr_Function_Outer %43 %55
%63 = OpAccessChain %_ptr_Function_Outer_std140 %41 %55
%65 = OpLoad %Outer_std140 %63 None
- %66 = OpFunctionCall %Outer %convert_Outer %65
+ %66 = OpFunctionCall %Outer %tint_convert_Outer %65
OpStore %61 %66 None
OpBranch %52
%52 = OpLabel
@@ -139,7 +139,7 @@
%54 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %43 None
%69 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %69
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %69
%71 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %72 %71
OpBranch %77
@@ -159,7 +159,7 @@
%87 = OpAccessChain %_ptr_Function_Inner %74 %82
%89 = OpAccessChain %_ptr_Function_Inner_std140 %72 %82
%91 = OpLoad %Inner_std140 %89 None
- %92 = OpFunctionCall %Inner %convert_Inner %91
+ %92 = OpFunctionCall %Inner %tint_convert_Inner %91
OpStore %87 %92 None
OpBranch %79
%79 = OpLabel
@@ -168,26 +168,26 @@
%81 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %74 None
%95 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %95
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %95
%l_a_3_a_2_m_1_0 = OpCompositeExtract %half %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %99
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %99
+ %tint_input = OpFunctionParameter %Inner_std140
%100 = OpLabel
- %101 = OpCompositeExtract %v2half %input 0
- %102 = OpCompositeExtract %v2half %input 1
- %103 = OpCompositeExtract %v2half %input 2
+ %101 = OpCompositeExtract %v2half %tint_input 0
+ %102 = OpCompositeExtract %v2half %tint_input 1
+ %103 = OpCompositeExtract %v2half %tint_input 2
%104 = OpCompositeConstruct %mat3v2half %101 %102 %103
%105 = OpCompositeConstruct %Inner %104
OpReturnValue %105
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %107
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %107
+%tint_input_0 = OpFunctionParameter %Outer_std140
%108 = OpLabel
%110 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%111 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %76
- %109 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %109 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %110 %109
OpBranch %112
%112 = OpLabel
@@ -206,7 +206,7 @@
%122 = OpAccessChain %_ptr_Function_Inner %111 %117
%123 = OpAccessChain %_ptr_Function_Inner_std140 %110 %117
%124 = OpLoad %Inner_std140 %123 None
- %125 = OpFunctionCall %Inner %convert_Inner %124
+ %125 = OpFunctionCall %Inner %tint_convert_Inner %124
OpStore %122 %125 None
OpBranch %114
%114 = OpLabel
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 5fdfd2f..96cedcd 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,16 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
+struct S_std140 {
int before;
- f16mat3x2 m;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ f16vec2 m_col2;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ f16mat2x3 t = transpose(f16mat3x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2));
+ float16_t l = length(v.tint_symbol[0].m_col1.yx);
+ float16_t a = abs(v.tint_symbol[0].m_col1.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 ab66bc5..d4b9db2 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,13 +1,24 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ f16vec2 m_col2;
+ int after;
+};
+
struct S {
int before;
f16mat3x2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -18,11 +29,31 @@
}
void e(float16_t f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat3x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(f16mat3x2(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1, v_1.tint_symbol[2].m_col2));
+ d(v_1.tint_symbol[0].m_col1.yx);
+ e(v_1.tint_symbol[0].m_col1.yx[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.spvasm
index 757b186..f4f30eb 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_fn.wgsl.expected.spvasm
@@ -33,8 +33,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -137,7 +137,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -148,7 +148,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v2half %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v2half %74 None
@@ -169,15 +169,15 @@
%94 = OpFunctionCall %void %e %93
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %96
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %96
+ %tint_input = OpFunctionParameter %S_std140
%97 = OpLabel
- %98 = OpCompositeExtract %int %input 0
- %99 = OpCompositeExtract %v2half %input 1
- %100 = OpCompositeExtract %v2half %input 2
- %101 = OpCompositeExtract %v2half %input 3
+ %98 = OpCompositeExtract %int %tint_input 0
+ %99 = OpCompositeExtract %v2half %tint_input 1
+ %100 = OpCompositeExtract %v2half %tint_input 2
+ %101 = OpCompositeExtract %v2half %tint_input 3
%102 = OpCompositeConstruct %mat3v2half %99 %100 %101
- %103 = OpCompositeExtract %int %input 4
+ %103 = OpCompositeExtract %int %tint_input 4
%104 = OpCompositeConstruct %S %98 %102 %103
OpReturnValue %104
OpFunctionEnd
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 0852022..6a08154 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,18 +1,49 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ f16vec2 m_col2;
+ int after;
+};
+
struct S {
int before;
f16mat3x2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat3x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = f16mat3x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2);
+ p[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.spvasm
index 031058b..99ac24c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_private.wgsl.expected.spvasm
@@ -24,8 +24,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -105,7 +105,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -117,7 +117,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat3v2half %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v2half %1 %uint_0 %int_2 %uint_1
@@ -135,15 +135,15 @@
OpStore %70 %75 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %77
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %77
+ %tint_input = OpFunctionParameter %S_std140
%78 = OpLabel
- %79 = OpCompositeExtract %int %input 0
- %80 = OpCompositeExtract %v2half %input 1
- %81 = OpCompositeExtract %v2half %input 2
- %82 = OpCompositeExtract %v2half %input 3
+ %79 = OpCompositeExtract %int %tint_input 0
+ %80 = OpCompositeExtract %v2half %tint_input 1
+ %81 = OpCompositeExtract %v2half %tint_input 2
+ %82 = OpCompositeExtract %v2half %tint_input 3
%83 = OpCompositeConstruct %mat3v2half %80 %81 %82
- %84 = OpCompositeExtract %int %input 4
+ %84 = OpCompositeExtract %int %tint_input 4
%85 = OpCompositeConstruct %S %79 %83 %84
OpReturnValue %85
OpFunctionEnd
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 f56e1f3..84dfd91 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,14 +1,31 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ f16vec2 m_col2;
+ int after;
+};
+
struct S {
int before;
f16mat3x2 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat3x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -16,16 +33,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -33,8 +50,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ v_1.tint_symbol_2[3].m = f16mat3x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2);
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.spvasm
index 1dd6112..2934025 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.spvasm
@@ -30,8 +30,8 @@
OpName %tint_store_and_preserve_padding_0 "tint_store_and_preserve_padding"
OpName %target_indices "target_indices"
OpName %value_param_0 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -121,7 +121,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -132,7 +132,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -198,15 +198,15 @@
OpStore %110 %111 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %113
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %113
+ %tint_input = OpFunctionParameter %S_std140
%114 = OpLabel
- %115 = OpCompositeExtract %int %input 0
- %116 = OpCompositeExtract %v2half %input 1
- %117 = OpCompositeExtract %v2half %input 2
- %118 = OpCompositeExtract %v2half %input 3
+ %115 = OpCompositeExtract %int %tint_input 0
+ %116 = OpCompositeExtract %v2half %tint_input 1
+ %117 = OpCompositeExtract %v2half %tint_input 2
+ %118 = OpCompositeExtract %v2half %tint_input 3
%119 = OpCompositeConstruct %mat3v2half %116 %117 %118
- %120 = OpCompositeExtract %int %input 4
+ %120 = OpCompositeExtract %int %tint_input 4
%121 = OpCompositeConstruct %S %115 %119 %120
OpReturnValue %121
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_workgroup.wgsl.expected.spvasm
index 1a8713b..6f59445 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_workgroup.wgsl.expected.spvasm
@@ -27,8 +27,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -137,7 +137,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -149,7 +149,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat3v2half %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v2half %1 %uint_0 %int_2 %uint_1
@@ -173,15 +173,15 @@
%97 = OpFunctionCall %void %f_inner %96
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %99
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %99
+ %tint_input = OpFunctionParameter %S_std140
%100 = OpLabel
- %101 = OpCompositeExtract %int %input 0
- %102 = OpCompositeExtract %v2half %input 1
- %103 = OpCompositeExtract %v2half %input 2
- %104 = OpCompositeExtract %v2half %input 3
+ %101 = OpCompositeExtract %int %tint_input 0
+ %102 = OpCompositeExtract %v2half %tint_input 1
+ %103 = OpCompositeExtract %v2half %tint_input 2
+ %104 = OpCompositeExtract %v2half %tint_input 3
%105 = OpCompositeConstruct %mat3v2half %102 %103 %104
- %106 = OpCompositeExtract %int %input 4
+ %106 = OpCompositeExtract %int %tint_input 4
%107 = OpCompositeConstruct %S %101 %105 %106
OpReturnValue %107
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
index 9453903..419f8b0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -29,10 +29,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -148,7 +148,7 @@
%76 = OpAccessChain %_ptr_Function_Outer %58 %70
%78 = OpAccessChain %_ptr_Function_Outer_std140 %56 %70
%80 = OpLoad %Outer_std140 %78 None
- %81 = OpFunctionCall %Outer %convert_Outer %80
+ %81 = OpFunctionCall %Outer %tint_convert_Outer %80
OpStore %76 %81 None
OpBranch %67
%67 = OpLabel
@@ -157,7 +157,7 @@
%69 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %58 None
%84 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %84
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %84
%86 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %87 %86
OpBranch %92
@@ -177,7 +177,7 @@
%102 = OpAccessChain %_ptr_Function_Inner %89 %97
%104 = OpAccessChain %_ptr_Function_Inner_std140 %87 %97
%106 = OpLoad %Inner_std140 %104 None
- %107 = OpFunctionCall %Inner %convert_Inner %106
+ %107 = OpFunctionCall %Inner %tint_convert_Inner %106
OpStore %102 %107 None
OpBranch %94
%94 = OpLabel
@@ -186,27 +186,27 @@
%96 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %89 None
%110 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %110
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %110
%112 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %float %l_a_i_a_i_m_i %112
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %115
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %115
+ %tint_input = OpFunctionParameter %Inner_std140
%116 = OpLabel
- %117 = OpCompositeExtract %v2float %input 0
- %118 = OpCompositeExtract %v2float %input 1
- %119 = OpCompositeExtract %v2float %input 2
+ %117 = OpCompositeExtract %v2float %tint_input 0
+ %118 = OpCompositeExtract %v2float %tint_input 1
+ %119 = OpCompositeExtract %v2float %tint_input 2
%120 = OpCompositeConstruct %mat3v2float %117 %118 %119
%121 = OpCompositeConstruct %Inner %120
OpReturnValue %121
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %123
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %123
+%tint_input_0 = OpFunctionParameter %Outer_std140
%124 = OpLabel
%126 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%127 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %91
- %125 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %125 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %126 %125
OpBranch %128
%128 = OpLabel
@@ -225,7 +225,7 @@
%138 = OpAccessChain %_ptr_Function_Inner %127 %133
%139 = OpAccessChain %_ptr_Function_Inner_std140 %126 %133
%140 = OpLoad %Inner_std140 %139 None
- %141 = OpFunctionCall %Inner %convert_Inner %140
+ %141 = OpFunctionCall %Inner %tint_convert_Inner %140
OpStore %138 %141 None
OpBranch %130
%130 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..bca6ab3 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,91 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ vec2 m_col0;
+ vec2 m_col1;
+ vec2 m_col2;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ mat3x2 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(mat3x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat3x2 v_4 = mat3x2(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1, v.tint_symbol[3].a[2].m_col2);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))))), Outer(Inner[4](Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))))), Outer(Inner[4](Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))))), Outer(Inner[4](Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ mat3x2 l_a_3_a_2_m = v_4;
+ vec2 l_a_3_a_2_m_1 = v_4[1];
+ float l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.spvasm
index ebe8739..b48a6bc 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/static_index_via_ptr.wgsl.expected.spvasm
@@ -27,10 +27,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -127,7 +127,7 @@
%61 = OpAccessChain %_ptr_Function_Outer %43 %55
%63 = OpAccessChain %_ptr_Function_Outer_std140 %41 %55
%65 = OpLoad %Outer_std140 %63 None
- %66 = OpFunctionCall %Outer %convert_Outer %65
+ %66 = OpFunctionCall %Outer %tint_convert_Outer %65
OpStore %61 %66 None
OpBranch %52
%52 = OpLabel
@@ -136,7 +136,7 @@
%54 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %43 None
%69 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %69
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %69
%71 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %72 %71
OpBranch %77
@@ -156,7 +156,7 @@
%87 = OpAccessChain %_ptr_Function_Inner %74 %82
%89 = OpAccessChain %_ptr_Function_Inner_std140 %72 %82
%91 = OpLoad %Inner_std140 %89 None
- %92 = OpFunctionCall %Inner %convert_Inner %91
+ %92 = OpFunctionCall %Inner %tint_convert_Inner %91
OpStore %87 %92 None
OpBranch %79
%79 = OpLabel
@@ -165,26 +165,26 @@
%81 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %74 None
%95 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %95
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %95
%l_a_3_a_2_m_1_0 = OpCompositeExtract %float %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %99
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %99
+ %tint_input = OpFunctionParameter %Inner_std140
%100 = OpLabel
- %101 = OpCompositeExtract %v2float %input 0
- %102 = OpCompositeExtract %v2float %input 1
- %103 = OpCompositeExtract %v2float %input 2
+ %101 = OpCompositeExtract %v2float %tint_input 0
+ %102 = OpCompositeExtract %v2float %tint_input 1
+ %103 = OpCompositeExtract %v2float %tint_input 2
%104 = OpCompositeConstruct %mat3v2float %101 %102 %103
%105 = OpCompositeConstruct %Inner %104
OpReturnValue %105
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %107
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %107
+%tint_input_0 = OpFunctionParameter %Outer_std140
%108 = OpLabel
%110 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%111 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %76
- %109 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %109 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %110 %109
OpBranch %112
%112 = OpLabel
@@ -203,7 +203,7 @@
%122 = OpAccessChain %_ptr_Function_Inner %111 %117
%123 = OpAccessChain %_ptr_Function_Inner_std140 %110 %117
%124 = OpLoad %Inner_std140 %123 None
- %125 = OpFunctionCall %Inner %convert_Inner %124
+ %125 = OpFunctionCall %Inner %tint_convert_Inner %124
OpStore %122 %125 None
OpBranch %114
%114 = OpLabel
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 16e755d..6287e31 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,15 +1,20 @@
#version 310 es
-struct S {
+struct S_std140 {
int before;
- mat3x2 m;
+ vec2 m_col0;
+ vec2 m_col1;
+ vec2 m_col2;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ mat2x3 t = transpose(mat3x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2));
+ float l = length(v.tint_symbol[0].m_col1.yx);
+ float a = abs(v.tint_symbol[0].m_col1.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 d06f473..7c58638 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,12 +1,23 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec2 m_col0;
+ vec2 m_col1;
+ vec2 m_col2;
+ int after;
+};
+
struct S {
int before;
mat3x2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -17,11 +28,31 @@
}
void e(float f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat3x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(mat3x2(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1, v_1.tint_symbol[2].m_col2));
+ d(v_1.tint_symbol[0].m_col1.yx);
+ e(v_1.tint_symbol[0].m_col1.yx[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.spvasm
index 1dfb737..529ad76 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_fn.wgsl.expected.spvasm
@@ -30,8 +30,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -134,7 +134,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -145,7 +145,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v2float %74 None
@@ -166,15 +166,15 @@
%94 = OpFunctionCall %void %e %93
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %96
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %96
+ %tint_input = OpFunctionParameter %S_std140
%97 = OpLabel
- %98 = OpCompositeExtract %int %input 0
- %99 = OpCompositeExtract %v2float %input 1
- %100 = OpCompositeExtract %v2float %input 2
- %101 = OpCompositeExtract %v2float %input 3
+ %98 = OpCompositeExtract %int %tint_input 0
+ %99 = OpCompositeExtract %v2float %tint_input 1
+ %100 = OpCompositeExtract %v2float %tint_input 2
+ %101 = OpCompositeExtract %v2float %tint_input 3
%102 = OpCompositeConstruct %mat3v2float %99 %100 %101
- %103 = OpCompositeExtract %int %input 4
+ %103 = OpCompositeExtract %int %tint_input 4
%104 = OpCompositeConstruct %S %98 %102 %103
OpReturnValue %104
OpFunctionEnd
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 affc08a..7a82411 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,17 +1,48 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec2 m_col0;
+ vec2 m_col1;
+ vec2 m_col2;
+ int after;
+};
+
struct S {
int before;
mat3x2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat3x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = mat3x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2);
+ p[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.spvasm
index 0c117d1..77092ec 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_private.wgsl.expected.spvasm
@@ -21,8 +21,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -102,7 +102,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -114,7 +114,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat3v2float %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %int_2 %uint_1
@@ -132,15 +132,15 @@
OpStore %70 %75 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %77
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %77
+ %tint_input = OpFunctionParameter %S_std140
%78 = OpLabel
- %79 = OpCompositeExtract %int %input 0
- %80 = OpCompositeExtract %v2float %input 1
- %81 = OpCompositeExtract %v2float %input 2
- %82 = OpCompositeExtract %v2float %input 3
+ %79 = OpCompositeExtract %int %tint_input 0
+ %80 = OpCompositeExtract %v2float %tint_input 1
+ %81 = OpCompositeExtract %v2float %tint_input 2
+ %82 = OpCompositeExtract %v2float %tint_input 3
%83 = OpCompositeConstruct %mat3v2float %80 %81 %82
- %84 = OpCompositeExtract %int %input 4
+ %84 = OpCompositeExtract %int %tint_input 4
%85 = OpCompositeConstruct %S %79 %83 %84
OpReturnValue %85
OpFunctionEnd
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 8679e45..86d830e 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,13 +1,30 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec2 m_col0;
+ vec2 m_col1;
+ vec2 m_col2;
+ int after;
+};
+
struct S {
int before;
mat3x2 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat3x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -15,16 +32,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -32,8 +49,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ v_1.tint_symbol_2[3].m = mat3x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2);
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.spvasm
index 879ae60..eec32de 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.spvasm
@@ -27,8 +27,8 @@
OpName %tint_store_and_preserve_padding_0 "tint_store_and_preserve_padding"
OpName %target_indices "target_indices"
OpName %value_param_0 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -118,7 +118,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -129,7 +129,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -195,15 +195,15 @@
OpStore %110 %111 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %113
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %113
+ %tint_input = OpFunctionParameter %S_std140
%114 = OpLabel
- %115 = OpCompositeExtract %int %input 0
- %116 = OpCompositeExtract %v2float %input 1
- %117 = OpCompositeExtract %v2float %input 2
- %118 = OpCompositeExtract %v2float %input 3
+ %115 = OpCompositeExtract %int %tint_input 0
+ %116 = OpCompositeExtract %v2float %tint_input 1
+ %117 = OpCompositeExtract %v2float %tint_input 2
+ %118 = OpCompositeExtract %v2float %tint_input 3
%119 = OpCompositeConstruct %mat3v2float %116 %117 %118
- %120 = OpCompositeExtract %int %input 4
+ %120 = OpCompositeExtract %int %tint_input 4
%121 = OpCompositeConstruct %S %115 %119 %120
OpReturnValue %121
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.spvasm
index 2a92080..81e06e9 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_workgroup.wgsl.expected.spvasm
@@ -24,8 +24,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -134,7 +134,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -146,7 +146,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat3v2float %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %int_2 %uint_1
@@ -170,15 +170,15 @@
%97 = OpFunctionCall %void %f_inner %96
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %99
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %99
+ %tint_input = OpFunctionParameter %S_std140
%100 = OpLabel
- %101 = OpCompositeExtract %int %input 0
- %102 = OpCompositeExtract %v2float %input 1
- %103 = OpCompositeExtract %v2float %input 2
- %104 = OpCompositeExtract %v2float %input 3
+ %101 = OpCompositeExtract %int %tint_input 0
+ %102 = OpCompositeExtract %v2float %tint_input 1
+ %103 = OpCompositeExtract %v2float %tint_input 2
+ %104 = OpCompositeExtract %v2float %tint_input 3
%105 = OpCompositeConstruct %mat3v2float %102 %103 %104
- %106 = OpCompositeExtract %int %input 4
+ %106 = OpCompositeExtract %int %tint_input 4
%107 = OpCompositeConstruct %S %101 %105 %106
OpReturnValue %107
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
index 03c1608..ad725c0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -32,10 +32,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -151,7 +151,7 @@
%76 = OpAccessChain %_ptr_Function_Outer %58 %70
%78 = OpAccessChain %_ptr_Function_Outer_std140 %56 %70
%80 = OpLoad %Outer_std140 %78 None
- %81 = OpFunctionCall %Outer %convert_Outer %80
+ %81 = OpFunctionCall %Outer %tint_convert_Outer %80
OpStore %76 %81 None
OpBranch %67
%67 = OpLabel
@@ -160,7 +160,7 @@
%69 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %58 None
%84 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %84
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %84
%86 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %87 %86
OpBranch %92
@@ -180,7 +180,7 @@
%102 = OpAccessChain %_ptr_Function_Inner %89 %97
%104 = OpAccessChain %_ptr_Function_Inner_std140 %87 %97
%106 = OpLoad %Inner_std140 %104 None
- %107 = OpFunctionCall %Inner %convert_Inner %106
+ %107 = OpFunctionCall %Inner %tint_convert_Inner %106
OpStore %102 %107 None
OpBranch %94
%94 = OpLabel
@@ -189,27 +189,27 @@
%96 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %89 None
%110 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %110
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %110
%112 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %half %l_a_i_a_i_m_i %112
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %115
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %115
+ %tint_input = OpFunctionParameter %Inner_std140
%116 = OpLabel
- %117 = OpCompositeExtract %v3half %input 0
- %118 = OpCompositeExtract %v3half %input 1
- %119 = OpCompositeExtract %v3half %input 2
+ %117 = OpCompositeExtract %v3half %tint_input 0
+ %118 = OpCompositeExtract %v3half %tint_input 1
+ %119 = OpCompositeExtract %v3half %tint_input 2
%120 = OpCompositeConstruct %mat3v3half %117 %118 %119
%121 = OpCompositeConstruct %Inner %120
OpReturnValue %121
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %123
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %123
+%tint_input_0 = OpFunctionParameter %Outer_std140
%124 = OpLabel
%126 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%127 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %91
- %125 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %125 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %126 %125
OpBranch %128
%128 = OpLabel
@@ -228,7 +228,7 @@
%138 = OpAccessChain %_ptr_Function_Inner %127 %133
%139 = OpAccessChain %_ptr_Function_Inner_std140 %126 %133
%140 = OpLoad %Inner_std140 %139 None
- %141 = OpFunctionCall %Inner %convert_Inner %140
+ %141 = OpFunctionCall %Inner %tint_convert_Inner %140
OpStore %138 %141 None
OpBranch %130
%130 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..48e3c3b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,92 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ f16vec3 m_col2;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ f16mat3 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(f16mat3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat3 v_4 = f16mat3(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1, v.tint_symbol[3].a[2].m_col2);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))))), Outer(Inner[4](Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))))), Outer(Inner[4](Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))))), Outer(Inner[4](Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ f16mat3 l_a_3_a_2_m = v_4;
+ f16vec3 l_a_3_a_2_m_1 = v_4[1];
+ float16_t l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.spvasm
index cbad701..92abbca 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/static_index_via_ptr.wgsl.expected.spvasm
@@ -30,10 +30,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -130,7 +130,7 @@
%61 = OpAccessChain %_ptr_Function_Outer %43 %55
%63 = OpAccessChain %_ptr_Function_Outer_std140 %41 %55
%65 = OpLoad %Outer_std140 %63 None
- %66 = OpFunctionCall %Outer %convert_Outer %65
+ %66 = OpFunctionCall %Outer %tint_convert_Outer %65
OpStore %61 %66 None
OpBranch %52
%52 = OpLabel
@@ -139,7 +139,7 @@
%54 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %43 None
%69 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %69
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %69
%71 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %72 %71
OpBranch %77
@@ -159,7 +159,7 @@
%87 = OpAccessChain %_ptr_Function_Inner %74 %82
%89 = OpAccessChain %_ptr_Function_Inner_std140 %72 %82
%91 = OpLoad %Inner_std140 %89 None
- %92 = OpFunctionCall %Inner %convert_Inner %91
+ %92 = OpFunctionCall %Inner %tint_convert_Inner %91
OpStore %87 %92 None
OpBranch %79
%79 = OpLabel
@@ -168,26 +168,26 @@
%81 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %74 None
%95 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %95
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %95
%l_a_3_a_2_m_1_0 = OpCompositeExtract %half %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %99
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %99
+ %tint_input = OpFunctionParameter %Inner_std140
%100 = OpLabel
- %101 = OpCompositeExtract %v3half %input 0
- %102 = OpCompositeExtract %v3half %input 1
- %103 = OpCompositeExtract %v3half %input 2
+ %101 = OpCompositeExtract %v3half %tint_input 0
+ %102 = OpCompositeExtract %v3half %tint_input 1
+ %103 = OpCompositeExtract %v3half %tint_input 2
%104 = OpCompositeConstruct %mat3v3half %101 %102 %103
%105 = OpCompositeConstruct %Inner %104
OpReturnValue %105
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %107
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %107
+%tint_input_0 = OpFunctionParameter %Outer_std140
%108 = OpLabel
%110 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%111 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %76
- %109 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %109 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %110 %109
OpBranch %112
%112 = OpLabel
@@ -206,7 +206,7 @@
%122 = OpAccessChain %_ptr_Function_Inner %111 %117
%123 = OpAccessChain %_ptr_Function_Inner_std140 %110 %117
%124 = OpLoad %Inner_std140 %123 None
- %125 = OpFunctionCall %Inner %convert_Inner %124
+ %125 = OpFunctionCall %Inner %tint_convert_Inner %124
OpStore %122 %125 None
OpBranch %114
%114 = OpLabel
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 5a920bad..227444b 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,16 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
+struct S_std140 {
int before;
- f16mat3 m;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ f16vec3 m_col2;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ f16mat3 t = transpose(f16mat3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2));
+ float16_t l = length(v.tint_symbol[0].m_col1.zxy);
+ float16_t a = abs(v.tint_symbol[0].m_col1.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 f8a566c..3320be3 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,13 +1,24 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ f16vec3 m_col2;
+ int after;
+};
+
struct S {
int before;
f16mat3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -18,11 +29,31 @@
}
void e(float16_t f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(f16mat3(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1, v_1.tint_symbol[2].m_col2));
+ d(v_1.tint_symbol[0].m_col1.zxy);
+ e(v_1.tint_symbol[0].m_col1.zxy[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.spvasm
index 36c619f..6fcfa7a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_fn.wgsl.expected.spvasm
@@ -33,8 +33,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -137,7 +137,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -148,7 +148,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v3half %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v3half %74 None
@@ -169,15 +169,15 @@
%94 = OpFunctionCall %void %e %93
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %96
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %96
+ %tint_input = OpFunctionParameter %S_std140
%97 = OpLabel
- %98 = OpCompositeExtract %int %input 0
- %99 = OpCompositeExtract %v3half %input 1
- %100 = OpCompositeExtract %v3half %input 2
- %101 = OpCompositeExtract %v3half %input 3
+ %98 = OpCompositeExtract %int %tint_input 0
+ %99 = OpCompositeExtract %v3half %tint_input 1
+ %100 = OpCompositeExtract %v3half %tint_input 2
+ %101 = OpCompositeExtract %v3half %tint_input 3
%102 = OpCompositeConstruct %mat3v3half %99 %100 %101
- %103 = OpCompositeExtract %int %input 4
+ %103 = OpCompositeExtract %int %tint_input 4
%104 = OpCompositeConstruct %S %98 %102 %103
OpReturnValue %104
OpFunctionEnd
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 955f863..4a53ff6 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,18 +1,49 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ f16vec3 m_col2;
+ int after;
+};
+
struct S {
int before;
f16mat3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = f16mat3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2);
+ p[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.spvasm
index 374d1f3..e2852a5 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_private.wgsl.expected.spvasm
@@ -24,8 +24,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -105,7 +105,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -117,7 +117,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat3v3half %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v3half %1 %uint_0 %int_2 %uint_1
@@ -135,15 +135,15 @@
OpStore %70 %75 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %77
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %77
+ %tint_input = OpFunctionParameter %S_std140
%78 = OpLabel
- %79 = OpCompositeExtract %int %input 0
- %80 = OpCompositeExtract %v3half %input 1
- %81 = OpCompositeExtract %v3half %input 2
- %82 = OpCompositeExtract %v3half %input 3
+ %79 = OpCompositeExtract %int %tint_input 0
+ %80 = OpCompositeExtract %v3half %tint_input 1
+ %81 = OpCompositeExtract %v3half %tint_input 2
+ %82 = OpCompositeExtract %v3half %tint_input 3
%83 = OpCompositeConstruct %mat3v3half %80 %81 %82
- %84 = OpCompositeExtract %int %input 4
+ %84 = OpCompositeExtract %int %tint_input 4
%85 = OpCompositeConstruct %S %79 %83 %84
OpReturnValue %85
OpFunctionEnd
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 3ee3012..435e5ec 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,14 +1,31 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ f16vec3 m_col2;
+ int after;
+};
+
struct S {
int before;
f16mat3 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
void tint_store_and_preserve_padding_2(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -21,16 +38,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -38,8 +55,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ tint_store_and_preserve_padding_2(v_1.tint_symbol_2[3].m, f16mat3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2));
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.spvasm
index 680d3a9..9b3789f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.spvasm
@@ -33,8 +33,8 @@
OpName %tint_store_and_preserve_padding_1 "tint_store_and_preserve_padding"
OpName %target_indices_0 "target_indices"
OpName %value_param_1 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -124,7 +124,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -135,7 +135,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -218,15 +218,15 @@
OpStore %124 %125 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %127
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %127
+ %tint_input = OpFunctionParameter %S_std140
%128 = OpLabel
- %129 = OpCompositeExtract %int %input 0
- %130 = OpCompositeExtract %v3half %input 1
- %131 = OpCompositeExtract %v3half %input 2
- %132 = OpCompositeExtract %v3half %input 3
+ %129 = OpCompositeExtract %int %tint_input 0
+ %130 = OpCompositeExtract %v3half %tint_input 1
+ %131 = OpCompositeExtract %v3half %tint_input 2
+ %132 = OpCompositeExtract %v3half %tint_input 3
%133 = OpCompositeConstruct %mat3v3half %130 %131 %132
- %134 = OpCompositeExtract %int %input 4
+ %134 = OpCompositeExtract %int %tint_input 4
%135 = OpCompositeConstruct %S %129 %133 %134
OpReturnValue %135
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_workgroup.wgsl.expected.spvasm
index e4c4c9f..e1840c8 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_workgroup.wgsl.expected.spvasm
@@ -27,8 +27,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -137,7 +137,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -149,7 +149,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat3v3half %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v3half %1 %uint_0 %int_2 %uint_1
@@ -173,15 +173,15 @@
%97 = OpFunctionCall %void %f_inner %96
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %99
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %99
+ %tint_input = OpFunctionParameter %S_std140
%100 = OpLabel
- %101 = OpCompositeExtract %int %input 0
- %102 = OpCompositeExtract %v3half %input 1
- %103 = OpCompositeExtract %v3half %input 2
- %104 = OpCompositeExtract %v3half %input 3
+ %101 = OpCompositeExtract %int %tint_input 0
+ %102 = OpCompositeExtract %v3half %tint_input 1
+ %103 = OpCompositeExtract %v3half %tint_input 2
+ %104 = OpCompositeExtract %v3half %tint_input 3
%105 = OpCompositeConstruct %mat3v3half %102 %103 %104
- %106 = OpCompositeExtract %int %input 4
+ %106 = OpCompositeExtract %int %tint_input 4
%107 = OpCompositeConstruct %S %101 %105 %106
OpReturnValue %107
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
index d8f4e9a..2f104dc 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -29,10 +29,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 16
OpMemberDecorate %Inner_std140 2 Offset 32
@@ -148,7 +148,7 @@
%76 = OpAccessChain %_ptr_Function_Outer %58 %70
%78 = OpAccessChain %_ptr_Function_Outer_std140 %56 %70
%80 = OpLoad %Outer_std140 %78 None
- %81 = OpFunctionCall %Outer %convert_Outer %80
+ %81 = OpFunctionCall %Outer %tint_convert_Outer %80
OpStore %76 %81 None
OpBranch %67
%67 = OpLabel
@@ -157,7 +157,7 @@
%69 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %58 None
%84 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %84
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %84
%86 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %87 %86
OpBranch %92
@@ -177,7 +177,7 @@
%102 = OpAccessChain %_ptr_Function_Inner %89 %97
%104 = OpAccessChain %_ptr_Function_Inner_std140 %87 %97
%106 = OpLoad %Inner_std140 %104 None
- %107 = OpFunctionCall %Inner %convert_Inner %106
+ %107 = OpFunctionCall %Inner %tint_convert_Inner %106
OpStore %102 %107 None
OpBranch %94
%94 = OpLabel
@@ -186,27 +186,27 @@
%96 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %89 None
%110 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %110
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %110
%112 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %float %l_a_i_a_i_m_i %112
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %115
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %115
+ %tint_input = OpFunctionParameter %Inner_std140
%116 = OpLabel
- %117 = OpCompositeExtract %v3float %input 0
- %118 = OpCompositeExtract %v3float %input 1
- %119 = OpCompositeExtract %v3float %input 2
+ %117 = OpCompositeExtract %v3float %tint_input 0
+ %118 = OpCompositeExtract %v3float %tint_input 1
+ %119 = OpCompositeExtract %v3float %tint_input 2
%120 = OpCompositeConstruct %mat3v3float %117 %118 %119
%121 = OpCompositeConstruct %Inner %120
OpReturnValue %121
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %123
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %123
+%tint_input_0 = OpFunctionParameter %Outer_std140
%124 = OpLabel
%126 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%127 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %91
- %125 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %125 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %126 %125
OpBranch %128
%128 = OpLabel
@@ -225,7 +225,7 @@
%138 = OpAccessChain %_ptr_Function_Inner %127 %133
%139 = OpAccessChain %_ptr_Function_Inner_std140 %126 %133
%140 = OpLoad %Inner_std140 %139 None
- %141 = OpFunctionCall %Inner %convert_Inner %140
+ %141 = OpFunctionCall %Inner %tint_convert_Inner %140
OpStore %138 %141 None
OpBranch %130
%130 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..d0702bb 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,91 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ vec3 m_col0;
+ vec3 m_col1;
+ vec3 m_col2;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ mat3 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(mat3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat3 v_4 = mat3(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1, v.tint_symbol[3].a[2].m_col2);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))))), Outer(Inner[4](Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))))), Outer(Inner[4](Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))))), Outer(Inner[4](Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ mat3 l_a_3_a_2_m = v_4;
+ vec3 l_a_3_a_2_m_1 = v_4[1];
+ float l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.spvasm
index 63f51ee..5728b3f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/static_index_via_ptr.wgsl.expected.spvasm
@@ -27,10 +27,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 16
OpMemberDecorate %Inner_std140 2 Offset 32
@@ -127,7 +127,7 @@
%61 = OpAccessChain %_ptr_Function_Outer %43 %55
%63 = OpAccessChain %_ptr_Function_Outer_std140 %41 %55
%65 = OpLoad %Outer_std140 %63 None
- %66 = OpFunctionCall %Outer %convert_Outer %65
+ %66 = OpFunctionCall %Outer %tint_convert_Outer %65
OpStore %61 %66 None
OpBranch %52
%52 = OpLabel
@@ -136,7 +136,7 @@
%54 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %43 None
%69 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %69
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %69
%71 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %72 %71
OpBranch %77
@@ -156,7 +156,7 @@
%87 = OpAccessChain %_ptr_Function_Inner %74 %82
%89 = OpAccessChain %_ptr_Function_Inner_std140 %72 %82
%91 = OpLoad %Inner_std140 %89 None
- %92 = OpFunctionCall %Inner %convert_Inner %91
+ %92 = OpFunctionCall %Inner %tint_convert_Inner %91
OpStore %87 %92 None
OpBranch %79
%79 = OpLabel
@@ -165,26 +165,26 @@
%81 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %74 None
%95 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %95
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %95
%l_a_3_a_2_m_1_0 = OpCompositeExtract %float %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %99
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %99
+ %tint_input = OpFunctionParameter %Inner_std140
%100 = OpLabel
- %101 = OpCompositeExtract %v3float %input 0
- %102 = OpCompositeExtract %v3float %input 1
- %103 = OpCompositeExtract %v3float %input 2
+ %101 = OpCompositeExtract %v3float %tint_input 0
+ %102 = OpCompositeExtract %v3float %tint_input 1
+ %103 = OpCompositeExtract %v3float %tint_input 2
%104 = OpCompositeConstruct %mat3v3float %101 %102 %103
%105 = OpCompositeConstruct %Inner %104
OpReturnValue %105
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %107
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %107
+%tint_input_0 = OpFunctionParameter %Outer_std140
%108 = OpLabel
%110 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%111 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %76
- %109 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %109 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %110 %109
OpBranch %112
%112 = OpLabel
@@ -203,7 +203,7 @@
%122 = OpAccessChain %_ptr_Function_Inner %111 %117
%123 = OpAccessChain %_ptr_Function_Inner_std140 %110 %117
%124 = OpLoad %Inner_std140 %123 None
- %125 = OpFunctionCall %Inner %convert_Inner %124
+ %125 = OpFunctionCall %Inner %tint_convert_Inner %124
OpStore %122 %125 None
OpBranch %114
%114 = OpLabel
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 3db5248..eaea8c6 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,15 +1,20 @@
#version 310 es
-struct S {
+struct S_std140 {
int before;
- mat3 m;
+ vec3 m_col0;
+ vec3 m_col1;
+ vec3 m_col2;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ mat3 t = transpose(mat3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2));
+ float l = length(v.tint_symbol[0].m_col1.zxy);
+ float a = abs(v.tint_symbol[0].m_col1.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 36f093c..c1084dd 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,12 +1,23 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec3 m_col0;
+ vec3 m_col1;
+ vec3 m_col2;
+ int after;
+};
+
struct S {
int before;
mat3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -17,11 +28,31 @@
}
void e(float f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(mat3(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1, v_1.tint_symbol[2].m_col2));
+ d(v_1.tint_symbol[0].m_col1.zxy);
+ e(v_1.tint_symbol[0].m_col1.zxy[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.spvasm
index 87e1b9a..a62d3ca 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_fn.wgsl.expected.spvasm
@@ -30,8 +30,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -134,7 +134,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -145,7 +145,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v3float %74 None
@@ -166,15 +166,15 @@
%94 = OpFunctionCall %void %e %93
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %96
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %96
+ %tint_input = OpFunctionParameter %S_std140
%97 = OpLabel
- %98 = OpCompositeExtract %int %input 0
- %99 = OpCompositeExtract %v3float %input 1
- %100 = OpCompositeExtract %v3float %input 2
- %101 = OpCompositeExtract %v3float %input 3
+ %98 = OpCompositeExtract %int %tint_input 0
+ %99 = OpCompositeExtract %v3float %tint_input 1
+ %100 = OpCompositeExtract %v3float %tint_input 2
+ %101 = OpCompositeExtract %v3float %tint_input 3
%102 = OpCompositeConstruct %mat3v3float %99 %100 %101
- %103 = OpCompositeExtract %int %input 4
+ %103 = OpCompositeExtract %int %tint_input 4
%104 = OpCompositeConstruct %S %98 %102 %103
OpReturnValue %104
OpFunctionEnd
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 8966e9b..ed4574f 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,17 +1,48 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec3 m_col0;
+ vec3 m_col1;
+ vec3 m_col2;
+ int after;
+};
+
struct S {
int before;
mat3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = mat3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2);
+ p[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.spvasm
index d2e4a23..0cd0c69 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_private.wgsl.expected.spvasm
@@ -21,8 +21,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -102,7 +102,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -114,7 +114,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat3v3float %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %int_2 %uint_1
@@ -132,15 +132,15 @@
OpStore %70 %75 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %77
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %77
+ %tint_input = OpFunctionParameter %S_std140
%78 = OpLabel
- %79 = OpCompositeExtract %int %input 0
- %80 = OpCompositeExtract %v3float %input 1
- %81 = OpCompositeExtract %v3float %input 2
- %82 = OpCompositeExtract %v3float %input 3
+ %79 = OpCompositeExtract %int %tint_input 0
+ %80 = OpCompositeExtract %v3float %tint_input 1
+ %81 = OpCompositeExtract %v3float %tint_input 2
+ %82 = OpCompositeExtract %v3float %tint_input 3
%83 = OpCompositeConstruct %mat3v3float %80 %81 %82
- %84 = OpCompositeExtract %int %input 4
+ %84 = OpCompositeExtract %int %tint_input 4
%85 = OpCompositeConstruct %S %79 %83 %84
OpReturnValue %85
OpFunctionEnd
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 19597f7..7ff4db2 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,13 +1,30 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec3 m_col0;
+ vec3 m_col1;
+ vec3 m_col2;
+ int after;
+};
+
struct S {
int before;
mat3 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
void tint_store_and_preserve_padding_2(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -20,16 +37,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -37,8 +54,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ tint_store_and_preserve_padding_2(v_1.tint_symbol_2[3].m, mat3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2));
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.spvasm
index cc0e653..0f7e788 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.spvasm
@@ -30,8 +30,8 @@
OpName %tint_store_and_preserve_padding_1 "tint_store_and_preserve_padding"
OpName %target_indices_0 "target_indices"
OpName %value_param_1 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -121,7 +121,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -132,7 +132,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -215,15 +215,15 @@
OpStore %124 %125 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %127
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %127
+ %tint_input = OpFunctionParameter %S_std140
%128 = OpLabel
- %129 = OpCompositeExtract %int %input 0
- %130 = OpCompositeExtract %v3float %input 1
- %131 = OpCompositeExtract %v3float %input 2
- %132 = OpCompositeExtract %v3float %input 3
+ %129 = OpCompositeExtract %int %tint_input 0
+ %130 = OpCompositeExtract %v3float %tint_input 1
+ %131 = OpCompositeExtract %v3float %tint_input 2
+ %132 = OpCompositeExtract %v3float %tint_input 3
%133 = OpCompositeConstruct %mat3v3float %130 %131 %132
- %134 = OpCompositeExtract %int %input 4
+ %134 = OpCompositeExtract %int %tint_input 4
%135 = OpCompositeConstruct %S %129 %133 %134
OpReturnValue %135
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.spvasm
index 68016c0..829a71e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_workgroup.wgsl.expected.spvasm
@@ -24,8 +24,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -134,7 +134,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -146,7 +146,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat3v3float %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %int_2 %uint_1
@@ -170,15 +170,15 @@
%97 = OpFunctionCall %void %f_inner %96
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %99
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %99
+ %tint_input = OpFunctionParameter %S_std140
%100 = OpLabel
- %101 = OpCompositeExtract %int %input 0
- %102 = OpCompositeExtract %v3float %input 1
- %103 = OpCompositeExtract %v3float %input 2
- %104 = OpCompositeExtract %v3float %input 3
+ %101 = OpCompositeExtract %int %tint_input 0
+ %102 = OpCompositeExtract %v3float %tint_input 1
+ %103 = OpCompositeExtract %v3float %tint_input 2
+ %104 = OpCompositeExtract %v3float %tint_input 3
%105 = OpCompositeConstruct %mat3v3float %102 %103 %104
- %106 = OpCompositeExtract %int %input 4
+ %106 = OpCompositeExtract %int %tint_input 4
%107 = OpCompositeConstruct %S %101 %105 %106
OpReturnValue %107
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
index 4a9a0a3..46f639a 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -32,10 +32,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -151,7 +151,7 @@
%76 = OpAccessChain %_ptr_Function_Outer %58 %70
%78 = OpAccessChain %_ptr_Function_Outer_std140 %56 %70
%80 = OpLoad %Outer_std140 %78 None
- %81 = OpFunctionCall %Outer %convert_Outer %80
+ %81 = OpFunctionCall %Outer %tint_convert_Outer %80
OpStore %76 %81 None
OpBranch %67
%67 = OpLabel
@@ -160,7 +160,7 @@
%69 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %58 None
%84 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %84
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %84
%86 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %87 %86
OpBranch %92
@@ -180,7 +180,7 @@
%102 = OpAccessChain %_ptr_Function_Inner %89 %97
%104 = OpAccessChain %_ptr_Function_Inner_std140 %87 %97
%106 = OpLoad %Inner_std140 %104 None
- %107 = OpFunctionCall %Inner %convert_Inner %106
+ %107 = OpFunctionCall %Inner %tint_convert_Inner %106
OpStore %102 %107 None
OpBranch %94
%94 = OpLabel
@@ -189,27 +189,27 @@
%96 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %89 None
%110 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %110
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %110
%112 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %half %l_a_i_a_i_m_i %112
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %115
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %115
+ %tint_input = OpFunctionParameter %Inner_std140
%116 = OpLabel
- %117 = OpCompositeExtract %v4half %input 0
- %118 = OpCompositeExtract %v4half %input 1
- %119 = OpCompositeExtract %v4half %input 2
+ %117 = OpCompositeExtract %v4half %tint_input 0
+ %118 = OpCompositeExtract %v4half %tint_input 1
+ %119 = OpCompositeExtract %v4half %tint_input 2
%120 = OpCompositeConstruct %mat3v4half %117 %118 %119
%121 = OpCompositeConstruct %Inner %120
OpReturnValue %121
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %123
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %123
+%tint_input_0 = OpFunctionParameter %Outer_std140
%124 = OpLabel
%126 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%127 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %91
- %125 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %125 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %126 %125
OpBranch %128
%128 = OpLabel
@@ -228,7 +228,7 @@
%138 = OpAccessChain %_ptr_Function_Inner %127 %133
%139 = OpAccessChain %_ptr_Function_Inner_std140 %126 %133
%140 = OpLoad %Inner_std140 %139 None
- %141 = OpFunctionCall %Inner %convert_Inner %140
+ %141 = OpFunctionCall %Inner %tint_convert_Inner %140
OpStore %138 %141 None
OpBranch %130
%130 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..5d21dbe 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,92 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ f16vec4 m_col2;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ f16mat3x4 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(f16mat3x4(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat3x4 v_4 = f16mat3x4(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1, v.tint_symbol[3].a[2].m_col2);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))))), Outer(Inner[4](Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))))), Outer(Inner[4](Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))))), Outer(Inner[4](Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ f16mat3x4 l_a_3_a_2_m = v_4;
+ f16vec4 l_a_3_a_2_m_1 = v_4[1];
+ float16_t l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.spvasm
index 89553a7..267b1ae 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/static_index_via_ptr.wgsl.expected.spvasm
@@ -30,10 +30,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -130,7 +130,7 @@
%61 = OpAccessChain %_ptr_Function_Outer %43 %55
%63 = OpAccessChain %_ptr_Function_Outer_std140 %41 %55
%65 = OpLoad %Outer_std140 %63 None
- %66 = OpFunctionCall %Outer %convert_Outer %65
+ %66 = OpFunctionCall %Outer %tint_convert_Outer %65
OpStore %61 %66 None
OpBranch %52
%52 = OpLabel
@@ -139,7 +139,7 @@
%54 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %43 None
%69 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %69
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %69
%71 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %72 %71
OpBranch %77
@@ -159,7 +159,7 @@
%87 = OpAccessChain %_ptr_Function_Inner %74 %82
%89 = OpAccessChain %_ptr_Function_Inner_std140 %72 %82
%91 = OpLoad %Inner_std140 %89 None
- %92 = OpFunctionCall %Inner %convert_Inner %91
+ %92 = OpFunctionCall %Inner %tint_convert_Inner %91
OpStore %87 %92 None
OpBranch %79
%79 = OpLabel
@@ -168,26 +168,26 @@
%81 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %74 None
%95 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %95
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %95
%l_a_3_a_2_m_1_0 = OpCompositeExtract %half %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %99
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %99
+ %tint_input = OpFunctionParameter %Inner_std140
%100 = OpLabel
- %101 = OpCompositeExtract %v4half %input 0
- %102 = OpCompositeExtract %v4half %input 1
- %103 = OpCompositeExtract %v4half %input 2
+ %101 = OpCompositeExtract %v4half %tint_input 0
+ %102 = OpCompositeExtract %v4half %tint_input 1
+ %103 = OpCompositeExtract %v4half %tint_input 2
%104 = OpCompositeConstruct %mat3v4half %101 %102 %103
%105 = OpCompositeConstruct %Inner %104
OpReturnValue %105
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %107
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %107
+%tint_input_0 = OpFunctionParameter %Outer_std140
%108 = OpLabel
%110 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%111 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %76
- %109 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %109 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %110 %109
OpBranch %112
%112 = OpLabel
@@ -206,7 +206,7 @@
%122 = OpAccessChain %_ptr_Function_Inner %111 %117
%123 = OpAccessChain %_ptr_Function_Inner_std140 %110 %117
%124 = OpLoad %Inner_std140 %123 None
- %125 = OpFunctionCall %Inner %convert_Inner %124
+ %125 = OpFunctionCall %Inner %tint_convert_Inner %124
OpStore %122 %125 None
OpBranch %114
%114 = OpLabel
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 f842f18..42d175f 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,16 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
+struct S_std140 {
int before;
- f16mat3x4 m;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ f16vec4 m_col2;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ f16mat4x3 t = transpose(f16mat3x4(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2));
+ float16_t l = length(v.tint_symbol[0].m_col1.ywxz);
+ float16_t a = abs(v.tint_symbol[0].m_col1.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 cbd65f9..b49c32f 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,13 +1,24 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ f16vec4 m_col2;
+ int after;
+};
+
struct S {
int before;
f16mat3x4 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -18,11 +29,31 @@
}
void e(float16_t f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat3x4(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(f16mat3x4(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1, v_1.tint_symbol[2].m_col2));
+ d(v_1.tint_symbol[0].m_col1.ywxz);
+ e(v_1.tint_symbol[0].m_col1.ywxz[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.spvasm
index adb5ac3..43b035c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_fn.wgsl.expected.spvasm
@@ -33,8 +33,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -137,7 +137,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -148,7 +148,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v4half %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v4half %74 None
@@ -169,15 +169,15 @@
%94 = OpFunctionCall %void %e %93
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %96
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %96
+ %tint_input = OpFunctionParameter %S_std140
%97 = OpLabel
- %98 = OpCompositeExtract %int %input 0
- %99 = OpCompositeExtract %v4half %input 1
- %100 = OpCompositeExtract %v4half %input 2
- %101 = OpCompositeExtract %v4half %input 3
+ %98 = OpCompositeExtract %int %tint_input 0
+ %99 = OpCompositeExtract %v4half %tint_input 1
+ %100 = OpCompositeExtract %v4half %tint_input 2
+ %101 = OpCompositeExtract %v4half %tint_input 3
%102 = OpCompositeConstruct %mat3v4half %99 %100 %101
- %103 = OpCompositeExtract %int %input 4
+ %103 = OpCompositeExtract %int %tint_input 4
%104 = OpCompositeConstruct %S %98 %102 %103
OpReturnValue %104
OpFunctionEnd
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 ecd97e8..c050af8 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,18 +1,49 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ f16vec4 m_col2;
+ int after;
+};
+
struct S {
int before;
f16mat3x4 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat3x4(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = f16mat3x4(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2);
+ p[1].m[0] = v.tint_symbol[0].m_col1.ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.spvasm
index 627f2f7..e78619f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_private.wgsl.expected.spvasm
@@ -24,8 +24,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -105,7 +105,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -117,7 +117,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat3v4half %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v4half %1 %uint_0 %int_2 %uint_1
@@ -135,15 +135,15 @@
OpStore %70 %75 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %77
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %77
+ %tint_input = OpFunctionParameter %S_std140
%78 = OpLabel
- %79 = OpCompositeExtract %int %input 0
- %80 = OpCompositeExtract %v4half %input 1
- %81 = OpCompositeExtract %v4half %input 2
- %82 = OpCompositeExtract %v4half %input 3
+ %79 = OpCompositeExtract %int %tint_input 0
+ %80 = OpCompositeExtract %v4half %tint_input 1
+ %81 = OpCompositeExtract %v4half %tint_input 2
+ %82 = OpCompositeExtract %v4half %tint_input 3
%83 = OpCompositeConstruct %mat3v4half %80 %81 %82
- %84 = OpCompositeExtract %int %input 4
+ %84 = OpCompositeExtract %int %tint_input 4
%85 = OpCompositeConstruct %S %79 %83 %84
OpReturnValue %85
OpFunctionEnd
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 813ef00..2efedf7 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,14 +1,31 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ f16vec4 m_col2;
+ int after;
+};
+
struct S {
int before;
f16mat3x4 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat3x4(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after);
+}
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -16,16 +33,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -33,8 +50,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ v_1.tint_symbol_2[3].m = f16mat3x4(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2);
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.spvasm
index 3ac165e..789e11c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.spvasm
@@ -30,8 +30,8 @@
OpName %tint_store_and_preserve_padding_0 "tint_store_and_preserve_padding"
OpName %target_indices "target_indices"
OpName %value_param_0 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -121,7 +121,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -132,7 +132,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -198,15 +198,15 @@
OpStore %110 %111 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %113
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %113
+ %tint_input = OpFunctionParameter %S_std140
%114 = OpLabel
- %115 = OpCompositeExtract %int %input 0
- %116 = OpCompositeExtract %v4half %input 1
- %117 = OpCompositeExtract %v4half %input 2
- %118 = OpCompositeExtract %v4half %input 3
+ %115 = OpCompositeExtract %int %tint_input 0
+ %116 = OpCompositeExtract %v4half %tint_input 1
+ %117 = OpCompositeExtract %v4half %tint_input 2
+ %118 = OpCompositeExtract %v4half %tint_input 3
%119 = OpCompositeConstruct %mat3v4half %116 %117 %118
- %120 = OpCompositeExtract %int %input 4
+ %120 = OpCompositeExtract %int %tint_input 4
%121 = OpCompositeConstruct %S %115 %119 %120
OpReturnValue %121
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_workgroup.wgsl.expected.spvasm
index 3c76a9f..f0d06e1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_workgroup.wgsl.expected.spvasm
@@ -27,8 +27,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -137,7 +137,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -149,7 +149,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat3v4half %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v4half %1 %uint_0 %int_2 %uint_1
@@ -173,15 +173,15 @@
%97 = OpFunctionCall %void %f_inner %96
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %99
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %99
+ %tint_input = OpFunctionParameter %S_std140
%100 = OpLabel
- %101 = OpCompositeExtract %int %input 0
- %102 = OpCompositeExtract %v4half %input 1
- %103 = OpCompositeExtract %v4half %input 2
- %104 = OpCompositeExtract %v4half %input 3
+ %101 = OpCompositeExtract %int %tint_input 0
+ %102 = OpCompositeExtract %v4half %tint_input 1
+ %103 = OpCompositeExtract %v4half %tint_input 2
+ %104 = OpCompositeExtract %v4half %tint_input 3
%105 = OpCompositeConstruct %mat3v4half %102 %103 %104
- %106 = OpCompositeExtract %int %input 4
+ %106 = OpCompositeExtract %int %tint_input 4
%107 = OpCompositeConstruct %S %101 %105 %106
OpReturnValue %107
OpFunctionEnd
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 5b998ee..fb36742 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
@@ -6,10 +6,13 @@
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v;
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]);
+ mat4x3 t = transpose(v.tint_symbol[2].m);
+ float l = length(v.tint_symbol[0].m[1].ywxz);
+ float a = abs(v.tint_symbol[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 a5e25df..f28b7ca 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
@@ -6,7 +6,10 @@
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -19,9 +22,9 @@
}
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]);
+ a(v_1.tint_symbol);
+ b(v_1.tint_symbol[2]);
+ c(v_1.tint_symbol[2].m);
+ d(v_1.tint_symbol[0].m[1].ywxz);
+ e(v_1.tint_symbol[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 78d2000..57271ee 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
@@ -6,12 +6,15 @@
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v;
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;
+ p = v.tint_symbol;
+ p[1] = v.tint_symbol[2];
+ p[3].m = v.tint_symbol[2].m;
+ p[1].m[0] = v.tint_symbol[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 e8be633..f7ae754 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
@@ -6,8 +6,14 @@
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -15,16 +21,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -32,8 +38,8 @@
}
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;
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v.tint_symbol);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], v.tint_symbol[2]);
+ v_1.tint_symbol_2[3].m = v.tint_symbol[2].m;
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m[1].ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
index bb65216..905afb8 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -33,10 +33,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 4
OpMemberDecorate %Inner_std140 2 Offset 8
@@ -156,7 +156,7 @@
%79 = OpAccessChain %_ptr_Function_Outer %61 %73
%81 = OpAccessChain %_ptr_Function_Outer_std140 %59 %73
%83 = OpLoad %Outer_std140 %81 None
- %84 = OpFunctionCall %Outer %convert_Outer %83
+ %84 = OpFunctionCall %Outer %tint_convert_Outer %83
OpStore %79 %84 None
OpBranch %70
%70 = OpLabel
@@ -165,7 +165,7 @@
%72 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %61 None
%87 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %87
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %87
%89 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %90 %89
OpBranch %95
@@ -185,7 +185,7 @@
%105 = OpAccessChain %_ptr_Function_Inner %92 %100
%107 = OpAccessChain %_ptr_Function_Inner_std140 %90 %100
%109 = OpLoad %Inner_std140 %107 None
- %110 = OpFunctionCall %Inner %convert_Inner %109
+ %110 = OpFunctionCall %Inner %tint_convert_Inner %109
OpStore %105 %110 None
OpBranch %97
%97 = OpLabel
@@ -194,28 +194,28 @@
%99 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %92 None
%113 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %113
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %113
%115 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %half %l_a_i_a_i_m_i %115
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %118
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %118
+ %tint_input = OpFunctionParameter %Inner_std140
%119 = OpLabel
- %120 = OpCompositeExtract %v2half %input 0
- %121 = OpCompositeExtract %v2half %input 1
- %122 = OpCompositeExtract %v2half %input 2
- %123 = OpCompositeExtract %v2half %input 3
+ %120 = OpCompositeExtract %v2half %tint_input 0
+ %121 = OpCompositeExtract %v2half %tint_input 1
+ %122 = OpCompositeExtract %v2half %tint_input 2
+ %123 = OpCompositeExtract %v2half %tint_input 3
%124 = OpCompositeConstruct %mat4v2half %120 %121 %122 %123
%125 = OpCompositeConstruct %Inner %124
OpReturnValue %125
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %127
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %127
+%tint_input_0 = OpFunctionParameter %Outer_std140
%128 = OpLabel
%130 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%131 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %94
- %129 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %129 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %130 %129
OpBranch %132
%132 = OpLabel
@@ -234,7 +234,7 @@
%142 = OpAccessChain %_ptr_Function_Inner %131 %137
%143 = OpAccessChain %_ptr_Function_Inner_std140 %130 %137
%144 = OpLoad %Inner_std140 %143 None
- %145 = OpFunctionCall %Inner %convert_Inner %144
+ %145 = OpFunctionCall %Inner %tint_convert_Inner %144
OpStore %142 %145 None
OpBranch %134
%134 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..3af6bff 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,93 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ f16vec2 m_col2;
+ f16vec2 m_col3;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ f16mat4x2 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(f16mat4x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4x2 v_4 = f16mat4x2(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1, v.tint_symbol[3].a[2].m_col2, v.tint_symbol[3].a[2].m_col3);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))))), Outer(Inner[4](Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))))), Outer(Inner[4](Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))))), Outer(Inner[4](Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))), Inner(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ f16mat4x2 l_a_3_a_2_m = v_4;
+ f16vec2 l_a_3_a_2_m_1 = v_4[1];
+ float16_t l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.spvasm
index 9c191bc..6d14654 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/static_index_via_ptr.wgsl.expected.spvasm
@@ -31,10 +31,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 4
OpMemberDecorate %Inner_std140 2 Offset 8
@@ -135,7 +135,7 @@
%64 = OpAccessChain %_ptr_Function_Outer %46 %58
%66 = OpAccessChain %_ptr_Function_Outer_std140 %44 %58
%68 = OpLoad %Outer_std140 %66 None
- %69 = OpFunctionCall %Outer %convert_Outer %68
+ %69 = OpFunctionCall %Outer %tint_convert_Outer %68
OpStore %64 %69 None
OpBranch %55
%55 = OpLabel
@@ -144,7 +144,7 @@
%57 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %46 None
%72 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %72
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %72
%74 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %75 %74
OpBranch %80
@@ -164,7 +164,7 @@
%90 = OpAccessChain %_ptr_Function_Inner %77 %85
%92 = OpAccessChain %_ptr_Function_Inner_std140 %75 %85
%94 = OpLoad %Inner_std140 %92 None
- %95 = OpFunctionCall %Inner %convert_Inner %94
+ %95 = OpFunctionCall %Inner %tint_convert_Inner %94
OpStore %90 %95 None
OpBranch %82
%82 = OpLabel
@@ -173,27 +173,27 @@
%84 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %77 None
%98 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %98
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %98
%l_a_3_a_2_m_1_0 = OpCompositeExtract %half %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %102
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %102
+ %tint_input = OpFunctionParameter %Inner_std140
%103 = OpLabel
- %104 = OpCompositeExtract %v2half %input 0
- %105 = OpCompositeExtract %v2half %input 1
- %106 = OpCompositeExtract %v2half %input 2
- %107 = OpCompositeExtract %v2half %input 3
+ %104 = OpCompositeExtract %v2half %tint_input 0
+ %105 = OpCompositeExtract %v2half %tint_input 1
+ %106 = OpCompositeExtract %v2half %tint_input 2
+ %107 = OpCompositeExtract %v2half %tint_input 3
%108 = OpCompositeConstruct %mat4v2half %104 %105 %106 %107
%109 = OpCompositeConstruct %Inner %108
OpReturnValue %109
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %111
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %111
+%tint_input_0 = OpFunctionParameter %Outer_std140
%112 = OpLabel
%114 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%115 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %79
- %113 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %113 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %114 %113
OpBranch %116
%116 = OpLabel
@@ -212,7 +212,7 @@
%126 = OpAccessChain %_ptr_Function_Inner %115 %121
%127 = OpAccessChain %_ptr_Function_Inner_std140 %114 %121
%128 = OpLoad %Inner_std140 %127 None
- %129 = OpFunctionCall %Inner %convert_Inner %128
+ %129 = OpFunctionCall %Inner %tint_convert_Inner %128
OpStore %126 %129 None
OpBranch %118
%118 = OpLabel
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 0178e4f..7e6f245 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,16 +1,22 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
+struct S_std140 {
int before;
- f16mat4x2 m;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ f16vec2 m_col2;
+ f16vec2 m_col3;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ f16mat2x4 t = transpose(f16mat4x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3));
+ float16_t l = length(v.tint_symbol[0].m_col1.yx);
+ float16_t a = abs(v.tint_symbol[0].m_col1.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 93c51f5..e228d18 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,13 +1,25 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ f16vec2 m_col2;
+ f16vec2 m_col3;
+ int after;
+};
+
struct S {
int before;
f16mat4x2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -18,11 +30,31 @@
}
void e(float16_t f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat4x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(f16mat4x2(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1, v_1.tint_symbol[2].m_col2, v_1.tint_symbol[2].m_col3));
+ d(v_1.tint_symbol[0].m_col1.yx);
+ e(v_1.tint_symbol[0].m_col1.yx[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.spvasm
index 8709277..0f29054 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_fn.wgsl.expected.spvasm
@@ -34,8 +34,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -139,7 +139,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -150,7 +150,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v2half %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v2half %74 None
@@ -173,16 +173,16 @@
%96 = OpFunctionCall %void %e %95
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %98
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %98
+ %tint_input = OpFunctionParameter %S_std140
%99 = OpLabel
- %100 = OpCompositeExtract %int %input 0
- %101 = OpCompositeExtract %v2half %input 1
- %102 = OpCompositeExtract %v2half %input 2
- %103 = OpCompositeExtract %v2half %input 3
- %104 = OpCompositeExtract %v2half %input 4
+ %100 = OpCompositeExtract %int %tint_input 0
+ %101 = OpCompositeExtract %v2half %tint_input 1
+ %102 = OpCompositeExtract %v2half %tint_input 2
+ %103 = OpCompositeExtract %v2half %tint_input 3
+ %104 = OpCompositeExtract %v2half %tint_input 4
%105 = OpCompositeConstruct %mat4v2half %101 %102 %103 %104
- %106 = OpCompositeExtract %int %input 5
+ %106 = OpCompositeExtract %int %tint_input 5
%107 = OpCompositeConstruct %S %100 %105 %106
OpReturnValue %107
OpFunctionEnd
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 a089b82..dd8cbab 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,18 +1,50 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ f16vec2 m_col2;
+ f16vec2 m_col3;
+ int after;
+};
+
struct S {
int before;
f16mat4x2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat4x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = f16mat4x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3);
+ p[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.spvasm
index 374a301..cce3f33 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_private.wgsl.expected.spvasm
@@ -25,8 +25,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -107,7 +107,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -119,7 +119,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat4v2half %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v2half %1 %uint_0 %int_2 %uint_1
@@ -139,16 +139,16 @@
OpStore %72 %77 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %79
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %79
+ %tint_input = OpFunctionParameter %S_std140
%80 = OpLabel
- %81 = OpCompositeExtract %int %input 0
- %82 = OpCompositeExtract %v2half %input 1
- %83 = OpCompositeExtract %v2half %input 2
- %84 = OpCompositeExtract %v2half %input 3
- %85 = OpCompositeExtract %v2half %input 4
+ %81 = OpCompositeExtract %int %tint_input 0
+ %82 = OpCompositeExtract %v2half %tint_input 1
+ %83 = OpCompositeExtract %v2half %tint_input 2
+ %84 = OpCompositeExtract %v2half %tint_input 3
+ %85 = OpCompositeExtract %v2half %tint_input 4
%86 = OpCompositeConstruct %mat4v2half %82 %83 %84 %85
- %87 = OpCompositeExtract %int %input 5
+ %87 = OpCompositeExtract %int %tint_input 5
%88 = OpCompositeConstruct %S %81 %86 %87
OpReturnValue %88
OpFunctionEnd
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 5fa640f..46682ec 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,14 +1,32 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec2 m_col0;
+ f16vec2 m_col1;
+ f16vec2 m_col2;
+ f16vec2 m_col3;
+ int after;
+};
+
struct S {
int before;
f16mat4x2 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat4x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -16,16 +34,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -33,8 +51,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ v_1.tint_symbol_2[3].m = f16mat4x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3);
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.spvasm
index 4fe4132..cb2de88 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.spvasm
@@ -31,8 +31,8 @@
OpName %tint_store_and_preserve_padding_0 "tint_store_and_preserve_padding"
OpName %target_indices "target_indices"
OpName %value_param_0 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -123,7 +123,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -134,7 +134,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -202,16 +202,16 @@
OpStore %112 %113 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %115
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %115
+ %tint_input = OpFunctionParameter %S_std140
%116 = OpLabel
- %117 = OpCompositeExtract %int %input 0
- %118 = OpCompositeExtract %v2half %input 1
- %119 = OpCompositeExtract %v2half %input 2
- %120 = OpCompositeExtract %v2half %input 3
- %121 = OpCompositeExtract %v2half %input 4
+ %117 = OpCompositeExtract %int %tint_input 0
+ %118 = OpCompositeExtract %v2half %tint_input 1
+ %119 = OpCompositeExtract %v2half %tint_input 2
+ %120 = OpCompositeExtract %v2half %tint_input 3
+ %121 = OpCompositeExtract %v2half %tint_input 4
%122 = OpCompositeConstruct %mat4v2half %118 %119 %120 %121
- %123 = OpCompositeExtract %int %input 5
+ %123 = OpCompositeExtract %int %tint_input 5
%124 = OpCompositeConstruct %S %117 %122 %123
OpReturnValue %124
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_workgroup.wgsl.expected.spvasm
index 52ef5a5..405991b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_workgroup.wgsl.expected.spvasm
@@ -28,8 +28,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 4
OpMemberDecorate %S_std140 2 Offset 8
@@ -139,7 +139,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -151,7 +151,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat4v2half %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v2half %1 %uint_0 %int_2 %uint_1
@@ -177,16 +177,16 @@
%99 = OpFunctionCall %void %f_inner %98
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %101
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %101
+ %tint_input = OpFunctionParameter %S_std140
%102 = OpLabel
- %103 = OpCompositeExtract %int %input 0
- %104 = OpCompositeExtract %v2half %input 1
- %105 = OpCompositeExtract %v2half %input 2
- %106 = OpCompositeExtract %v2half %input 3
- %107 = OpCompositeExtract %v2half %input 4
+ %103 = OpCompositeExtract %int %tint_input 0
+ %104 = OpCompositeExtract %v2half %tint_input 1
+ %105 = OpCompositeExtract %v2half %tint_input 2
+ %106 = OpCompositeExtract %v2half %tint_input 3
+ %107 = OpCompositeExtract %v2half %tint_input 4
%108 = OpCompositeConstruct %mat4v2half %104 %105 %106 %107
- %109 = OpCompositeExtract %int %input 5
+ %109 = OpCompositeExtract %int %tint_input 5
%110 = OpCompositeConstruct %S %103 %108 %109
OpReturnValue %110
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
index f08a482..439896f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -30,10 +30,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -153,7 +153,7 @@
%79 = OpAccessChain %_ptr_Function_Outer %61 %73
%81 = OpAccessChain %_ptr_Function_Outer_std140 %59 %73
%83 = OpLoad %Outer_std140 %81 None
- %84 = OpFunctionCall %Outer %convert_Outer %83
+ %84 = OpFunctionCall %Outer %tint_convert_Outer %83
OpStore %79 %84 None
OpBranch %70
%70 = OpLabel
@@ -162,7 +162,7 @@
%72 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %61 None
%87 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %87
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %87
%89 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %90 %89
OpBranch %95
@@ -182,7 +182,7 @@
%105 = OpAccessChain %_ptr_Function_Inner %92 %100
%107 = OpAccessChain %_ptr_Function_Inner_std140 %90 %100
%109 = OpLoad %Inner_std140 %107 None
- %110 = OpFunctionCall %Inner %convert_Inner %109
+ %110 = OpFunctionCall %Inner %tint_convert_Inner %109
OpStore %105 %110 None
OpBranch %97
%97 = OpLabel
@@ -191,28 +191,28 @@
%99 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %92 None
%113 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %113
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %113
%115 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %float %l_a_i_a_i_m_i %115
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %118
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %118
+ %tint_input = OpFunctionParameter %Inner_std140
%119 = OpLabel
- %120 = OpCompositeExtract %v2float %input 0
- %121 = OpCompositeExtract %v2float %input 1
- %122 = OpCompositeExtract %v2float %input 2
- %123 = OpCompositeExtract %v2float %input 3
+ %120 = OpCompositeExtract %v2float %tint_input 0
+ %121 = OpCompositeExtract %v2float %tint_input 1
+ %122 = OpCompositeExtract %v2float %tint_input 2
+ %123 = OpCompositeExtract %v2float %tint_input 3
%124 = OpCompositeConstruct %mat4v2float %120 %121 %122 %123
%125 = OpCompositeConstruct %Inner %124
OpReturnValue %125
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %127
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %127
+%tint_input_0 = OpFunctionParameter %Outer_std140
%128 = OpLabel
%130 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%131 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %94
- %129 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %129 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %130 %129
OpBranch %132
%132 = OpLabel
@@ -231,7 +231,7 @@
%142 = OpAccessChain %_ptr_Function_Inner %131 %137
%143 = OpAccessChain %_ptr_Function_Inner_std140 %130 %137
%144 = OpLoad %Inner_std140 %143 None
- %145 = OpFunctionCall %Inner %convert_Inner %144
+ %145 = OpFunctionCall %Inner %tint_convert_Inner %144
OpStore %142 %145 None
OpBranch %134
%134 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..8b195ef 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,92 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ vec2 m_col0;
+ vec2 m_col1;
+ vec2 m_col2;
+ vec2 m_col3;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ mat4x2 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(mat4x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat4x2 v_4 = mat4x2(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1, v.tint_symbol[3].a[2].m_col2, v.tint_symbol[3].a[2].m_col3);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))))), Outer(Inner[4](Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))))), Outer(Inner[4](Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))))), Outer(Inner[4](Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))), Inner(mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ mat4x2 l_a_3_a_2_m = v_4;
+ vec2 l_a_3_a_2_m_1 = v_4[1];
+ float l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.spvasm
index edea5bc..3393aab 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/static_index_via_ptr.wgsl.expected.spvasm
@@ -28,10 +28,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -132,7 +132,7 @@
%64 = OpAccessChain %_ptr_Function_Outer %46 %58
%66 = OpAccessChain %_ptr_Function_Outer_std140 %44 %58
%68 = OpLoad %Outer_std140 %66 None
- %69 = OpFunctionCall %Outer %convert_Outer %68
+ %69 = OpFunctionCall %Outer %tint_convert_Outer %68
OpStore %64 %69 None
OpBranch %55
%55 = OpLabel
@@ -141,7 +141,7 @@
%57 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %46 None
%72 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %72
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %72
%74 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %75 %74
OpBranch %80
@@ -161,7 +161,7 @@
%90 = OpAccessChain %_ptr_Function_Inner %77 %85
%92 = OpAccessChain %_ptr_Function_Inner_std140 %75 %85
%94 = OpLoad %Inner_std140 %92 None
- %95 = OpFunctionCall %Inner %convert_Inner %94
+ %95 = OpFunctionCall %Inner %tint_convert_Inner %94
OpStore %90 %95 None
OpBranch %82
%82 = OpLabel
@@ -170,27 +170,27 @@
%84 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %77 None
%98 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %98
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %98
%l_a_3_a_2_m_1_0 = OpCompositeExtract %float %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %102
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %102
+ %tint_input = OpFunctionParameter %Inner_std140
%103 = OpLabel
- %104 = OpCompositeExtract %v2float %input 0
- %105 = OpCompositeExtract %v2float %input 1
- %106 = OpCompositeExtract %v2float %input 2
- %107 = OpCompositeExtract %v2float %input 3
+ %104 = OpCompositeExtract %v2float %tint_input 0
+ %105 = OpCompositeExtract %v2float %tint_input 1
+ %106 = OpCompositeExtract %v2float %tint_input 2
+ %107 = OpCompositeExtract %v2float %tint_input 3
%108 = OpCompositeConstruct %mat4v2float %104 %105 %106 %107
%109 = OpCompositeConstruct %Inner %108
OpReturnValue %109
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %111
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %111
+%tint_input_0 = OpFunctionParameter %Outer_std140
%112 = OpLabel
%114 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%115 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %79
- %113 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %113 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %114 %113
OpBranch %116
%116 = OpLabel
@@ -209,7 +209,7 @@
%126 = OpAccessChain %_ptr_Function_Inner %115 %121
%127 = OpAccessChain %_ptr_Function_Inner_std140 %114 %121
%128 = OpLoad %Inner_std140 %127 None
- %129 = OpFunctionCall %Inner %convert_Inner %128
+ %129 = OpFunctionCall %Inner %tint_convert_Inner %128
OpStore %126 %129 None
OpBranch %118
%118 = OpLabel
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 a381b84..aed4bd2 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,15 +1,21 @@
#version 310 es
-struct S {
+struct S_std140 {
int before;
- mat4x2 m;
+ vec2 m_col0;
+ vec2 m_col1;
+ vec2 m_col2;
+ vec2 m_col3;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ mat2x4 t = transpose(mat4x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3));
+ float l = length(v.tint_symbol[0].m_col1.yx);
+ float a = abs(v.tint_symbol[0].m_col1.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 7065011..1f87dd6 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,12 +1,24 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec2 m_col0;
+ vec2 m_col1;
+ vec2 m_col2;
+ vec2 m_col3;
+ int after;
+};
+
struct S {
int before;
mat4x2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -17,11 +29,31 @@
}
void e(float f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat4x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(mat4x2(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1, v_1.tint_symbol[2].m_col2, v_1.tint_symbol[2].m_col3));
+ d(v_1.tint_symbol[0].m_col1.yx);
+ e(v_1.tint_symbol[0].m_col1.yx[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.spvasm
index 612f290..4fae8a7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_fn.wgsl.expected.spvasm
@@ -31,8 +31,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -136,7 +136,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -147,7 +147,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v2float %74 None
@@ -170,16 +170,16 @@
%96 = OpFunctionCall %void %e %95
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %98
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %98
+ %tint_input = OpFunctionParameter %S_std140
%99 = OpLabel
- %100 = OpCompositeExtract %int %input 0
- %101 = OpCompositeExtract %v2float %input 1
- %102 = OpCompositeExtract %v2float %input 2
- %103 = OpCompositeExtract %v2float %input 3
- %104 = OpCompositeExtract %v2float %input 4
+ %100 = OpCompositeExtract %int %tint_input 0
+ %101 = OpCompositeExtract %v2float %tint_input 1
+ %102 = OpCompositeExtract %v2float %tint_input 2
+ %103 = OpCompositeExtract %v2float %tint_input 3
+ %104 = OpCompositeExtract %v2float %tint_input 4
%105 = OpCompositeConstruct %mat4v2float %101 %102 %103 %104
- %106 = OpCompositeExtract %int %input 5
+ %106 = OpCompositeExtract %int %tint_input 5
%107 = OpCompositeConstruct %S %100 %105 %106
OpReturnValue %107
OpFunctionEnd
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 df7d465..9e56753 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,17 +1,49 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec2 m_col0;
+ vec2 m_col1;
+ vec2 m_col2;
+ vec2 m_col3;
+ int after;
+};
+
struct S {
int before;
mat4x2 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat4x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = mat4x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3);
+ p[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.spvasm
index f4a805f..529ce90 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_private.wgsl.expected.spvasm
@@ -22,8 +22,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -104,7 +104,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -116,7 +116,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat4v2float %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %int_2 %uint_1
@@ -136,16 +136,16 @@
OpStore %72 %77 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %79
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %79
+ %tint_input = OpFunctionParameter %S_std140
%80 = OpLabel
- %81 = OpCompositeExtract %int %input 0
- %82 = OpCompositeExtract %v2float %input 1
- %83 = OpCompositeExtract %v2float %input 2
- %84 = OpCompositeExtract %v2float %input 3
- %85 = OpCompositeExtract %v2float %input 4
+ %81 = OpCompositeExtract %int %tint_input 0
+ %82 = OpCompositeExtract %v2float %tint_input 1
+ %83 = OpCompositeExtract %v2float %tint_input 2
+ %84 = OpCompositeExtract %v2float %tint_input 3
+ %85 = OpCompositeExtract %v2float %tint_input 4
%86 = OpCompositeConstruct %mat4v2float %82 %83 %84 %85
- %87 = OpCompositeExtract %int %input 5
+ %87 = OpCompositeExtract %int %tint_input 5
%88 = OpCompositeConstruct %S %81 %86 %87
OpReturnValue %88
OpFunctionEnd
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 e5cd212..2259d64 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,13 +1,31 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec2 m_col0;
+ vec2 m_col1;
+ vec2 m_col2;
+ vec2 m_col3;
+ int after;
+};
+
struct S {
int before;
mat4x2 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat4x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -15,16 +33,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -32,8 +50,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ v_1.tint_symbol_2[3].m = mat4x2(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3);
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.yx;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.spvasm
index e9387c5..6de5af8 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.spvasm
@@ -28,8 +28,8 @@
OpName %tint_store_and_preserve_padding_0 "tint_store_and_preserve_padding"
OpName %target_indices "target_indices"
OpName %value_param_0 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -120,7 +120,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -131,7 +131,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -199,16 +199,16 @@
OpStore %112 %113 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %115
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %115
+ %tint_input = OpFunctionParameter %S_std140
%116 = OpLabel
- %117 = OpCompositeExtract %int %input 0
- %118 = OpCompositeExtract %v2float %input 1
- %119 = OpCompositeExtract %v2float %input 2
- %120 = OpCompositeExtract %v2float %input 3
- %121 = OpCompositeExtract %v2float %input 4
+ %117 = OpCompositeExtract %int %tint_input 0
+ %118 = OpCompositeExtract %v2float %tint_input 1
+ %119 = OpCompositeExtract %v2float %tint_input 2
+ %120 = OpCompositeExtract %v2float %tint_input 3
+ %121 = OpCompositeExtract %v2float %tint_input 4
%122 = OpCompositeConstruct %mat4v2float %118 %119 %120 %121
- %123 = OpCompositeExtract %int %input 5
+ %123 = OpCompositeExtract %int %tint_input 5
%124 = OpCompositeConstruct %S %117 %122 %123
OpReturnValue %124
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.spvasm
index ff317e4..698cbb4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_workgroup.wgsl.expected.spvasm
@@ -25,8 +25,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -136,7 +136,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -148,7 +148,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat4v2float %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v2float %1 %uint_0 %int_2 %uint_1
@@ -174,16 +174,16 @@
%99 = OpFunctionCall %void %f_inner %98
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %101
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %101
+ %tint_input = OpFunctionParameter %S_std140
%102 = OpLabel
- %103 = OpCompositeExtract %int %input 0
- %104 = OpCompositeExtract %v2float %input 1
- %105 = OpCompositeExtract %v2float %input 2
- %106 = OpCompositeExtract %v2float %input 3
- %107 = OpCompositeExtract %v2float %input 4
+ %103 = OpCompositeExtract %int %tint_input 0
+ %104 = OpCompositeExtract %v2float %tint_input 1
+ %105 = OpCompositeExtract %v2float %tint_input 2
+ %106 = OpCompositeExtract %v2float %tint_input 3
+ %107 = OpCompositeExtract %v2float %tint_input 4
%108 = OpCompositeConstruct %mat4v2float %104 %105 %106 %107
- %109 = OpCompositeExtract %int %input 5
+ %109 = OpCompositeExtract %int %tint_input 5
%110 = OpCompositeConstruct %S %103 %108 %109
OpReturnValue %110
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
index f2912a0..f714b4b 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -33,10 +33,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -156,7 +156,7 @@
%79 = OpAccessChain %_ptr_Function_Outer %61 %73
%81 = OpAccessChain %_ptr_Function_Outer_std140 %59 %73
%83 = OpLoad %Outer_std140 %81 None
- %84 = OpFunctionCall %Outer %convert_Outer %83
+ %84 = OpFunctionCall %Outer %tint_convert_Outer %83
OpStore %79 %84 None
OpBranch %70
%70 = OpLabel
@@ -165,7 +165,7 @@
%72 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %61 None
%87 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %87
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %87
%89 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %90 %89
OpBranch %95
@@ -185,7 +185,7 @@
%105 = OpAccessChain %_ptr_Function_Inner %92 %100
%107 = OpAccessChain %_ptr_Function_Inner_std140 %90 %100
%109 = OpLoad %Inner_std140 %107 None
- %110 = OpFunctionCall %Inner %convert_Inner %109
+ %110 = OpFunctionCall %Inner %tint_convert_Inner %109
OpStore %105 %110 None
OpBranch %97
%97 = OpLabel
@@ -194,28 +194,28 @@
%99 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %92 None
%113 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %113
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %113
%115 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %half %l_a_i_a_i_m_i %115
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %118
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %118
+ %tint_input = OpFunctionParameter %Inner_std140
%119 = OpLabel
- %120 = OpCompositeExtract %v3half %input 0
- %121 = OpCompositeExtract %v3half %input 1
- %122 = OpCompositeExtract %v3half %input 2
- %123 = OpCompositeExtract %v3half %input 3
+ %120 = OpCompositeExtract %v3half %tint_input 0
+ %121 = OpCompositeExtract %v3half %tint_input 1
+ %122 = OpCompositeExtract %v3half %tint_input 2
+ %123 = OpCompositeExtract %v3half %tint_input 3
%124 = OpCompositeConstruct %mat4v3half %120 %121 %122 %123
%125 = OpCompositeConstruct %Inner %124
OpReturnValue %125
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %127
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %127
+%tint_input_0 = OpFunctionParameter %Outer_std140
%128 = OpLabel
%130 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%131 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %94
- %129 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %129 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %130 %129
OpBranch %132
%132 = OpLabel
@@ -234,7 +234,7 @@
%142 = OpAccessChain %_ptr_Function_Inner %131 %137
%143 = OpAccessChain %_ptr_Function_Inner_std140 %130 %137
%144 = OpLoad %Inner_std140 %143 None
- %145 = OpFunctionCall %Inner %convert_Inner %144
+ %145 = OpFunctionCall %Inner %tint_convert_Inner %144
OpStore %142 %145 None
OpBranch %134
%134 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..ac914a7 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,93 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ f16vec3 m_col2;
+ f16vec3 m_col3;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ f16mat4x3 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(f16mat4x3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4x3 v_4 = f16mat4x3(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1, v.tint_symbol[3].a[2].m_col2, v.tint_symbol[3].a[2].m_col3);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))))), Outer(Inner[4](Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))))), Outer(Inner[4](Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))))), Outer(Inner[4](Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))), Inner(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ f16mat4x3 l_a_3_a_2_m = v_4;
+ f16vec3 l_a_3_a_2_m_1 = v_4[1];
+ float16_t l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.spvasm
index 774cf79..508d789 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/static_index_via_ptr.wgsl.expected.spvasm
@@ -31,10 +31,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -135,7 +135,7 @@
%64 = OpAccessChain %_ptr_Function_Outer %46 %58
%66 = OpAccessChain %_ptr_Function_Outer_std140 %44 %58
%68 = OpLoad %Outer_std140 %66 None
- %69 = OpFunctionCall %Outer %convert_Outer %68
+ %69 = OpFunctionCall %Outer %tint_convert_Outer %68
OpStore %64 %69 None
OpBranch %55
%55 = OpLabel
@@ -144,7 +144,7 @@
%57 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %46 None
%72 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %72
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %72
%74 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %75 %74
OpBranch %80
@@ -164,7 +164,7 @@
%90 = OpAccessChain %_ptr_Function_Inner %77 %85
%92 = OpAccessChain %_ptr_Function_Inner_std140 %75 %85
%94 = OpLoad %Inner_std140 %92 None
- %95 = OpFunctionCall %Inner %convert_Inner %94
+ %95 = OpFunctionCall %Inner %tint_convert_Inner %94
OpStore %90 %95 None
OpBranch %82
%82 = OpLabel
@@ -173,27 +173,27 @@
%84 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %77 None
%98 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %98
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %98
%l_a_3_a_2_m_1_0 = OpCompositeExtract %half %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %102
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %102
+ %tint_input = OpFunctionParameter %Inner_std140
%103 = OpLabel
- %104 = OpCompositeExtract %v3half %input 0
- %105 = OpCompositeExtract %v3half %input 1
- %106 = OpCompositeExtract %v3half %input 2
- %107 = OpCompositeExtract %v3half %input 3
+ %104 = OpCompositeExtract %v3half %tint_input 0
+ %105 = OpCompositeExtract %v3half %tint_input 1
+ %106 = OpCompositeExtract %v3half %tint_input 2
+ %107 = OpCompositeExtract %v3half %tint_input 3
%108 = OpCompositeConstruct %mat4v3half %104 %105 %106 %107
%109 = OpCompositeConstruct %Inner %108
OpReturnValue %109
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %111
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %111
+%tint_input_0 = OpFunctionParameter %Outer_std140
%112 = OpLabel
%114 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%115 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %79
- %113 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %113 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %114 %113
OpBranch %116
%116 = OpLabel
@@ -212,7 +212,7 @@
%126 = OpAccessChain %_ptr_Function_Inner %115 %121
%127 = OpAccessChain %_ptr_Function_Inner_std140 %114 %121
%128 = OpLoad %Inner_std140 %127 None
- %129 = OpFunctionCall %Inner %convert_Inner %128
+ %129 = OpFunctionCall %Inner %tint_convert_Inner %128
OpStore %126 %129 None
OpBranch %118
%118 = OpLabel
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 48b474c..d9dacc8 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,16 +1,22 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
+struct S_std140 {
int before;
- f16mat4x3 m;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ f16vec3 m_col2;
+ f16vec3 m_col3;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ f16mat3x4 t = transpose(f16mat4x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3));
+ float16_t l = length(v.tint_symbol[0].m_col1.zxy);
+ float16_t a = abs(v.tint_symbol[0].m_col1.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 c8dbf05..7198a0f 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,13 +1,25 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ f16vec3 m_col2;
+ f16vec3 m_col3;
+ int after;
+};
+
struct S {
int before;
f16mat4x3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -18,11 +30,31 @@
}
void e(float16_t f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat4x3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(f16mat4x3(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1, v_1.tint_symbol[2].m_col2, v_1.tint_symbol[2].m_col3));
+ d(v_1.tint_symbol[0].m_col1.zxy);
+ e(v_1.tint_symbol[0].m_col1.zxy[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.spvasm
index fdd15d6..833111c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_fn.wgsl.expected.spvasm
@@ -34,8 +34,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -139,7 +139,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -150,7 +150,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v3half %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v3half %74 None
@@ -173,16 +173,16 @@
%96 = OpFunctionCall %void %e %95
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %98
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %98
+ %tint_input = OpFunctionParameter %S_std140
%99 = OpLabel
- %100 = OpCompositeExtract %int %input 0
- %101 = OpCompositeExtract %v3half %input 1
- %102 = OpCompositeExtract %v3half %input 2
- %103 = OpCompositeExtract %v3half %input 3
- %104 = OpCompositeExtract %v3half %input 4
+ %100 = OpCompositeExtract %int %tint_input 0
+ %101 = OpCompositeExtract %v3half %tint_input 1
+ %102 = OpCompositeExtract %v3half %tint_input 2
+ %103 = OpCompositeExtract %v3half %tint_input 3
+ %104 = OpCompositeExtract %v3half %tint_input 4
%105 = OpCompositeConstruct %mat4v3half %101 %102 %103 %104
- %106 = OpCompositeExtract %int %input 5
+ %106 = OpCompositeExtract %int %tint_input 5
%107 = OpCompositeConstruct %S %100 %105 %106
OpReturnValue %107
OpFunctionEnd
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 66231ff..3b8bd88 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,18 +1,50 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ f16vec3 m_col2;
+ f16vec3 m_col3;
+ int after;
+};
+
struct S {
int before;
f16mat4x3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat4x3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = f16mat4x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3);
+ p[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.spvasm
index 205a9db..f8bce8d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_private.wgsl.expected.spvasm
@@ -25,8 +25,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -107,7 +107,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -119,7 +119,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat4v3half %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v3half %1 %uint_0 %int_2 %uint_1
@@ -139,16 +139,16 @@
OpStore %72 %77 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %79
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %79
+ %tint_input = OpFunctionParameter %S_std140
%80 = OpLabel
- %81 = OpCompositeExtract %int %input 0
- %82 = OpCompositeExtract %v3half %input 1
- %83 = OpCompositeExtract %v3half %input 2
- %84 = OpCompositeExtract %v3half %input 3
- %85 = OpCompositeExtract %v3half %input 4
+ %81 = OpCompositeExtract %int %tint_input 0
+ %82 = OpCompositeExtract %v3half %tint_input 1
+ %83 = OpCompositeExtract %v3half %tint_input 2
+ %84 = OpCompositeExtract %v3half %tint_input 3
+ %85 = OpCompositeExtract %v3half %tint_input 4
%86 = OpCompositeConstruct %mat4v3half %82 %83 %84 %85
- %87 = OpCompositeExtract %int %input 5
+ %87 = OpCompositeExtract %int %tint_input 5
%88 = OpCompositeConstruct %S %81 %86 %87
OpReturnValue %88
OpFunctionEnd
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 4b62860..45f5521 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,14 +1,32 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec3 m_col0;
+ f16vec3 m_col1;
+ f16vec3 m_col2;
+ f16vec3 m_col3;
+ int after;
+};
+
struct S {
int before;
f16mat4x3 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat4x3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
void tint_store_and_preserve_padding_2(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -22,16 +40,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -39,8 +57,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ tint_store_and_preserve_padding_2(v_1.tint_symbol_2[3].m, f16mat4x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3));
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.spvasm
index 65bbb82..004b1c1 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.spvasm
@@ -34,8 +34,8 @@
OpName %tint_store_and_preserve_padding_1 "tint_store_and_preserve_padding"
OpName %target_indices_0 "target_indices"
OpName %value_param_1 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -126,7 +126,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -137,7 +137,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -225,16 +225,16 @@
OpStore %128 %129 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %131
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %131
+ %tint_input = OpFunctionParameter %S_std140
%132 = OpLabel
- %133 = OpCompositeExtract %int %input 0
- %134 = OpCompositeExtract %v3half %input 1
- %135 = OpCompositeExtract %v3half %input 2
- %136 = OpCompositeExtract %v3half %input 3
- %137 = OpCompositeExtract %v3half %input 4
+ %133 = OpCompositeExtract %int %tint_input 0
+ %134 = OpCompositeExtract %v3half %tint_input 1
+ %135 = OpCompositeExtract %v3half %tint_input 2
+ %136 = OpCompositeExtract %v3half %tint_input 3
+ %137 = OpCompositeExtract %v3half %tint_input 4
%138 = OpCompositeConstruct %mat4v3half %134 %135 %136 %137
- %139 = OpCompositeExtract %int %input 5
+ %139 = OpCompositeExtract %int %tint_input 5
%140 = OpCompositeConstruct %S %133 %138 %139
OpReturnValue %140
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_workgroup.wgsl.expected.spvasm
index 6b38a02..3cfaada 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_workgroup.wgsl.expected.spvasm
@@ -28,8 +28,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -139,7 +139,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -151,7 +151,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat4v3half %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v3half %1 %uint_0 %int_2 %uint_1
@@ -177,16 +177,16 @@
%99 = OpFunctionCall %void %f_inner %98
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %101
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %101
+ %tint_input = OpFunctionParameter %S_std140
%102 = OpLabel
- %103 = OpCompositeExtract %int %input 0
- %104 = OpCompositeExtract %v3half %input 1
- %105 = OpCompositeExtract %v3half %input 2
- %106 = OpCompositeExtract %v3half %input 3
- %107 = OpCompositeExtract %v3half %input 4
+ %103 = OpCompositeExtract %int %tint_input 0
+ %104 = OpCompositeExtract %v3half %tint_input 1
+ %105 = OpCompositeExtract %v3half %tint_input 2
+ %106 = OpCompositeExtract %v3half %tint_input 3
+ %107 = OpCompositeExtract %v3half %tint_input 4
%108 = OpCompositeConstruct %mat4v3half %104 %105 %106 %107
- %109 = OpCompositeExtract %int %input 5
+ %109 = OpCompositeExtract %int %tint_input 5
%110 = OpCompositeConstruct %S %103 %108 %109
OpReturnValue %110
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
index d55da26..51d787d 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -30,10 +30,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 16
OpMemberDecorate %Inner_std140 2 Offset 32
@@ -153,7 +153,7 @@
%79 = OpAccessChain %_ptr_Function_Outer %61 %73
%81 = OpAccessChain %_ptr_Function_Outer_std140 %59 %73
%83 = OpLoad %Outer_std140 %81 None
- %84 = OpFunctionCall %Outer %convert_Outer %83
+ %84 = OpFunctionCall %Outer %tint_convert_Outer %83
OpStore %79 %84 None
OpBranch %70
%70 = OpLabel
@@ -162,7 +162,7 @@
%72 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %61 None
%87 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %87
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %87
%89 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %90 %89
OpBranch %95
@@ -182,7 +182,7 @@
%105 = OpAccessChain %_ptr_Function_Inner %92 %100
%107 = OpAccessChain %_ptr_Function_Inner_std140 %90 %100
%109 = OpLoad %Inner_std140 %107 None
- %110 = OpFunctionCall %Inner %convert_Inner %109
+ %110 = OpFunctionCall %Inner %tint_convert_Inner %109
OpStore %105 %110 None
OpBranch %97
%97 = OpLabel
@@ -191,28 +191,28 @@
%99 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %92 None
%113 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %113
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %113
%115 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %float %l_a_i_a_i_m_i %115
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %118
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %118
+ %tint_input = OpFunctionParameter %Inner_std140
%119 = OpLabel
- %120 = OpCompositeExtract %v3float %input 0
- %121 = OpCompositeExtract %v3float %input 1
- %122 = OpCompositeExtract %v3float %input 2
- %123 = OpCompositeExtract %v3float %input 3
+ %120 = OpCompositeExtract %v3float %tint_input 0
+ %121 = OpCompositeExtract %v3float %tint_input 1
+ %122 = OpCompositeExtract %v3float %tint_input 2
+ %123 = OpCompositeExtract %v3float %tint_input 3
%124 = OpCompositeConstruct %mat4v3float %120 %121 %122 %123
%125 = OpCompositeConstruct %Inner %124
OpReturnValue %125
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %127
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %127
+%tint_input_0 = OpFunctionParameter %Outer_std140
%128 = OpLabel
%130 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%131 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %94
- %129 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %129 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %130 %129
OpBranch %132
%132 = OpLabel
@@ -231,7 +231,7 @@
%142 = OpAccessChain %_ptr_Function_Inner %131 %137
%143 = OpAccessChain %_ptr_Function_Inner_std140 %130 %137
%144 = OpLoad %Inner_std140 %143 None
- %145 = OpFunctionCall %Inner %convert_Inner %144
+ %145 = OpFunctionCall %Inner %tint_convert_Inner %144
OpStore %142 %145 None
OpBranch %134
%134 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..3a83152 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,92 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ vec3 m_col0;
+ vec3 m_col1;
+ vec3 m_col2;
+ vec3 m_col3;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ mat4x3 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(mat4x3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat4x3 v_4 = mat4x3(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1, v.tint_symbol[3].a[2].m_col2, v.tint_symbol[3].a[2].m_col3);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))))), Outer(Inner[4](Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))))), Outer(Inner[4](Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))))), Outer(Inner[4](Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))), Inner(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ mat4x3 l_a_3_a_2_m = v_4;
+ vec3 l_a_3_a_2_m_1 = v_4[1];
+ float l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.spvasm
index d564524..0bff1f9 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/static_index_via_ptr.wgsl.expected.spvasm
@@ -28,10 +28,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 16
OpMemberDecorate %Inner_std140 2 Offset 32
@@ -132,7 +132,7 @@
%64 = OpAccessChain %_ptr_Function_Outer %46 %58
%66 = OpAccessChain %_ptr_Function_Outer_std140 %44 %58
%68 = OpLoad %Outer_std140 %66 None
- %69 = OpFunctionCall %Outer %convert_Outer %68
+ %69 = OpFunctionCall %Outer %tint_convert_Outer %68
OpStore %64 %69 None
OpBranch %55
%55 = OpLabel
@@ -141,7 +141,7 @@
%57 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %46 None
%72 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %72
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %72
%74 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %75 %74
OpBranch %80
@@ -161,7 +161,7 @@
%90 = OpAccessChain %_ptr_Function_Inner %77 %85
%92 = OpAccessChain %_ptr_Function_Inner_std140 %75 %85
%94 = OpLoad %Inner_std140 %92 None
- %95 = OpFunctionCall %Inner %convert_Inner %94
+ %95 = OpFunctionCall %Inner %tint_convert_Inner %94
OpStore %90 %95 None
OpBranch %82
%82 = OpLabel
@@ -170,27 +170,27 @@
%84 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %77 None
%98 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %98
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %98
%l_a_3_a_2_m_1_0 = OpCompositeExtract %float %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %102
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %102
+ %tint_input = OpFunctionParameter %Inner_std140
%103 = OpLabel
- %104 = OpCompositeExtract %v3float %input 0
- %105 = OpCompositeExtract %v3float %input 1
- %106 = OpCompositeExtract %v3float %input 2
- %107 = OpCompositeExtract %v3float %input 3
+ %104 = OpCompositeExtract %v3float %tint_input 0
+ %105 = OpCompositeExtract %v3float %tint_input 1
+ %106 = OpCompositeExtract %v3float %tint_input 2
+ %107 = OpCompositeExtract %v3float %tint_input 3
%108 = OpCompositeConstruct %mat4v3float %104 %105 %106 %107
%109 = OpCompositeConstruct %Inner %108
OpReturnValue %109
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %111
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %111
+%tint_input_0 = OpFunctionParameter %Outer_std140
%112 = OpLabel
%114 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%115 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %79
- %113 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %113 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %114 %113
OpBranch %116
%116 = OpLabel
@@ -209,7 +209,7 @@
%126 = OpAccessChain %_ptr_Function_Inner %115 %121
%127 = OpAccessChain %_ptr_Function_Inner_std140 %114 %121
%128 = OpLoad %Inner_std140 %127 None
- %129 = OpFunctionCall %Inner %convert_Inner %128
+ %129 = OpFunctionCall %Inner %tint_convert_Inner %128
OpStore %126 %129 None
OpBranch %118
%118 = OpLabel
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 64a55a7..2793e11 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,15 +1,21 @@
#version 310 es
-struct S {
+struct S_std140 {
int before;
- mat4x3 m;
+ vec3 m_col0;
+ vec3 m_col1;
+ vec3 m_col2;
+ vec3 m_col3;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ mat3x4 t = transpose(mat4x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3));
+ float l = length(v.tint_symbol[0].m_col1.zxy);
+ float a = abs(v.tint_symbol[0].m_col1.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 e94b2d4..52f23a0 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,12 +1,24 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec3 m_col0;
+ vec3 m_col1;
+ vec3 m_col2;
+ vec3 m_col3;
+ int after;
+};
+
struct S {
int before;
mat4x3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -17,11 +29,31 @@
}
void e(float f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat4x3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(mat4x3(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1, v_1.tint_symbol[2].m_col2, v_1.tint_symbol[2].m_col3));
+ d(v_1.tint_symbol[0].m_col1.zxy);
+ e(v_1.tint_symbol[0].m_col1.zxy[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.spvasm
index f361d9c..065091c 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_fn.wgsl.expected.spvasm
@@ -31,8 +31,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -136,7 +136,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -147,7 +147,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v3float %74 None
@@ -170,16 +170,16 @@
%96 = OpFunctionCall %void %e %95
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %98
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %98
+ %tint_input = OpFunctionParameter %S_std140
%99 = OpLabel
- %100 = OpCompositeExtract %int %input 0
- %101 = OpCompositeExtract %v3float %input 1
- %102 = OpCompositeExtract %v3float %input 2
- %103 = OpCompositeExtract %v3float %input 3
- %104 = OpCompositeExtract %v3float %input 4
+ %100 = OpCompositeExtract %int %tint_input 0
+ %101 = OpCompositeExtract %v3float %tint_input 1
+ %102 = OpCompositeExtract %v3float %tint_input 2
+ %103 = OpCompositeExtract %v3float %tint_input 3
+ %104 = OpCompositeExtract %v3float %tint_input 4
%105 = OpCompositeConstruct %mat4v3float %101 %102 %103 %104
- %106 = OpCompositeExtract %int %input 5
+ %106 = OpCompositeExtract %int %tint_input 5
%107 = OpCompositeConstruct %S %100 %105 %106
OpReturnValue %107
OpFunctionEnd
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 c40f3bf..faf65d6 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,17 +1,49 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec3 m_col0;
+ vec3 m_col1;
+ vec3 m_col2;
+ vec3 m_col3;
+ int after;
+};
+
struct S {
int before;
mat4x3 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat4x3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = mat4x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3);
+ p[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.spvasm
index fc0a7b9..1c639dd 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_private.wgsl.expected.spvasm
@@ -22,8 +22,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -104,7 +104,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -116,7 +116,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat4v3float %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %int_2 %uint_1
@@ -136,16 +136,16 @@
OpStore %72 %77 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %79
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %79
+ %tint_input = OpFunctionParameter %S_std140
%80 = OpLabel
- %81 = OpCompositeExtract %int %input 0
- %82 = OpCompositeExtract %v3float %input 1
- %83 = OpCompositeExtract %v3float %input 2
- %84 = OpCompositeExtract %v3float %input 3
- %85 = OpCompositeExtract %v3float %input 4
+ %81 = OpCompositeExtract %int %tint_input 0
+ %82 = OpCompositeExtract %v3float %tint_input 1
+ %83 = OpCompositeExtract %v3float %tint_input 2
+ %84 = OpCompositeExtract %v3float %tint_input 3
+ %85 = OpCompositeExtract %v3float %tint_input 4
%86 = OpCompositeConstruct %mat4v3float %82 %83 %84 %85
- %87 = OpCompositeExtract %int %input 5
+ %87 = OpCompositeExtract %int %tint_input 5
%88 = OpCompositeConstruct %S %81 %86 %87
OpReturnValue %88
OpFunctionEnd
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 ef3ce1a..b91c5e2 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,13 +1,31 @@
#version 310 es
+struct S_std140 {
+ int before;
+ vec3 m_col0;
+ vec3 m_col1;
+ vec3 m_col2;
+ vec3 m_col3;
+ int after;
+};
+
struct S {
int before;
mat4x3 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, mat4x3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
void tint_store_and_preserve_padding_2(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -21,16 +39,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -38,8 +56,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ tint_store_and_preserve_padding_2(v_1.tint_symbol_2[3].m, mat4x3(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3));
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.zxy;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.spvasm
index 9489676..998e04e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.spvasm
@@ -31,8 +31,8 @@
OpName %tint_store_and_preserve_padding_1 "tint_store_and_preserve_padding"
OpName %target_indices_0 "target_indices"
OpName %value_param_1 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -123,7 +123,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -134,7 +134,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -222,16 +222,16 @@
OpStore %128 %129 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %131
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %131
+ %tint_input = OpFunctionParameter %S_std140
%132 = OpLabel
- %133 = OpCompositeExtract %int %input 0
- %134 = OpCompositeExtract %v3float %input 1
- %135 = OpCompositeExtract %v3float %input 2
- %136 = OpCompositeExtract %v3float %input 3
- %137 = OpCompositeExtract %v3float %input 4
+ %133 = OpCompositeExtract %int %tint_input 0
+ %134 = OpCompositeExtract %v3float %tint_input 1
+ %135 = OpCompositeExtract %v3float %tint_input 2
+ %136 = OpCompositeExtract %v3float %tint_input 3
+ %137 = OpCompositeExtract %v3float %tint_input 4
%138 = OpCompositeConstruct %mat4v3float %134 %135 %136 %137
- %139 = OpCompositeExtract %int %input 5
+ %139 = OpCompositeExtract %int %tint_input 5
%140 = OpCompositeConstruct %S %133 %138 %139
OpReturnValue %140
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.spvasm
index 0300422..f74d8cc8 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_workgroup.wgsl.expected.spvasm
@@ -25,8 +25,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 16
OpMemberDecorate %S_std140 2 Offset 32
@@ -136,7 +136,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -148,7 +148,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat4v3float %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v3float %1 %uint_0 %int_2 %uint_1
@@ -174,16 +174,16 @@
%99 = OpFunctionCall %void %f_inner %98
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %101
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %101
+ %tint_input = OpFunctionParameter %S_std140
%102 = OpLabel
- %103 = OpCompositeExtract %int %input 0
- %104 = OpCompositeExtract %v3float %input 1
- %105 = OpCompositeExtract %v3float %input 2
- %106 = OpCompositeExtract %v3float %input 3
- %107 = OpCompositeExtract %v3float %input 4
+ %103 = OpCompositeExtract %int %tint_input 0
+ %104 = OpCompositeExtract %v3float %tint_input 1
+ %105 = OpCompositeExtract %v3float %tint_input 2
+ %106 = OpCompositeExtract %v3float %tint_input 3
+ %107 = OpCompositeExtract %v3float %tint_input 4
%108 = OpCompositeConstruct %mat4v3float %104 %105 %106 %107
- %109 = OpCompositeExtract %int %input 5
+ %109 = OpCompositeExtract %int %tint_input 5
%110 = OpCompositeConstruct %S %103 %108 %109
OpReturnValue %110
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
index 465d290..33c71ab 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.spvasm
@@ -33,10 +33,10 @@
OpName %l_a_i_a_i_m "l_a_i_a_i_m"
OpName %l_a_i_a_i_m_i "l_a_i_a_i_m_i"
OpName %l_a_i_a_i_m_i_i "l_a_i_a_i_m_i_i"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -156,7 +156,7 @@
%79 = OpAccessChain %_ptr_Function_Outer %61 %73
%81 = OpAccessChain %_ptr_Function_Outer_std140 %59 %73
%83 = OpLoad %Outer_std140 %81 None
- %84 = OpFunctionCall %Outer %convert_Outer %83
+ %84 = OpFunctionCall %Outer %tint_convert_Outer %83
OpStore %79 %84 None
OpBranch %70
%70 = OpLabel
@@ -165,7 +165,7 @@
%72 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %61 None
%87 = OpLoad %Outer_std140 %31 None
- %l_a_i = OpFunctionCall %Outer %convert_Outer %87
+ %l_a_i = OpFunctionCall %Outer %tint_convert_Outer %87
%89 = OpLoad %_arr_Inner_std140_uint_4 %33 None
OpStore %90 %89
OpBranch %95
@@ -185,7 +185,7 @@
%105 = OpAccessChain %_ptr_Function_Inner %92 %100
%107 = OpAccessChain %_ptr_Function_Inner_std140 %90 %100
%109 = OpLoad %Inner_std140 %107 None
- %110 = OpFunctionCall %Inner %convert_Inner %109
+ %110 = OpFunctionCall %Inner %tint_convert_Inner %109
OpStore %105 %110 None
OpBranch %97
%97 = OpLabel
@@ -194,28 +194,28 @@
%99 = OpLabel
%l_a_i_a = OpLoad %_arr_Inner_uint_4 %92 None
%113 = OpLoad %Inner_std140 %36 None
- %l_a_i_a_i = OpFunctionCall %Inner %convert_Inner %113
+ %l_a_i_a_i = OpFunctionCall %Inner %tint_convert_Inner %113
%115 = OpFunctionCall %int %i
%l_a_i_a_i_m_i_i = OpVectorExtractDynamic %half %l_a_i_a_i_m_i %115
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %118
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %118
+ %tint_input = OpFunctionParameter %Inner_std140
%119 = OpLabel
- %120 = OpCompositeExtract %v4half %input 0
- %121 = OpCompositeExtract %v4half %input 1
- %122 = OpCompositeExtract %v4half %input 2
- %123 = OpCompositeExtract %v4half %input 3
+ %120 = OpCompositeExtract %v4half %tint_input 0
+ %121 = OpCompositeExtract %v4half %tint_input 1
+ %122 = OpCompositeExtract %v4half %tint_input 2
+ %123 = OpCompositeExtract %v4half %tint_input 3
%124 = OpCompositeConstruct %mat4v4half %120 %121 %122 %123
%125 = OpCompositeConstruct %Inner %124
OpReturnValue %125
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %127
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %127
+%tint_input_0 = OpFunctionParameter %Outer_std140
%128 = OpLabel
%130 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%131 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %94
- %129 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %129 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %130 %129
OpBranch %132
%132 = OpLabel
@@ -234,7 +234,7 @@
%142 = OpAccessChain %_ptr_Function_Inner %131 %137
%143 = OpAccessChain %_ptr_Function_Inner_std140 %130 %137
%144 = OpLoad %Inner_std140 %143 None
- %145 = OpFunctionCall %Inner %convert_Inner %144
+ %145 = OpFunctionCall %Inner %tint_convert_Inner %144
OpStore %142 %145 None
OpBranch %134
%134 = OpLabel
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..1b6d4ba 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,93 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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 Inner_std140 {
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ f16vec4 m_col2;
+ f16vec4 m_col3;
+};
-tint executable returned error: signal: trace/BPT trap
+struct Outer_std140 {
+ Inner_std140 a[4];
+};
+
+struct Inner {
+ f16mat4 m;
+};
+
+struct Outer {
+ Inner a[4];
+};
+
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ Outer_std140 tint_symbol[4];
+} v;
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(f16mat4(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3));
+}
+Outer tint_convert_Outer(Outer_std140 tint_input) {
+ Inner v_1[4] = Inner[4](Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))));
+ {
+ uint v_2 = 0u;
+ v_2 = 0u;
+ while(true) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
+ break;
+ }
+ v_1[v_3] = tint_convert_Inner(tint_input.a[v_3]);
+ {
+ v_2 = (v_3 + 1u);
+ }
+ continue;
+ }
+ }
+ return Outer(v_1);
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4 v_4 = f16mat4(v.tint_symbol[3].a[2].m_col0, v.tint_symbol[3].a[2].m_col1, v.tint_symbol[3].a[2].m_col2, v.tint_symbol[3].a[2].m_col3);
+ Outer_std140 v_5[4] = v.tint_symbol;
+ Outer v_6[4] = Outer[4](Outer(Inner[4](Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))))), Outer(Inner[4](Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))))), Outer(Inner[4](Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))))), Outer(Inner[4](Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))))));
+ {
+ uint v_7 = 0u;
+ v_7 = 0u;
+ while(true) {
+ uint v_8 = v_7;
+ if ((v_8 >= 4u)) {
+ break;
+ }
+ v_6[v_8] = tint_convert_Outer(v_5[v_8]);
+ {
+ v_7 = (v_8 + 1u);
+ }
+ continue;
+ }
+ }
+ Outer l_a[4] = v_6;
+ Outer l_a_3 = tint_convert_Outer(v.tint_symbol[3]);
+ Inner_std140 v_9[4] = v.tint_symbol[3].a;
+ Inner v_10[4] = Inner[4](Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))), Inner(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf))));
+ {
+ uint v_11 = 0u;
+ v_11 = 0u;
+ while(true) {
+ uint v_12 = v_11;
+ if ((v_12 >= 4u)) {
+ break;
+ }
+ v_10[v_12] = tint_convert_Inner(v_9[v_12]);
+ {
+ v_11 = (v_12 + 1u);
+ }
+ continue;
+ }
+ }
+ Inner l_a_3_a[4] = v_10;
+ Inner l_a_3_a_2 = tint_convert_Inner(v.tint_symbol[3].a[2]);
+ f16mat4 l_a_3_a_2_m = v_4;
+ f16vec4 l_a_3_a_2_m_1 = v_4[1];
+ float16_t l_a_3_a_2_m_1_0 = v_4[1][0];
+}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.spvasm
index 63af5c5..b8ac9337 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/static_index_via_ptr.wgsl.expected.spvasm
@@ -31,10 +31,10 @@
OpName %l_a_3_a_2_m "l_a_3_a_2_m"
OpName %l_a_3_a_2_m_1 "l_a_3_a_2_m_1"
OpName %l_a_3_a_2_m_1_0 "l_a_3_a_2_m_1_0"
- OpName %convert_Inner "convert_Inner"
- OpName %input "input"
- OpName %convert_Outer "convert_Outer"
- OpName %input_0 "input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Outer "tint_convert_Outer"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -135,7 +135,7 @@
%64 = OpAccessChain %_ptr_Function_Outer %46 %58
%66 = OpAccessChain %_ptr_Function_Outer_std140 %44 %58
%68 = OpLoad %Outer_std140 %66 None
- %69 = OpFunctionCall %Outer %convert_Outer %68
+ %69 = OpFunctionCall %Outer %tint_convert_Outer %68
OpStore %64 %69 None
OpBranch %55
%55 = OpLabel
@@ -144,7 +144,7 @@
%57 = OpLabel
%l_a = OpLoad %_arr_Outer_uint_4 %46 None
%72 = OpLoad %Outer_std140 %19 None
- %l_a_3 = OpFunctionCall %Outer %convert_Outer %72
+ %l_a_3 = OpFunctionCall %Outer %tint_convert_Outer %72
%74 = OpLoad %_arr_Inner_std140_uint_4 %23 None
OpStore %75 %74
OpBranch %80
@@ -164,7 +164,7 @@
%90 = OpAccessChain %_ptr_Function_Inner %77 %85
%92 = OpAccessChain %_ptr_Function_Inner_std140 %75 %85
%94 = OpLoad %Inner_std140 %92 None
- %95 = OpFunctionCall %Inner %convert_Inner %94
+ %95 = OpFunctionCall %Inner %tint_convert_Inner %94
OpStore %90 %95 None
OpBranch %82
%82 = OpLabel
@@ -173,27 +173,27 @@
%84 = OpLabel
%l_a_3_a = OpLoad %_arr_Inner_uint_4 %77 None
%98 = OpLoad %Inner_std140 %25 None
- %l_a_3_a_2 = OpFunctionCall %Inner %convert_Inner %98
+ %l_a_3_a_2 = OpFunctionCall %Inner %tint_convert_Inner %98
%l_a_3_a_2_m_1_0 = OpCompositeExtract %half %l_a_3_a_2_m_1 0
OpReturn
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %102
- %input = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %102
+ %tint_input = OpFunctionParameter %Inner_std140
%103 = OpLabel
- %104 = OpCompositeExtract %v4half %input 0
- %105 = OpCompositeExtract %v4half %input 1
- %106 = OpCompositeExtract %v4half %input 2
- %107 = OpCompositeExtract %v4half %input 3
+ %104 = OpCompositeExtract %v4half %tint_input 0
+ %105 = OpCompositeExtract %v4half %tint_input 1
+ %106 = OpCompositeExtract %v4half %tint_input 2
+ %107 = OpCompositeExtract %v4half %tint_input 3
%108 = OpCompositeConstruct %mat4v4half %104 %105 %106 %107
%109 = OpCompositeConstruct %Inner %108
OpReturnValue %109
OpFunctionEnd
-%convert_Outer = OpFunction %Outer None %111
- %input_0 = OpFunctionParameter %Outer_std140
+%tint_convert_Outer = OpFunction %Outer None %111
+%tint_input_0 = OpFunctionParameter %Outer_std140
%112 = OpLabel
%114 = OpVariable %_ptr_Function__arr_Inner_std140_uint_4 Function
%115 = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %79
- %113 = OpCompositeExtract %_arr_Inner_std140_uint_4 %input_0 0
+ %113 = OpCompositeExtract %_arr_Inner_std140_uint_4 %tint_input_0 0
OpStore %114 %113
OpBranch %116
%116 = OpLabel
@@ -212,7 +212,7 @@
%126 = OpAccessChain %_ptr_Function_Inner %115 %121
%127 = OpAccessChain %_ptr_Function_Inner_std140 %114 %121
%128 = OpLoad %Inner_std140 %127 None
- %129 = OpFunctionCall %Inner %convert_Inner %128
+ %129 = OpFunctionCall %Inner %tint_convert_Inner %128
OpStore %126 %129 None
OpBranch %118
%118 = OpLabel
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 af96480..573de15 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,16 +1,22 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
+struct S_std140 {
int before;
- f16mat4 m;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ f16vec4 m_col2;
+ f16vec4 m_col3;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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]);
+ f16mat4 t = transpose(f16mat4(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3));
+ float16_t l = length(v.tint_symbol[0].m_col1.ywxz);
+ float16_t a = abs(v.tint_symbol[0].m_col1.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 96c867c..b11be9c 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,13 +1,25 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ f16vec4 m_col2;
+ f16vec4 m_col3;
+ int after;
+};
+
struct S {
int before;
f16mat4 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -18,11 +30,31 @@
}
void e(float16_t f) {
}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat4(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
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]);
+ S_std140 v_2[4] = v_1.tint_symbol;
+ S v_3[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));
+ {
+ uint v_4 = 0u;
+ v_4 = 0u;
+ while(true) {
+ uint v_5 = v_4;
+ if ((v_5 >= 4u)) {
+ break;
+ }
+ v_3[v_5] = tint_convert_S(v_2[v_5]);
+ {
+ v_4 = (v_5 + 1u);
+ }
+ continue;
+ }
+ }
+ a(v_3);
+ b(tint_convert_S(v_1.tint_symbol[2]));
+ c(f16mat4(v_1.tint_symbol[2].m_col0, v_1.tint_symbol[2].m_col1, v_1.tint_symbol[2].m_col2, v_1.tint_symbol[2].m_col3));
+ d(v_1.tint_symbol[0].m_col1.ywxz);
+ e(v_1.tint_symbol[0].m_col1.ywxz[0u]);
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.spvasm
index 0fde7fd..c5abd56 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_fn.wgsl.expected.spvasm
@@ -34,8 +34,8 @@
OpName %e "e"
OpName %f "f"
OpName %f_0 "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -139,7 +139,7 @@
%58 = OpAccessChain %_ptr_Function_S %44 %52
%60 = OpAccessChain %_ptr_Function_S_std140 %42 %52
%62 = OpLoad %S_std140 %60 None
- %63 = OpFunctionCall %S %convert_S %62
+ %63 = OpFunctionCall %S %tint_convert_S %62
OpStore %58 %63 None
OpBranch %49
%49 = OpLabel
@@ -150,7 +150,7 @@
%67 = OpFunctionCall %void %a %66
%68 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%71 = OpLoad %S_std140 %68 None
- %72 = OpFunctionCall %S %convert_S %71
+ %72 = OpFunctionCall %S %tint_convert_S %71
%73 = OpFunctionCall %void %b %72
%74 = OpAccessChain %_ptr_Uniform_v4half %1 %uint_0 %int_2 %uint_1
%76 = OpLoad %v4half %74 None
@@ -173,16 +173,16 @@
%96 = OpFunctionCall %void %e %95
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %98
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %98
+ %tint_input = OpFunctionParameter %S_std140
%99 = OpLabel
- %100 = OpCompositeExtract %int %input 0
- %101 = OpCompositeExtract %v4half %input 1
- %102 = OpCompositeExtract %v4half %input 2
- %103 = OpCompositeExtract %v4half %input 3
- %104 = OpCompositeExtract %v4half %input 4
+ %100 = OpCompositeExtract %int %tint_input 0
+ %101 = OpCompositeExtract %v4half %tint_input 1
+ %102 = OpCompositeExtract %v4half %tint_input 2
+ %103 = OpCompositeExtract %v4half %tint_input 3
+ %104 = OpCompositeExtract %v4half %tint_input 4
%105 = OpCompositeConstruct %mat4v4half %101 %102 %103 %104
- %106 = OpCompositeExtract %int %input 5
+ %106 = OpCompositeExtract %int %tint_input 5
%107 = OpCompositeConstruct %S %100 %105 %106
OpReturnValue %107
OpFunctionEnd
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 1060ac9..44190da 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,18 +1,50 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ f16vec4 m_col2;
+ f16vec4 m_col3;
+ int after;
+};
+
struct S {
int before;
f16mat4 m;
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
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));
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat4(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
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;
+ S_std140 v_1[4] = v.tint_symbol;
+ S v_2[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));
+ {
+ uint v_3 = 0u;
+ v_3 = 0u;
+ while(true) {
+ uint v_4 = v_3;
+ if ((v_4 >= 4u)) {
+ break;
+ }
+ v_2[v_4] = tint_convert_S(v_1[v_4]);
+ {
+ v_3 = (v_4 + 1u);
+ }
+ continue;
+ }
+ }
+ p = v_2;
+ p[1] = tint_convert_S(v.tint_symbol[2]);
+ p[3].m = f16mat4(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3);
+ p[1].m[0] = v.tint_symbol[0].m_col1.ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.spvasm
index 194f46f..0d31814 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_private.wgsl.expected.spvasm
@@ -25,8 +25,8 @@
OpName %S "S"
OpName %p "p"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -107,7 +107,7 @@
%40 = OpAccessChain %_ptr_Function_S %27 %34
%42 = OpAccessChain %_ptr_Function_S_std140 %25 %34
%44 = OpLoad %S_std140 %42 None
- %45 = OpFunctionCall %S %convert_S %44
+ %45 = OpFunctionCall %S %tint_convert_S %44
OpStore %40 %45 None
OpBranch %31
%31 = OpLabel
@@ -119,7 +119,7 @@
%49 = OpAccessChain %_ptr_Private_S %p %int_1
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
OpStore %49 %56 None
%57 = OpAccessChain %_ptr_Private_mat4v4half %p %int_3 %uint_1
%60 = OpAccessChain %_ptr_Uniform_v4half %1 %uint_0 %int_2 %uint_1
@@ -139,16 +139,16 @@
OpStore %72 %77 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %79
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %79
+ %tint_input = OpFunctionParameter %S_std140
%80 = OpLabel
- %81 = OpCompositeExtract %int %input 0
- %82 = OpCompositeExtract %v4half %input 1
- %83 = OpCompositeExtract %v4half %input 2
- %84 = OpCompositeExtract %v4half %input 3
- %85 = OpCompositeExtract %v4half %input 4
+ %81 = OpCompositeExtract %int %tint_input 0
+ %82 = OpCompositeExtract %v4half %tint_input 1
+ %83 = OpCompositeExtract %v4half %tint_input 2
+ %84 = OpCompositeExtract %v4half %tint_input 3
+ %85 = OpCompositeExtract %v4half %tint_input 4
%86 = OpCompositeConstruct %mat4v4half %82 %83 %84 %85
- %87 = OpCompositeExtract %int %input 5
+ %87 = OpCompositeExtract %int %tint_input 5
%88 = OpCompositeConstruct %S %81 %86 %87
OpReturnValue %88
OpFunctionEnd
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 d19c7d3..37e0016 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,14 +1,32 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct S_std140 {
+ int before;
+ f16vec4 m_col0;
+ f16vec4 m_col1;
+ f16vec4 m_col2;
+ f16vec4 m_col3;
+ int after;
+};
+
struct S {
int before;
f16mat4 m;
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ S_std140 tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_input.before, f16mat4(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), tint_input.after);
+}
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -16,16 +34,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -33,8 +51,25 @@
}
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;
+ S_std140 v_4[4] = v.tint_symbol;
+ S v_5[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));
+ {
+ uint v_6 = 0u;
+ v_6 = 0u;
+ while(true) {
+ uint v_7 = v_6;
+ if ((v_7 >= 4u)) {
+ break;
+ }
+ v_5[v_7] = tint_convert_S(v_4[v_7]);
+ {
+ v_6 = (v_7 + 1u);
+ }
+ continue;
+ }
+ }
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v_5);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], tint_convert_S(v.tint_symbol[2]));
+ v_1.tint_symbol_2[3].m = f16mat4(v.tint_symbol[2].m_col0, v.tint_symbol[2].m_col1, v.tint_symbol[2].m_col2, v.tint_symbol[2].m_col3);
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m_col1.ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.spvasm
index d4fe1f7..8bcf5cf 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.spvasm
@@ -31,8 +31,8 @@
OpName %tint_store_and_preserve_padding_0 "tint_store_and_preserve_padding"
OpName %target_indices "target_indices"
OpName %value_param_0 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -123,7 +123,7 @@
%41 = OpAccessChain %_ptr_Function_S %27 %35
%43 = OpAccessChain %_ptr_Function_S_std140 %25 %35
%45 = OpLoad %S_std140 %43 None
- %46 = OpFunctionCall %S %convert_S %45
+ %46 = OpFunctionCall %S %tint_convert_S %45
OpStore %41 %46 None
OpBranch %32
%32 = OpLabel
@@ -134,7 +134,7 @@
%50 = OpFunctionCall %void %tint_store_and_preserve_padding %49
%52 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%55 = OpLoad %S_std140 %52 None
- %56 = OpFunctionCall %S %convert_S %55
+ %56 = OpFunctionCall %S %tint_convert_S %55
%57 = OpBitcast %uint %int_1
%60 = OpCompositeConstruct %_arr_uint_uint_1 %57
%61 = OpFunctionCall %void %tint_store_and_preserve_padding_0 %60 %56
@@ -202,16 +202,16 @@
OpStore %112 %113 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %115
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %115
+ %tint_input = OpFunctionParameter %S_std140
%116 = OpLabel
- %117 = OpCompositeExtract %int %input 0
- %118 = OpCompositeExtract %v4half %input 1
- %119 = OpCompositeExtract %v4half %input 2
- %120 = OpCompositeExtract %v4half %input 3
- %121 = OpCompositeExtract %v4half %input 4
+ %117 = OpCompositeExtract %int %tint_input 0
+ %118 = OpCompositeExtract %v4half %tint_input 1
+ %119 = OpCompositeExtract %v4half %tint_input 2
+ %120 = OpCompositeExtract %v4half %tint_input 3
+ %121 = OpCompositeExtract %v4half %tint_input 4
%122 = OpCompositeConstruct %mat4v4half %118 %119 %120 %121
- %123 = OpCompositeExtract %int %input 5
+ %123 = OpCompositeExtract %int %tint_input 5
%124 = OpCompositeConstruct %S %117 %122 %123
OpReturnValue %124
OpFunctionEnd
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_workgroup.wgsl.expected.spvasm b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_workgroup.wgsl.expected.spvasm
index 249aa24..0d57c5f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_workgroup.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_workgroup.wgsl.expected.spvasm
@@ -28,8 +28,8 @@
OpName %f_inner "f_inner"
OpName %tint_local_index "tint_local_index"
OpName %f "f"
- OpName %convert_S "convert_S"
- OpName %input "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
OpMemberDecorate %S_std140 0 Offset 0
OpMemberDecorate %S_std140 1 Offset 8
OpMemberDecorate %S_std140 2 Offset 16
@@ -139,7 +139,7 @@
%60 = OpAccessChain %_ptr_Function_S %47 %55
%62 = OpAccessChain %_ptr_Function_S_std140 %45 %55
%64 = OpLoad %S_std140 %62 None
- %65 = OpFunctionCall %S %convert_S %64
+ %65 = OpFunctionCall %S %tint_convert_S %64
OpStore %60 %65 None
OpBranch %52
%52 = OpLabel
@@ -151,7 +151,7 @@
%68 = OpAccessChain %_ptr_Workgroup_S %w %int_1
%70 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0 %int_2
%73 = OpLoad %S_std140 %70 None
- %74 = OpFunctionCall %S %convert_S %73
+ %74 = OpFunctionCall %S %tint_convert_S %73
OpStore %68 %74 None
%75 = OpAccessChain %_ptr_Workgroup_mat4v4half %w %int_3 %uint_1
%78 = OpAccessChain %_ptr_Uniform_v4half %1 %uint_0 %int_2 %uint_1
@@ -177,16 +177,16 @@
%99 = OpFunctionCall %void %f_inner %98
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %101
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %101
+ %tint_input = OpFunctionParameter %S_std140
%102 = OpLabel
- %103 = OpCompositeExtract %int %input 0
- %104 = OpCompositeExtract %v4half %input 1
- %105 = OpCompositeExtract %v4half %input 2
- %106 = OpCompositeExtract %v4half %input 3
- %107 = OpCompositeExtract %v4half %input 4
+ %103 = OpCompositeExtract %int %tint_input 0
+ %104 = OpCompositeExtract %v4half %tint_input 1
+ %105 = OpCompositeExtract %v4half %tint_input 2
+ %106 = OpCompositeExtract %v4half %tint_input 3
+ %107 = OpCompositeExtract %v4half %tint_input 4
%108 = OpCompositeConstruct %mat4v4half %104 %105 %106 %107
- %109 = OpCompositeExtract %int %input 5
+ %109 = OpCompositeExtract %int %tint_input 5
%110 = OpCompositeConstruct %S %103 %108 %109
OpReturnValue %110
OpFunctionEnd
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 38649e1..7252977 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
@@ -6,10 +6,13 @@
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v;
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]);
+ mat4 t = transpose(v.tint_symbol[2].m);
+ float l = length(v.tint_symbol[0].m[1].ywxz);
+ float a = abs(v.tint_symbol[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 8a72238..10b6024 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
@@ -6,7 +6,10 @@
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v_1;
void a(S a_1[4]) {
}
void b(S s) {
@@ -19,9 +22,9 @@
}
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]);
+ a(v_1.tint_symbol);
+ b(v_1.tint_symbol[2]);
+ c(v_1.tint_symbol[2].m);
+ d(v_1.tint_symbol[0].m[1].ywxz);
+ e(v_1.tint_symbol[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 25656ea..a35a1b5 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
@@ -6,12 +6,15 @@
int after;
};
-uniform S u[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v;
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;
+ p = v.tint_symbol;
+ p[1] = v.tint_symbol[2];
+ p[3].m = v.tint_symbol[2].m;
+ p[1].m[0] = v.tint_symbol[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 5f0e066..608366e 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
@@ -6,8 +6,14 @@
int after;
};
-uniform S u[4];
-S s[4];
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol[4];
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ S tint_symbol_2[4];
+} v_1;
void tint_store_and_preserve_padding_1(inout S target, S value_param) {
target.before = value_param.before;
target.m = value_param.m;
@@ -15,16 +21,16 @@
}
void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
{
- uint v = 0u;
- v = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_1 = v;
- if ((v_1 >= 4u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 4u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_1], value_param[v_1]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v = (v_1 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
@@ -32,8 +38,8 @@
}
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;
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, v.tint_symbol);
+ tint_store_and_preserve_padding_1(v_1.tint_symbol_2[1], v.tint_symbol[2]);
+ v_1.tint_symbol_2[3].m = v.tint_symbol[2].m;
+ v_1.tint_symbol_2[1].m[0] = v.tint_symbol[0].m[1].ywxz;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..20d2f3a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,19 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2 v_1 = f16mat2(v.tint_symbol_col0, v.tint_symbol_col1);
+ f16mat2 l_m = v_1;
+ f16vec2 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..3e39323 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2 v_1 = f16mat2(v.tint_symbol_col0, v.tint_symbol_col1);
+ f16mat2 l_m = v_1;
+ f16vec2 l_m_1 = v_1[1];
+}
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 6bfe4b5..3afbabe 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,10 +1,14 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+} v;
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]);
+ f16mat2 t = transpose(f16mat2(v.tint_symbol_col0, v.tint_symbol_col1));
+ float16_t l = length(f16mat2(v.tint_symbol_col0, v.tint_symbol_col1)[1]);
+ float16_t a = abs(f16mat2(v.tint_symbol_col0, v.tint_symbol_col1)[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 914e8bd..754e874 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,7 +1,11 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+} v_1;
void a(f16mat2 m) {
}
void b(f16vec2 v) {
@@ -10,9 +14,9 @@
}
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]);
+ a(f16mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1));
+ b(f16mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1]);
+ b(f16mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1].yx);
+ c(f16mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1][0u]);
+ c(f16mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[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 83de027..503b350 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,12 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+} v;
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;
+ p = f16mat2(v.tint_symbol_col0, v.tint_symbol_col1);
+ p[1] = f16mat2(v.tint_symbol_col0, v.tint_symbol_col1)[0];
+ p[1] = f16mat2(v.tint_symbol_col0, v.tint_symbol_col1)[0].yx;
+ p[0][1] = f16mat2(v.tint_symbol_col0, v.tint_symbol_col1)[1][0];
}
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 e266aac..c54591e 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,12 +1,19 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2 u;
-f16mat2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat2 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = f16mat2(v.tint_symbol_col0, v.tint_symbol_col1);
+ v_1.tint_symbol_2[1] = f16mat2(v.tint_symbol_col0, v.tint_symbol_col1)[0];
+ v_1.tint_symbol_2[1] = f16mat2(v.tint_symbol_col0, v.tint_symbol_col1)[0].yx;
+ v_1.tint_symbol_2[0][1] = f16mat2(v.tint_symbol_col0, v.tint_symbol_col1)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..346692c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,18 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat2 v_1 = mat2(v.tint_symbol_col0, v.tint_symbol_col1);
+ mat2 l_m = v_1;
+ vec2 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..a5b6c7f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,13 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat2 v_1 = mat2(v.tint_symbol_col0, v.tint_symbol_col1);
+ mat2 l_m = v_1;
+ vec2 l_m_1 = v_1[1];
+}
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 a564021..4cbb5a1 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,9 +1,13 @@
#version 310 es
-uniform mat2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+} v;
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]);
+ mat2 t = transpose(mat2(v.tint_symbol_col0, v.tint_symbol_col1));
+ float l = length(mat2(v.tint_symbol_col0, v.tint_symbol_col1)[1]);
+ float a = abs(mat2(v.tint_symbol_col0, v.tint_symbol_col1)[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 b158732..5cbe01b 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,6 +1,10 @@
#version 310 es
-uniform mat2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+} v_1;
void a(mat2 m) {
}
void b(vec2 v) {
@@ -9,9 +13,9 @@
}
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]);
+ a(mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1));
+ b(mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1]);
+ b(mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1].yx);
+ c(mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1][0u]);
+ c(mat2(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[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 2b7523c..eed58bd 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,15 @@
#version 310 es
-uniform mat2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+} v;
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;
+ p = mat2(v.tint_symbol_col0, v.tint_symbol_col1);
+ p[1] = mat2(v.tint_symbol_col0, v.tint_symbol_col1)[0];
+ p[1] = mat2(v.tint_symbol_col0, v.tint_symbol_col1)[0].yx;
+ p[0][1] = mat2(v.tint_symbol_col0, v.tint_symbol_col1)[1][0];
}
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 5f9f438..bc9b2fa 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,18 @@
#version 310 es
-uniform mat2 u;
-mat2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat2 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = mat2(v.tint_symbol_col0, v.tint_symbol_col1);
+ v_1.tint_symbol_2[1] = mat2(v.tint_symbol_col0, v.tint_symbol_col1)[0];
+ v_1.tint_symbol_2[1] = mat2(v.tint_symbol_col0, v.tint_symbol_col1)[0].yx;
+ v_1.tint_symbol_2[0][1] = mat2(v.tint_symbol_col0, v.tint_symbol_col1)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..8750699 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,19 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2x3 v_1 = f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1);
+ f16mat2x3 l_m = v_1;
+ f16vec3 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..8c28369 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2x3 v_1 = f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1);
+ f16mat2x3 l_m = v_1;
+ f16vec3 l_m_1 = v_1[1];
+}
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 0b91c84..939b647 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,10 +1,14 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+} v;
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]);
+ f16mat3x2 t = transpose(f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1));
+ float16_t l = length(f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[1]);
+ float16_t a = abs(f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[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 e0024ba..ef447af 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,7 +1,11 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+} v_1;
void a(f16mat2x3 m) {
}
void b(f16vec3 v) {
@@ -10,9 +14,9 @@
}
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]);
+ a(f16mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1));
+ b(f16mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1]);
+ b(f16mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1].zxy);
+ c(f16mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1][0u]);
+ c(f16mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[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 0c36ca1..900ae59 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,12 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+} v;
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;
+ p = f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1);
+ p[1] = f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[0];
+ p[1] = f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[0].zxy;
+ p[0][1] = f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[1][0];
}
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 47e1153..9a9b816 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,16 +1,23 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x3 u;
-f16mat2x3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat2x3 tint_symbol_2;
+} v_1;
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;
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1));
+ v_1.tint_symbol_2[1] = f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[0];
+ v_1.tint_symbol_2[1] = f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[0].zxy;
+ v_1.tint_symbol_2[0][1] = f16mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..84d8be9 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,18 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat2x3 v_1 = mat2x3(v.tint_symbol_col0, v.tint_symbol_col1);
+ mat2x3 l_m = v_1;
+ vec3 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..c6724b7 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,13 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat2x3 v_1 = mat2x3(v.tint_symbol_col0, v.tint_symbol_col1);
+ mat2x3 l_m = v_1;
+ vec3 l_m_1 = v_1[1];
+}
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 47f215d..7f90d41 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,9 +1,13 @@
#version 310 es
-uniform mat2x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+} v;
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]);
+ mat3x2 t = transpose(mat2x3(v.tint_symbol_col0, v.tint_symbol_col1));
+ float l = length(mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[1]);
+ float a = abs(mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[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 392cff5..c3c797e 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,6 +1,10 @@
#version 310 es
-uniform mat2x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+} v_1;
void a(mat2x3 m) {
}
void b(vec3 v) {
@@ -9,9 +13,9 @@
}
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]);
+ a(mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1));
+ b(mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1]);
+ b(mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1].zxy);
+ c(mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1][0u]);
+ c(mat2x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[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 e3a31ea..39e5856 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,15 @@
#version 310 es
-uniform mat2x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+} v;
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;
+ p = mat2x3(v.tint_symbol_col0, v.tint_symbol_col1);
+ p[1] = mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[0];
+ p[1] = mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[0].zxy;
+ p[0][1] = mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[1][0];
}
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 336f55ab..f5c26a4 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,15 +1,22 @@
#version 310 es
-uniform mat2x3 u;
-mat2x3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat2x3 tint_symbol_2;
+} v_1;
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;
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, mat2x3(v.tint_symbol_col0, v.tint_symbol_col1));
+ v_1.tint_symbol_2[1] = mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[0];
+ v_1.tint_symbol_2[1] = mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[0].zxy;
+ v_1.tint_symbol_2[0][1] = mat2x3(v.tint_symbol_col0, v.tint_symbol_col1)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..aeb3b1c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,19 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2x4 v_1 = f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1);
+ f16mat2x4 l_m = v_1;
+ f16vec4 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..4a4955d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat2x4 v_1 = f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1);
+ f16mat2x4 l_m = v_1;
+ f16vec4 l_m_1 = v_1[1];
+}
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 d5461cf..e3be2f0 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,10 +1,14 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+} v;
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]);
+ f16mat4x2 t = transpose(f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1));
+ float16_t l = length(f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1)[1]);
+ float16_t a = abs(f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1)[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 31b2df7..1e7c359 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,7 +1,11 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+} v_1;
void a(f16mat2x4 m) {
}
void b(f16vec4 v) {
@@ -10,9 +14,9 @@
}
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]);
+ a(f16mat2x4(v_1.tint_symbol_col0, v_1.tint_symbol_col1));
+ b(f16mat2x4(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1]);
+ b(f16mat2x4(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1].ywxz);
+ c(f16mat2x4(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[1][0u]);
+ c(f16mat2x4(v_1.tint_symbol_col0, v_1.tint_symbol_col1)[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 6305d71..c136541 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,12 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+} v;
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;
+ p = f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1);
+ p[1] = f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1)[0];
+ p[1] = f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1)[0].ywxz;
+ p[0][1] = f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1)[1][0];
}
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 ff74846..aa7643c 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,12 +1,19 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x4 u;
-f16mat2x4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat2x4 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1);
+ v_1.tint_symbol_2[1] = f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1)[0];
+ v_1.tint_symbol_2[1] = f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1)[0].ywxz;
+ v_1.tint_symbol_2[0][1] = f16mat2x4(v.tint_symbol_col0, v.tint_symbol_col1)[1][0];
}
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 00ec920..4d287ac 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,9 +1,12 @@
#version 310 es
-uniform mat2x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat2x4 tint_symbol;
+} v;
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]);
+ mat4x2 t = transpose(v.tint_symbol);
+ float l = length(v.tint_symbol[1]);
+ float a = abs(v.tint_symbol[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 8872cf9..c06c740 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,6 +1,9 @@
#version 310 es
-uniform mat2x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat2x4 tint_symbol;
+} v_1;
void a(mat2x4 m) {
}
void b(vec4 v) {
@@ -9,9 +12,9 @@
}
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]);
+ a(v_1.tint_symbol);
+ b(v_1.tint_symbol[1]);
+ b(v_1.tint_symbol[1].ywxz);
+ c(v_1.tint_symbol[1].x);
+ c(v_1.tint_symbol[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 c0519ad..c9b8b2d 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,14 @@
#version 310 es
-uniform mat2x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat2x4 tint_symbol;
+} v;
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;
+ p = v.tint_symbol;
+ p[1] = v.tint_symbol[0];
+ p[1] = v.tint_symbol[0].ywxz;
+ p[0][1] = v.tint_symbol[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 4aa67b7..90c7c74 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,17 @@
#version 310 es
-uniform mat2x4 u;
-mat2x4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat2x4 tint_symbol;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat2x4 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = v.tint_symbol;
+ v_1.tint_symbol_2[1] = v.tint_symbol[0];
+ v_1.tint_symbol_2[1] = v.tint_symbol[0].ywxz;
+ v_1.tint_symbol_2[0][1] = v.tint_symbol[1].x;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..19b76d5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,20 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat3x2 v_1 = f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ f16mat3x2 l_m = v_1;
+ f16vec2 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..09d314a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,15 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat3x2 v_1 = f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ f16mat3x2 l_m = v_1;
+ f16vec2 l_m_1 = v_1[1];
+}
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 4b5f84a..9959dfb 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,10 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+} v;
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]);
+ f16mat2x3 t = transpose(f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2));
+ float16_t l = length(f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1]);
+ float16_t a = abs(f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[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 5c4d2c8..c55ab4b 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,7 +1,12 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+} v_1;
void a(f16mat3x2 m) {
}
void b(f16vec2 v) {
@@ -10,9 +15,9 @@
}
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]);
+ a(f16mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2));
+ b(f16mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1]);
+ b(f16mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1].yx);
+ c(f16mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1][0u]);
+ c(f16mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[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 9af38a8..ed0bcce 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,12 +1,17 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+} v;
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;
+ p = f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ p[1] = f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0];
+ p[1] = f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0].yx;
+ p[0][1] = f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1][0];
}
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 321b3636..e16d392 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,12 +1,20 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3x2 u;
-f16mat3x2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat3x2 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ v_1.tint_symbol_2[1] = f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0];
+ v_1.tint_symbol_2[1] = f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0].yx;
+ v_1.tint_symbol_2[0][1] = f16mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..83512e5 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,19 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat3x2 v_1 = mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ mat3x2 l_m = v_1;
+ vec2 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..0a35794 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat3x2 v_1 = mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ mat3x2 l_m = v_1;
+ vec2 l_m_1 = v_1[1];
+}
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 77cfa1a..c6a9ae1 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,9 +1,14 @@
#version 310 es
-uniform mat3x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+} v;
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]);
+ mat2x3 t = transpose(mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2));
+ float l = length(mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1]);
+ float a = abs(mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[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 755ef46..a2d059c 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,6 +1,11 @@
#version 310 es
-uniform mat3x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+} v_1;
void a(mat3x2 m) {
}
void b(vec2 v) {
@@ -9,9 +14,9 @@
}
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]);
+ a(mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2));
+ b(mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1]);
+ b(mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1].yx);
+ c(mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1][0u]);
+ c(mat3x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[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 e9650bd..3b38c62 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,16 @@
#version 310 es
-uniform mat3x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+} v;
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;
+ p = mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ p[1] = mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0];
+ p[1] = mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0].yx;
+ p[0][1] = mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1][0];
}
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 e6a285d..398cc75 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,19 @@
#version 310 es
-uniform mat3x2 u;
-mat3x2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat3x2 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ v_1.tint_symbol_2[1] = mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0];
+ v_1.tint_symbol_2[1] = mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0].yx;
+ v_1.tint_symbol_2[0][1] = mat3x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..3e66c4c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,20 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat3 v_1 = f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ f16mat3 l_m = v_1;
+ f16vec3 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..659a3f2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,15 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat3 v_1 = f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ f16mat3 l_m = v_1;
+ f16vec3 l_m_1 = v_1[1];
+}
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 b65ee0e..f114071 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,10 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+} v;
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]);
+ f16mat3 t = transpose(f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2));
+ float16_t l = length(f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1]);
+ float16_t a = abs(f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[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 ed143bc..f491579 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,7 +1,12 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+} v_1;
void a(f16mat3 m) {
}
void b(f16vec3 v) {
@@ -10,9 +15,9 @@
}
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]);
+ a(f16mat3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2));
+ b(f16mat3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1]);
+ b(f16mat3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1].zxy);
+ c(f16mat3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1][0u]);
+ c(f16mat3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[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 67012bf..03ade68 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,12 +1,17 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+} v;
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;
+ p = f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ p[1] = f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0];
+ p[1] = f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0].zxy;
+ p[0][1] = f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1][0];
}
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 e1bd36c..3b0952b 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,8 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3 u;
-f16mat3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat3 tint_symbol_2;
+} v_1;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,8 +18,8 @@
}
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;
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2));
+ v_1.tint_symbol_2[1] = f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0];
+ v_1.tint_symbol_2[1] = f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0].zxy;
+ v_1.tint_symbol_2[0][1] = f16mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..8ce9705 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,19 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat3 v_1 = mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ mat3 l_m = v_1;
+ vec3 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..8441f55 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat3 v_1 = mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ mat3 l_m = v_1;
+ vec3 l_m_1 = v_1[1];
+}
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 63b41a2..3861744 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,9 +1,14 @@
#version 310 es
-uniform mat3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+} v;
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]);
+ mat3 t = transpose(mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2));
+ float l = length(mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1]);
+ float a = abs(mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[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 bc86315..ce9d2d4 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,6 +1,11 @@
#version 310 es
-uniform mat3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+} v_1;
void a(mat3 m) {
}
void b(vec3 v) {
@@ -9,9 +14,9 @@
}
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]);
+ a(mat3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2));
+ b(mat3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1]);
+ b(mat3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1].zxy);
+ c(mat3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1][0u]);
+ c(mat3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[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 81c1ec1..e32aa4a 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,16 @@
#version 310 es
-uniform mat3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+} v;
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;
+ p = mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ p[1] = mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0];
+ p[1] = mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0].zxy;
+ p[0][1] = mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1][0];
}
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 4dd0b58..fc229e2 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,7 +1,15 @@
#version 310 es
-uniform mat3 u;
-mat3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat3 tint_symbol_2;
+} v_1;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,8 +17,8 @@
}
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;
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2));
+ v_1.tint_symbol_2[1] = mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0];
+ v_1.tint_symbol_2[1] = mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0].zxy;
+ v_1.tint_symbol_2[0][1] = mat3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..cded968 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,20 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat3x4 v_1 = f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ f16mat3x4 l_m = v_1;
+ f16vec4 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..ef4767b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,15 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat3x4 v_1 = f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ f16mat3x4 l_m = v_1;
+ f16vec4 l_m_1 = v_1[1];
+}
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 a7861f9..c499d7a 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,10 +1,15 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+} v;
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]);
+ f16mat4x3 t = transpose(f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2));
+ float16_t l = length(f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1]);
+ float16_t a = abs(f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[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 9027ccf..356ee58 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,7 +1,12 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+} v_1;
void a(f16mat3x4 m) {
}
void b(f16vec4 v) {
@@ -10,9 +15,9 @@
}
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]);
+ a(f16mat3x4(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2));
+ b(f16mat3x4(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1]);
+ b(f16mat3x4(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1].ywxz);
+ c(f16mat3x4(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[1][0u]);
+ c(f16mat3x4(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2)[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 0f376d1..67dc3d8 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,12 +1,17 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+} v;
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;
+ p = f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ p[1] = f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0];
+ p[1] = f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0].ywxz;
+ p[0][1] = f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1][0];
}
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 7bda4f2..717416d 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,12 +1,20 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3x4 u;
-f16mat3x4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat3x4 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2);
+ v_1.tint_symbol_2[1] = f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0];
+ v_1.tint_symbol_2[1] = f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[0].ywxz;
+ v_1.tint_symbol_2[0][1] = f16mat3x4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2)[1][0];
}
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 83e9ed8..c496d0f 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,9 +1,12 @@
#version 310 es
-uniform mat3x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat3x4 tint_symbol;
+} v;
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]);
+ mat4x3 t = transpose(v.tint_symbol);
+ float l = length(v.tint_symbol[1]);
+ float a = abs(v.tint_symbol[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 c1bb67e..7ff6785 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,6 +1,9 @@
#version 310 es
-uniform mat3x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat3x4 tint_symbol;
+} v_1;
void a(mat3x4 m) {
}
void b(vec4 v) {
@@ -9,9 +12,9 @@
}
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]);
+ a(v_1.tint_symbol);
+ b(v_1.tint_symbol[1]);
+ b(v_1.tint_symbol[1].ywxz);
+ c(v_1.tint_symbol[1].x);
+ c(v_1.tint_symbol[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 a5c2c56..5ed9894 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,14 @@
#version 310 es
-uniform mat3x4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat3x4 tint_symbol;
+} v;
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;
+ p = v.tint_symbol;
+ p[1] = v.tint_symbol[0];
+ p[1] = v.tint_symbol[0].ywxz;
+ p[0][1] = v.tint_symbol[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 34fe330..5cb2595 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,17 @@
#version 310 es
-uniform mat3x4 u;
-mat3x4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat3x4 tint_symbol;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat3x4 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = v.tint_symbol;
+ v_1.tint_symbol_2[1] = v.tint_symbol[0];
+ v_1.tint_symbol_2[1] = v.tint_symbol[0].ywxz;
+ v_1.tint_symbol_2[0][1] = v.tint_symbol[1].x;
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..cd72608 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,21 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+ f16vec2 tint_symbol_col3;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4x2 v_1 = f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ f16mat4x2 l_m = v_1;
+ f16vec2 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..a05e204 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+ f16vec2 tint_symbol_col3;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4x2 v_1 = f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ f16mat4x2 l_m = v_1;
+ f16vec2 l_m_1 = v_1[1];
+}
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 c42b267..0b4be79 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,10 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+ f16vec2 tint_symbol_col3;
+} v;
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]);
+ f16mat2x4 t = transpose(f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3));
+ float16_t l = length(f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1]);
+ float16_t a = abs(f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[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 da702d7..1feab49 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,7 +1,13 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+ f16vec2 tint_symbol_col3;
+} v_1;
void a(f16mat4x2 m) {
}
void b(f16vec2 v) {
@@ -10,9 +16,9 @@
}
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]);
+ a(f16mat4x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3));
+ b(f16mat4x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1]);
+ b(f16mat4x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1].yx);
+ c(f16mat4x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1][0u]);
+ c(f16mat4x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[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 633b31b..bec411b 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,12 +1,18 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+ f16vec2 tint_symbol_col3;
+} v;
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;
+ p = f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ p[1] = f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0];
+ p[1] = f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0].yx;
+ p[0][1] = f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1][0];
}
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 e107015..f8dec44 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,12 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x2 u;
-f16mat4x2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec2 tint_symbol_col0;
+ f16vec2 tint_symbol_col1;
+ f16vec2 tint_symbol_col2;
+ f16vec2 tint_symbol_col3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat4x2 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ v_1.tint_symbol_2[1] = f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0];
+ v_1.tint_symbol_2[1] = f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0].yx;
+ v_1.tint_symbol_2[0][1] = f16mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..35cf78b 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,20 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+ vec2 tint_symbol_col3;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat4x2 v_1 = mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ mat4x2 l_m = v_1;
+ vec2 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..658688c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x2_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,15 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+ vec2 tint_symbol_col3;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat4x2 v_1 = mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ mat4x2 l_m = v_1;
+ vec2 l_m_1 = v_1[1];
+}
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 39656fb..92a3f75 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,9 +1,15 @@
#version 310 es
-uniform mat4x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+ vec2 tint_symbol_col3;
+} v;
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]);
+ mat2x4 t = transpose(mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3));
+ float l = length(mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1]);
+ float a = abs(mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[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 06f26cd..c91cfbf 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,6 +1,12 @@
#version 310 es
-uniform mat4x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+ vec2 tint_symbol_col3;
+} v_1;
void a(mat4x2 m) {
}
void b(vec2 v) {
@@ -9,9 +15,9 @@
}
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]);
+ a(mat4x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3));
+ b(mat4x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1]);
+ b(mat4x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1].yx);
+ c(mat4x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1][0u]);
+ c(mat4x2(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[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 afe8a0c..0027689 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,17 @@
#version 310 es
-uniform mat4x2 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+ vec2 tint_symbol_col3;
+} v;
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;
+ p = mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ p[1] = mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0];
+ p[1] = mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0].yx;
+ p[0][1] = mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1][0];
}
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 deb1b1f..52cb81f 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,20 @@
#version 310 es
-uniform mat4x2 u;
-mat4x2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec2 tint_symbol_col0;
+ vec2 tint_symbol_col1;
+ vec2 tint_symbol_col2;
+ vec2 tint_symbol_col3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat4x2 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ v_1.tint_symbol_2[1] = mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0];
+ v_1.tint_symbol_2[1] = mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0].yx;
+ v_1.tint_symbol_2[0][1] = mat4x2(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..de1d3c2 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,21 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+ f16vec3 tint_symbol_col3;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4x3 v_1 = f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ f16mat4x3 l_m = v_1;
+ f16vec3 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..49c5554 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+ f16vec3 tint_symbol_col3;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4x3 v_1 = f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ f16mat4x3 l_m = v_1;
+ f16vec3 l_m_1 = v_1[1];
+}
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 920bf0f..3257a67 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,10 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+ f16vec3 tint_symbol_col3;
+} v;
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]);
+ f16mat3x4 t = transpose(f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3));
+ float16_t l = length(f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1]);
+ float16_t a = abs(f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[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 a37f7b1..50df56e 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,7 +1,13 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+ f16vec3 tint_symbol_col3;
+} v_1;
void a(f16mat4x3 m) {
}
void b(f16vec3 v) {
@@ -10,9 +16,9 @@
}
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]);
+ a(f16mat4x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3));
+ b(f16mat4x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1]);
+ b(f16mat4x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1].zxy);
+ c(f16mat4x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1][0u]);
+ c(f16mat4x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[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 7f9029b..2c4b5e5 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,12 +1,18 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+ f16vec3 tint_symbol_col3;
+} v;
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;
+ p = f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ p[1] = f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0];
+ p[1] = f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0].zxy;
+ p[0][1] = f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1][0];
}
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 b900f61..33d88cf 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,8 +1,17 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x3 u;
-f16mat4x3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec3 tint_symbol_col0;
+ f16vec3 tint_symbol_col1;
+ f16vec3 tint_symbol_col2;
+ f16vec3 tint_symbol_col3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat4x3 tint_symbol_2;
+} v_1;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,8 +20,8 @@
}
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;
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3));
+ v_1.tint_symbol_2[1] = f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0];
+ v_1.tint_symbol_2[1] = f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0].zxy;
+ v_1.tint_symbol_2[0][1] = f16mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..d6a2adb 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,20 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+ vec3 tint_symbol_col3;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat4x3 v_1 = mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ mat4x3 l_m = v_1;
+ vec3 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..186cf0d 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,15 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+ vec3 tint_symbol_col3;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ mat4x3 v_1 = mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ mat4x3 l_m = v_1;
+ vec3 l_m_1 = v_1[1];
+}
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 94f2a0b..65524fb 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,9 +1,15 @@
#version 310 es
-uniform mat4x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+ vec3 tint_symbol_col3;
+} v;
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]);
+ mat3x4 t = transpose(mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3));
+ float l = length(mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1]);
+ float a = abs(mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[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 80f9ab5..876d6bb 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,6 +1,12 @@
#version 310 es
-uniform mat4x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+ vec3 tint_symbol_col3;
+} v_1;
void a(mat4x3 m) {
}
void b(vec3 v) {
@@ -9,9 +15,9 @@
}
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]);
+ a(mat4x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3));
+ b(mat4x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1]);
+ b(mat4x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1].zxy);
+ c(mat4x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1][0u]);
+ c(mat4x3(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[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 2f3a9a7..21725f1 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,17 @@
#version 310 es
-uniform mat4x3 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+ vec3 tint_symbol_col3;
+} v;
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;
+ p = mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ p[1] = mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0];
+ p[1] = mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0].zxy;
+ p[0][1] = mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1][0];
}
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 5722166..fa97693f 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,7 +1,16 @@
#version 310 es
-uniform mat4x3 u;
-mat4x3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ vec3 tint_symbol_col0;
+ vec3 tint_symbol_col1;
+ vec3 tint_symbol_col2;
+ vec3 tint_symbol_col3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat4x3 tint_symbol_2;
+} v_1;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,8 +19,8 @@
}
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;
+ tint_store_and_preserve_padding(v_1.tint_symbol_2, mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3));
+ v_1.tint_symbol_2[1] = mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0];
+ v_1.tint_symbol_2[1] = mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0].zxy;
+ v_1.tint_symbol_2[0][1] = mat4x3(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1][0];
}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..fc7cb41 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/dynamic_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,21 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+ f16vec4 tint_symbol_col3;
+} v;
+int counter = 0;
+int i() {
+ counter = (counter + 1);
+ return counter;
+}
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4 v_1 = f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ f16mat4 l_m = v_1;
+ f16vec4 l_m_i = v_1[i()];
+}
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
index 4687334..5b43880 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x4_f16/static_index_via_ptr.wgsl.expected.ir.glsl
@@ -1,11 +1,16 @@
-SKIP: FAILED
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float: require
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
-********************************************************************
-* 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: trace/BPT trap
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+ f16vec4 tint_symbol_col3;
+} v;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+ f16mat4 v_1 = f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ f16mat4 l_m = v_1;
+ f16vec4 l_m_1 = v_1[1];
+}
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 77c0d48..3eff6d2 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,10 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+ f16vec4 tint_symbol_col3;
+} v;
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]);
+ f16mat4 t = transpose(f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3));
+ float16_t l = length(f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1]);
+ float16_t a = abs(f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[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 d1ed871..e1d706c 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,7 +1,13 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+ f16vec4 tint_symbol_col3;
+} v_1;
void a(f16mat4 m) {
}
void b(f16vec4 v) {
@@ -10,9 +16,9 @@
}
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]);
+ a(f16mat4(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3));
+ b(f16mat4(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1]);
+ b(f16mat4(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1].ywxz);
+ c(f16mat4(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[1][0u]);
+ c(f16mat4(v_1.tint_symbol_col0, v_1.tint_symbol_col1, v_1.tint_symbol_col2, v_1.tint_symbol_col3)[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 ffadbef..b9b109a 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,12 +1,18 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+ f16vec4 tint_symbol_col3;
+} v;
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;
+ p = f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ p[1] = f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0];
+ p[1] = f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0].ywxz;
+ p[0][1] = f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1][0];
}
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 0aac068..590ffd9 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,12 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4 u;
-f16mat4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ f16vec4 tint_symbol_col0;
+ f16vec4 tint_symbol_col1;
+ f16vec4 tint_symbol_col2;
+ f16vec4 tint_symbol_col3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ f16mat4 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3);
+ v_1.tint_symbol_2[1] = f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0];
+ v_1.tint_symbol_2[1] = f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[0].ywxz;
+ v_1.tint_symbol_2[0][1] = f16mat4(v.tint_symbol_col0, v.tint_symbol_col1, v.tint_symbol_col2, v.tint_symbol_col3)[1][0];
}
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 ae46e0f..b879e31 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,9 +1,12 @@
#version 310 es
-uniform mat4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat4 tint_symbol;
+} v;
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]);
+ mat4 t = transpose(v.tint_symbol);
+ float l = length(v.tint_symbol[1]);
+ float a = abs(v.tint_symbol[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 d9ac9be..f76f583 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,6 +1,9 @@
#version 310 es
-uniform mat4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat4 tint_symbol;
+} v_1;
void a(mat4 m) {
}
void b(vec4 v) {
@@ -9,9 +12,9 @@
}
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]);
+ a(v_1.tint_symbol);
+ b(v_1.tint_symbol[1]);
+ b(v_1.tint_symbol[1].ywxz);
+ c(v_1.tint_symbol[1].x);
+ c(v_1.tint_symbol[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 2e8f11f..b7b2059 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,14 @@
#version 310 es
-uniform mat4 u;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat4 tint_symbol;
+} v;
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;
+ p = v.tint_symbol;
+ p[1] = v.tint_symbol[0];
+ p[1] = v.tint_symbol[0].ywxz;
+ p[0][1] = v.tint_symbol[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 2496a6f..8cfa3f7 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,17 @@
#version 310 es
-uniform mat4 u;
-mat4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ mat4 tint_symbol;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ mat4 tint_symbol_2;
+} v_1;
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;
+ v_1.tint_symbol_2 = v.tint_symbol;
+ v_1.tint_symbol_2[1] = v.tint_symbol[0];
+ v_1.tint_symbol_2[1] = v.tint_symbol[0].ywxz;
+ v_1.tint_symbol_2[0][1] = v.tint_symbol[1].x;
}
diff --git a/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.glsl
index ce92182..c4deb1d 100644
--- a/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.glsl
@@ -1,10 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform float16_t u;
-float16_t s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ float16_t tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ float16_t tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- float16_t x = u;
- s = x;
+ float16_t x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.glsl
index 1b76bb1..0fde7d4 100644
--- a/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform float u;
-float s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ float tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ float tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- float x = u;
- s = x;
+ float x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.glsl
index 13dac55..755d3a1 100644
--- a/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform int u;
-int s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ int tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ int tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- int x = u;
- s = x;
+ int x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.glsl
index 87f6235..afb2b5e3 100644
--- a/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.glsl
@@ -1,10 +1,17 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2 u;
-f16mat2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ f16vec2 tint_symbol_1_col0;
+ f16vec2 tint_symbol_1_col1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat2 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat2 x = u;
- s = x;
+ f16mat2 x = f16mat2(v.tint_symbol_1_col0, v.tint_symbol_1_col1);
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.glsl
index 167807e..c171076 100644
--- a/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.glsl
@@ -1,9 +1,16 @@
#version 310 es
-uniform mat2 u;
-mat2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ vec2 tint_symbol_1_col0;
+ vec2 tint_symbol_1_col1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat2 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat2 x = u;
- s = x;
+ mat2 x = mat2(v.tint_symbol_1_col0, v.tint_symbol_1_col1);
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.glsl
index b18a662..7593dbe 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.glsl
@@ -1,14 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x3 u;
-f16mat2x3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ f16vec3 tint_symbol_1_col0;
+ f16vec3 tint_symbol_1_col1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat2x3 tint_symbol_3;
+} v_1;
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() {
- f16mat2x3 x = u;
- tint_store_and_preserve_padding(s, x);
+ f16mat2x3 x = f16mat2x3(v.tint_symbol_1_col0, v.tint_symbol_1_col1);
+ tint_store_and_preserve_padding(v_1.tint_symbol_3, x);
}
diff --git a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.glsl
index e82f91f..26a17b8 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.glsl
@@ -1,13 +1,20 @@
#version 310 es
-uniform mat2x3 u;
-mat2x3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ vec3 tint_symbol_1_col0;
+ vec3 tint_symbol_1_col1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat2x3 tint_symbol_3;
+} v_1;
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() {
- mat2x3 x = u;
- tint_store_and_preserve_padding(s, x);
+ mat2x3 x = mat2x3(v.tint_symbol_1_col0, v.tint_symbol_1_col1);
+ tint_store_and_preserve_padding(v_1.tint_symbol_3, x);
}
diff --git a/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.glsl
index 03a391d..8b94083 100644
--- a/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.glsl
@@ -1,10 +1,17 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat2x4 u;
-f16mat2x4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ f16vec4 tint_symbol_1_col0;
+ f16vec4 tint_symbol_1_col1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat2x4 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat2x4 x = u;
- s = x;
+ f16mat2x4 x = f16mat2x4(v.tint_symbol_1_col0, v.tint_symbol_1_col1);
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.glsl
index 2b2cbce..3c2d82f 100644
--- a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform mat2x4 u;
-mat2x4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ mat2x4 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat2x4 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat2x4 x = u;
- s = x;
+ mat2x4 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.glsl
index a509923..e86ec08 100644
--- a/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.glsl
@@ -1,10 +1,18 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3x2 u;
-f16mat3x2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ f16vec2 tint_symbol_1_col0;
+ f16vec2 tint_symbol_1_col1;
+ f16vec2 tint_symbol_1_col2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat3x2 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat3x2 x = u;
- s = x;
+ f16mat3x2 x = f16mat3x2(v.tint_symbol_1_col0, v.tint_symbol_1_col1, v.tint_symbol_1_col2);
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.glsl
index 7ef7736..05fdd71 100644
--- a/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.glsl
@@ -1,9 +1,17 @@
#version 310 es
-uniform mat3x2 u;
-mat3x2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ vec2 tint_symbol_1_col0;
+ vec2 tint_symbol_1_col1;
+ vec2 tint_symbol_1_col2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat3x2 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat3x2 x = u;
- s = x;
+ mat3x2 x = mat3x2(v.tint_symbol_1_col0, v.tint_symbol_1_col1, v.tint_symbol_1_col2);
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.glsl
index 815340c..6162a55 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.glsl
@@ -1,8 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3 u;
-f16mat3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ f16vec3 tint_symbol_1_col0;
+ f16vec3 tint_symbol_1_col1;
+ f16vec3 tint_symbol_1_col2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat3 tint_symbol_3;
+} v_1;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,6 +18,6 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat3 x = u;
- tint_store_and_preserve_padding(s, x);
+ f16mat3 x = f16mat3(v.tint_symbol_1_col0, v.tint_symbol_1_col1, v.tint_symbol_1_col2);
+ tint_store_and_preserve_padding(v_1.tint_symbol_3, x);
}
diff --git a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.glsl
index ff33942..4eb670f 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.glsl
@@ -1,7 +1,15 @@
#version 310 es
-uniform mat3 u;
-mat3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ vec3 tint_symbol_1_col0;
+ vec3 tint_symbol_1_col1;
+ vec3 tint_symbol_1_col2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat3 tint_symbol_3;
+} v_1;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,6 +17,6 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat3 x = u;
- tint_store_and_preserve_padding(s, x);
+ mat3 x = mat3(v.tint_symbol_1_col0, v.tint_symbol_1_col1, v.tint_symbol_1_col2);
+ tint_store_and_preserve_padding(v_1.tint_symbol_3, x);
}
diff --git a/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.glsl
index 77cd183..6ff0957 100644
--- a/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.glsl
@@ -1,10 +1,18 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat3x4 u;
-f16mat3x4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ f16vec4 tint_symbol_1_col0;
+ f16vec4 tint_symbol_1_col1;
+ f16vec4 tint_symbol_1_col2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat3x4 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat3x4 x = u;
- s = x;
+ f16mat3x4 x = f16mat3x4(v.tint_symbol_1_col0, v.tint_symbol_1_col1, v.tint_symbol_1_col2);
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.glsl
index 81a0c4d..4d89005 100644
--- a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform mat3x4 u;
-mat3x4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ mat3x4 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat3x4 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat3x4 x = u;
- s = x;
+ mat3x4 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.glsl
index 78d8b72..c24830b 100644
--- a/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.glsl
@@ -1,10 +1,19 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x2 u;
-f16mat4x2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ f16vec2 tint_symbol_1_col0;
+ f16vec2 tint_symbol_1_col1;
+ f16vec2 tint_symbol_1_col2;
+ f16vec2 tint_symbol_1_col3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat4x2 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat4x2 x = u;
- s = x;
+ f16mat4x2 x = f16mat4x2(v.tint_symbol_1_col0, v.tint_symbol_1_col1, v.tint_symbol_1_col2, v.tint_symbol_1_col3);
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.glsl
index c016013..288bbb4 100644
--- a/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.glsl
@@ -1,9 +1,18 @@
#version 310 es
-uniform mat4x2 u;
-mat4x2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ vec2 tint_symbol_1_col0;
+ vec2 tint_symbol_1_col1;
+ vec2 tint_symbol_1_col2;
+ vec2 tint_symbol_1_col3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat4x2 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat4x2 x = u;
- s = x;
+ mat4x2 x = mat4x2(v.tint_symbol_1_col0, v.tint_symbol_1_col1, v.tint_symbol_1_col2, v.tint_symbol_1_col3);
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.glsl
index cb83818..a8c411c 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.glsl
@@ -1,8 +1,17 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4x3 u;
-f16mat4x3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ f16vec3 tint_symbol_1_col0;
+ f16vec3 tint_symbol_1_col1;
+ f16vec3 tint_symbol_1_col2;
+ f16vec3 tint_symbol_1_col3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat4x3 tint_symbol_3;
+} v_1;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,6 +20,6 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat4x3 x = u;
- tint_store_and_preserve_padding(s, x);
+ f16mat4x3 x = f16mat4x3(v.tint_symbol_1_col0, v.tint_symbol_1_col1, v.tint_symbol_1_col2, v.tint_symbol_1_col3);
+ tint_store_and_preserve_padding(v_1.tint_symbol_3, x);
}
diff --git a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.glsl
index 4528499..8ce4a72 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.glsl
@@ -1,7 +1,16 @@
#version 310 es
-uniform mat4x3 u;
-mat4x3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ vec3 tint_symbol_1_col0;
+ vec3 tint_symbol_1_col1;
+ vec3 tint_symbol_1_col2;
+ vec3 tint_symbol_1_col3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat4x3 tint_symbol_3;
+} v_1;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,6 +19,6 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat4x3 x = u;
- tint_store_and_preserve_padding(s, x);
+ mat4x3 x = mat4x3(v.tint_symbol_1_col0, v.tint_symbol_1_col1, v.tint_symbol_1_col2, v.tint_symbol_1_col3);
+ tint_store_and_preserve_padding(v_1.tint_symbol_3, x);
}
diff --git a/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.glsl
index cf0ec62..784d07a 100644
--- a/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.glsl
@@ -1,10 +1,19 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16mat4 u;
-f16mat4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ f16vec4 tint_symbol_1_col0;
+ f16vec4 tint_symbol_1_col1;
+ f16vec4 tint_symbol_1_col2;
+ f16vec4 tint_symbol_1_col3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16mat4 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16mat4 x = u;
- s = x;
+ f16mat4 x = f16mat4(v.tint_symbol_1_col0, v.tint_symbol_1_col1, v.tint_symbol_1_col2, v.tint_symbol_1_col3);
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.glsl
index 7b86086..fce7cf7 100644
--- a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform mat4 u;
-mat4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ mat4 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ mat4 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat4 x = u;
- s = x;
+ mat4 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.glsl
index 9077225..c7534de 100644
--- a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.glsl
@@ -1,6 +1,17 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
+struct Inner_std140 {
+ float16_t scalar_f16;
+ f16vec3 vec3_f16;
+ f16vec4 mat2x4_f16_col0;
+ f16vec4 mat2x4_f16_col1;
+};
+
+struct S_std140 {
+ Inner_std140 inner;
+};
+
struct Inner {
float16_t scalar_f16;
f16vec3 vec3_f16;
@@ -11,8 +22,14 @@
Inner inner;
};
-uniform S u;
-S s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ S_std140 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ S tint_symbol_3;
+} v_1;
void tint_store_and_preserve_padding_1(inout Inner target, Inner value_param) {
target.scalar_f16 = value_param.scalar_f16;
target.vec3_f16 = value_param.vec3_f16;
@@ -21,8 +38,14 @@
void tint_store_and_preserve_padding(inout S target, S value_param) {
tint_store_and_preserve_padding_1(target.inner, value_param.inner);
}
+Inner tint_convert_Inner(Inner_std140 tint_input) {
+ return Inner(tint_input.scalar_f16, tint_input.vec3_f16, f16mat2x4(tint_input.mat2x4_f16_col0, tint_input.mat2x4_f16_col1));
+}
+S tint_convert_S(S_std140 tint_input) {
+ return S(tint_convert_Inner(tint_input.inner));
+}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- S x = u;
- tint_store_and_preserve_padding(s, x);
+ S x = tint_convert_S(v.tint_symbol_1);
+ tint_store_and_preserve_padding(v_1.tint_symbol_3, x);
}
diff --git a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.spvasm b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.spvasm
index e3abdd4..242565d 100644
--- a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.spvasm
+++ b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.spvasm
@@ -33,10 +33,10 @@
OpName %value_param "value_param"
OpName %tint_store_and_preserve_padding_0 "tint_store_and_preserve_padding"
OpName %value_param_0 "value_param"
- OpName %convert_S "convert_S"
- OpName %input "input"
- OpName %convert_Inner "convert_Inner"
- OpName %input_0 "input"
+ OpName %tint_convert_S "tint_convert_S"
+ OpName %tint_input "tint_input"
+ OpName %tint_convert_Inner "tint_convert_Inner"
+ OpName %tint_input_0 "tint_input"
OpMemberDecorate %Inner_std140 0 Offset 0
OpMemberDecorate %Inner_std140 1 Offset 8
OpMemberDecorate %Inner_std140 2 Offset 16
@@ -90,7 +90,7 @@
%18 = OpLabel
%19 = OpAccessChain %_ptr_Uniform_S_std140 %1 %uint_0
%23 = OpLoad %S_std140 %19 None
- %x = OpFunctionCall %S %convert_S %23
+ %x = OpFunctionCall %S %tint_convert_S %23
%26 = OpFunctionCall %void %tint_store_and_preserve_padding %x
OpReturn
OpFunctionEnd
@@ -115,21 +115,21 @@
OpStore %44 %47 None
OpReturn
OpFunctionEnd
- %convert_S = OpFunction %S None %49
- %input = OpFunctionParameter %S_std140
+%tint_convert_S = OpFunction %S None %49
+ %tint_input = OpFunctionParameter %S_std140
%50 = OpLabel
- %51 = OpCompositeExtract %Inner_std140 %input 0
- %52 = OpFunctionCall %Inner %convert_Inner %51
+ %51 = OpCompositeExtract %Inner_std140 %tint_input 0
+ %52 = OpFunctionCall %Inner %tint_convert_Inner %51
%54 = OpCompositeConstruct %S %52
OpReturnValue %54
OpFunctionEnd
-%convert_Inner = OpFunction %Inner None %56
- %input_0 = OpFunctionParameter %Inner_std140
+%tint_convert_Inner = OpFunction %Inner None %56
+%tint_input_0 = OpFunctionParameter %Inner_std140
%57 = OpLabel
- %58 = OpCompositeExtract %half %input_0 0
- %59 = OpCompositeExtract %v3half %input_0 1
- %60 = OpCompositeExtract %v4half %input_0 2
- %61 = OpCompositeExtract %v4half %input_0 3
+ %58 = OpCompositeExtract %half %tint_input_0 0
+ %59 = OpCompositeExtract %v3half %tint_input_0 1
+ %60 = OpCompositeExtract %v4half %tint_input_0 2
+ %61 = OpCompositeExtract %v4half %tint_input_0 3
%62 = OpCompositeConstruct %mat2v4half %60 %61
%63 = OpCompositeConstruct %Inner %58 %59 %62
OpReturnValue %63
diff --git a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.glsl
index 49bb17e..70bad9d 100644
--- a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.glsl
@@ -10,8 +10,14 @@
Inner inner;
};
-uniform S u;
-S s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ S tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ S tint_symbol_3;
+} v_1;
void tint_store_and_preserve_padding_1(inout Inner target, Inner value_param) {
target.scalar_f32 = value_param.scalar_f32;
target.vec3_f32 = value_param.vec3_f32;
@@ -22,6 +28,6 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- S x = u;
- tint_store_and_preserve_padding(s, x);
+ S x = v.tint_symbol_1;
+ tint_store_and_preserve_padding(v_1.tint_symbol_3, x);
}
diff --git a/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.glsl
index 92e633b..5cb8331 100644
--- a/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform uint u;
-uint s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ uint tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ uint tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- uint x = u;
- s = x;
+ uint x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.glsl
index f0e4d3d..d67656f 100644
--- a/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.glsl
@@ -1,10 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16vec2 u;
-f16vec2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ f16vec2 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16vec2 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16vec2 x = u;
- s = x;
+ f16vec2 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.glsl
index 972227c..1a38a18 100644
--- a/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform vec2 u;
-vec2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ vec2 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ vec2 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- vec2 x = u;
- s = x;
+ vec2 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.glsl
index f76b548..99f7fa3 100644
--- a/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform ivec2 u;
-ivec2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ ivec2 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ ivec2 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- ivec2 x = u;
- s = x;
+ ivec2 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.glsl
index 89d0c13..4723160 100644
--- a/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform uvec2 u;
-uvec2 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ uvec2 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ uvec2 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- uvec2 x = u;
- s = x;
+ uvec2 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.glsl
index 07ae635..5e794fc 100644
--- a/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.glsl
@@ -1,10 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16vec3 u;
-f16vec3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ f16vec3 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16vec3 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16vec3 x = u;
- s = x;
+ f16vec3 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.glsl
index 9e20ea5..26b18cf 100644
--- a/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform vec3 u;
-vec3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ vec3 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ vec3 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- vec3 x = u;
- s = x;
+ vec3 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.glsl
index 5200539..115cd29 100644
--- a/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform ivec3 u;
-ivec3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ ivec3 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ ivec3 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- ivec3 x = u;
- s = x;
+ ivec3 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.glsl
index 5cd7919..82d5392 100644
--- a/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform uvec3 u;
-uvec3 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ uvec3 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ uvec3 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- uvec3 x = u;
- s = x;
+ uvec3 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.glsl
index e44c6dc..f85c1da 100644
--- a/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.glsl
@@ -1,10 +1,16 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-uniform f16vec4 u;
-f16vec4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ f16vec4 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ f16vec4 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- f16vec4 x = u;
- s = x;
+ f16vec4 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.glsl
index 718fb42..2f88e33 100644
--- a/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform vec4 u;
-vec4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ vec4 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ vec4 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- vec4 x = u;
- s = x;
+ vec4 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.glsl
index ed48ef5..a44678a 100644
--- a/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform ivec4 u;
-ivec4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ ivec4 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ ivec4 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- ivec4 x = u;
- s = x;
+ ivec4 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.glsl
index f113bd4..5532079 100644
--- a/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.glsl
@@ -1,9 +1,15 @@
#version 310 es
-uniform uvec4 u;
-uvec4 s;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ uvec4 tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ uvec4 tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- uvec4 x = u;
- s = x;
+ uvec4 x = v.tint_symbol_1;
+ v_1.tint_symbol_3 = x;
}
diff --git a/test/tint/bug/chromium/1367602_storage_space.wgsl.expected.ir.glsl b/test/tint/bug/chromium/1367602_storage_space.wgsl.expected.ir.glsl
index 7d185ec..700e737 100644
--- a/test/tint/bug/chromium/1367602_storage_space.wgsl.expected.ir.glsl
+++ b/test/tint/bug/chromium/1367602_storage_space.wgsl.expected.ir.glsl
@@ -4,8 +4,14 @@
float a[1000000];
};
-int v[1000000];
-A b;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol[1000000];
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_3_1_ssbo {
+ A tint_symbol_2;
+} v_2;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
diff --git a/test/tint/bug/chromium/342840932.wgsl.expected.ir.glsl b/test/tint/bug/chromium/342840932.wgsl.expected.ir.glsl
index 64d7c5f..d77fc04 100644
--- a/test/tint/bug/chromium/342840932.wgsl.expected.ir.glsl
+++ b/test/tint/bug/chromium/342840932.wgsl.expected.ir.glsl
@@ -1,7 +1,7 @@
#version 310 es
-uniform highp readonly uimage1D image_dup_src;
-uniform highp writeonly uimage1D image_dst;
+layout(binding = 0, r32ui) uniform highp readonly uimage1D image_dup_src;
+layout(binding = 1, r32ui) uniform highp writeonly uimage1D image_dst;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
diff --git a/test/tint/bug/chromium/344265982.wgsl.expected.ir.glsl b/test/tint/bug/chromium/344265982.wgsl.expected.ir.glsl
index 2e2ea31..5d343c3 100644
--- a/test/tint/bug/chromium/344265982.wgsl.expected.ir.glsl
+++ b/test/tint/bug/chromium/344265982.wgsl.expected.ir.glsl
@@ -3,7 +3,10 @@
precision highp int;
-int tint_symbol[4];
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2[4];
+} v;
void foo() {
{
int i = 0;
@@ -12,7 +15,7 @@
} else {
break;
}
- switch(tint_symbol[i]) {
+ switch(v.tint_symbol_2[i]) {
case 1:
{
{
@@ -22,7 +25,7 @@
}
default:
{
- tint_symbol[i] = 2;
+ v.tint_symbol_2[i] = 2;
break;
}
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/read/function.wgsl.expected.ir.glsl b/test/tint/bug/fxc/dyn_array_idx/read/function.wgsl.expected.ir.glsl
index 7f748b2..5fbf49f 100644
--- a/test/tint/bug/fxc/dyn_array_idx/read/function.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/dyn_array_idx/read/function.wgsl.expected.ir.glsl
@@ -12,10 +12,16 @@
int data[64];
};
-uniform UBO ubo;
-Result result;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ UBO tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ Result tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
S s = S(int[64](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
- result.tint_symbol = s.data[ubo.dynamic_idx];
+ v_1.tint_symbol_3.tint_symbol = s.data[v.tint_symbol_1.dynamic_idx];
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.ir.glsl b/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.ir.glsl
index e533e4b..0833a9a 100644
--- a/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/dyn_array_idx/read/private.wgsl.expected.ir.glsl
@@ -12,10 +12,16 @@
int data[64];
};
-uniform UBO ubo;
-Result result;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ UBO tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ Result tint_symbol_3;
+} v_1;
S s = S(int[64](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- result.tint_symbol = s.data[ubo.dynamic_idx];
+ v_1.tint_symbol_3.tint_symbol = s.data[v.tint_symbol_1.dynamic_idx];
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.ir.glsl b/test/tint/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.ir.glsl
index dff4101..9f0cbf0 100644
--- a/test/tint/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/dyn_array_idx/read/storage.wgsl.expected.ir.glsl
@@ -12,10 +12,19 @@
int data[4];
};
-uniform UBO ubo;
-Result result;
-SSBO ssbo;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ UBO tint_symbol_1;
+} v;
+layout(binding = 2, std430)
+buffer tint_symbol_4_1_ssbo {
+ Result tint_symbol_3;
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ SSBO tint_symbol_5;
+} v_2;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- result.tint_symbol = ssbo.data[ubo.dynamic_idx];
+ v_1.tint_symbol_3.tint_symbol = v_2.tint_symbol_5.data[v.tint_symbol_1.dynamic_idx];
}
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 e081821..82d7909 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
@@ -9,9 +9,15 @@
int tint_symbol;
};
-uniform UBO ubo;
-Result result;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ UBO tint_symbol_1;
+} v;
+layout(binding = 2, std430)
+buffer tint_symbol_4_1_ssbo {
+ Result tint_symbol_3;
+} v_1;
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;
+ v_1.tint_symbol_3.tint_symbol = v.tint_symbol_1.data[v.tint_symbol_1.dynamic_idx].x;
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/write/function.wgsl.expected.ir.glsl b/test/tint/bug/fxc/dyn_array_idx/write/function.wgsl.expected.ir.glsl
index 1a1b227..8f74455 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/function.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/function.wgsl.expected.ir.glsl
@@ -12,11 +12,17 @@
int data[64];
};
-uniform UBO ubo;
-Result result;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ UBO tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ Result tint_symbol_3;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
S s = S(int[64](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
- s.data[ubo.dynamic_idx] = 1;
- result.tint_symbol = s.data[3];
+ s.data[v.tint_symbol_1.dynamic_idx] = 1;
+ v_1.tint_symbol_3.tint_symbol = s.data[3];
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.ir.glsl b/test/tint/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.ir.glsl
index 266b970..960abde 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/function_via_param.wgsl.expected.ir.glsl
@@ -12,14 +12,20 @@
int data[64];
};
-uniform UBO ubo;
-Result result;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ UBO tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ Result tint_symbol_3;
+} v_1;
void x(inout S p) {
- p.data[ubo.dynamic_idx] = 1;
+ p.data[v.tint_symbol_1.dynamic_idx] = 1;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
S s = S(int[64](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
x(s);
- result.tint_symbol = s.data[3];
+ v_1.tint_symbol_3.tint_symbol = s.data[3];
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.ir.glsl b/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.ir.glsl
index 54e294e..cb34e38 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/private.wgsl.expected.ir.glsl
@@ -12,11 +12,17 @@
int data[64];
};
-uniform UBO ubo;
-Result result;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ UBO tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ Result tint_symbol_3;
+} v_1;
S s = S(int[64](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- s.data[ubo.dynamic_idx] = 1;
- result.tint_symbol = s.data[3];
+ s.data[v.tint_symbol_1.dynamic_idx] = 1;
+ v_1.tint_symbol_3.tint_symbol = s.data[3];
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.ir.glsl b/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.ir.glsl
index c4c2296..3900161 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/private_via_param.wgsl.expected.ir.glsl
@@ -12,14 +12,20 @@
int data[64];
};
-uniform UBO ubo;
-Result result;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ UBO tint_symbol_1;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_4_1_ssbo {
+ Result tint_symbol_3;
+} v_1;
S s = S(int[64](0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
void x(inout S p) {
- p.data[ubo.dynamic_idx] = 1;
+ p.data[v.tint_symbol_1.dynamic_idx] = 1;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
x(s);
- result.tint_symbol = s.data[3];
+ v_1.tint_symbol_3.tint_symbol = s.data[3];
}
diff --git a/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.glsl b/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.glsl
index a36f8c6..f0f4b47 100644
--- a/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/dyn_array_idx/write/storage.wgsl.expected.ir.glsl
@@ -12,11 +12,20 @@
int data[4];
};
-uniform UBO ubo;
-Result result;
-SSBO ssbo;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ UBO tint_symbol_1;
+} v;
+layout(binding = 2, std430)
+buffer tint_symbol_4_1_ssbo {
+ Result tint_symbol_3;
+} v_1;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ SSBO tint_symbol_5;
+} v_2;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- ssbo.data[ubo.dynamic_idx] = 1;
- result.tint_symbol = ssbo.data[3];
+ v_2.tint_symbol_5.data[v.tint_symbol_1.dynamic_idx] = 1;
+ v_1.tint_symbol_3.tint_symbol = v_2.tint_symbol_5.data[3];
}
diff --git a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.glsl b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.glsl
index 90920eb..09ff468 100644
--- a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
struct Particle {
@@ -9,27 +7,20 @@
vec3 velocity;
};
-struct Particles {
- Particle p[];
-};
-
struct Simulation {
uint i;
};
-Particles particles;
-uniform Simulation sim;
+layout(binding = 3, std430)
+buffer Particles_1_ssbo {
+ Particle p[];
+} particles;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Simulation tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
Particle particle = particles.p[0];
- particle.position[sim.i] = particle.position[sim.i];
+ particle.position[v.tint_symbol_1.i] = particle.position[v.tint_symbol_1.i];
}
-error: Error parsing GLSL shader:
-ERROR: 0:11: '' : array size required
-ERROR: 0:12: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
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 a0caab4..791e424 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
@@ -5,9 +5,12 @@
uint j;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v;
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;
+ m1[v.tint_symbol_1.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 497c41c..effd110 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
@@ -5,9 +5,12 @@
uint j;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v;
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;
+ m1[v.tint_symbol_1.i][v.tint_symbol_1.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 6989480..3f519b5 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
@@ -5,9 +5,12 @@
uint j;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v;
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;
+ m1[0][v.tint_symbol_1.j] = 1.0f;
}
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.glsl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.glsl
index e1a17ed..d785f09 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.glsl
@@ -5,9 +5,12 @@
uint j;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v;
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] = vec4(1.0f);
+ m1[v.tint_symbol_1.i] = vec4(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 dae10e8..49ff668 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
@@ -5,9 +5,12 @@
uint j;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v;
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;
+ m1[v.tint_symbol_1.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 3a421fb..6f00c1a 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
@@ -5,9 +5,12 @@
uint j;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v;
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;
+ m1[v.tint_symbol_1.i][v.tint_symbol_1.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 6989480..3f519b5 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
@@ -5,9 +5,12 @@
uint j;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v;
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;
+ m1[0][v.tint_symbol_1.j] = 1.0f;
}
diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.glsl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.glsl
index 79c183c..1db966f 100644
--- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.glsl
+++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.glsl
@@ -5,9 +5,12 @@
uint j;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v;
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] = vec4(1.0f);
+ m1[v.tint_symbol_1.i] = vec4(1.0f);
}
diff --git a/test/tint/bug/tint/1136.wgsl.expected.ir.glsl b/test/tint/bug/tint/1136.wgsl.expected.ir.glsl
index 53a5bafd..ee4a0e8 100644
--- a/test/tint/bug/tint/1136.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1136.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
uint data;
};
-Buffer tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ Buffer tint_symbol_2;
+} v;
void tint_symbol_1() {
- tint_symbol.data = (tint_symbol.data + 1u);
+ v.tint_symbol_2.data = (v.tint_symbol_2.data + 1u);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/bug/tint/1385.wgsl.expected.ir.glsl b/test/tint/bug/tint/1385.wgsl.expected.ir.glsl
index f37b41e..62624fa 100644
--- a/test/tint/bug/tint/1385.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1385.wgsl.expected.ir.glsl
@@ -1,20 +1,13 @@
-SKIP: FAILED
-
#version 310 es
-int data[];
+layout(binding = 1, std430)
+buffer tint_symbol_2_1_ssbo {
+ int tint_symbol_1[];
+} v;
int foo() {
- return data[0];
+ return v.tint_symbol_1[0];
}
layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in;
void main() {
foo();
}
-error: Error parsing GLSL shader:
-ERROR: 0:3: '' : array size required
-ERROR: 1 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/bug/tint/1474-b.wgsl.expected.ir.glsl b/test/tint/bug/tint/1474-b.wgsl.expected.ir.glsl
index 9b65f0c..c651b9c 100644
--- a/test/tint/bug/tint/1474-b.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1474-b.wgsl.expected.ir.glsl
@@ -4,7 +4,10 @@
#version 310 es
-int non_uniform_value;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ int tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
diff --git a/test/tint/bug/tint/1538.wgsl.expected.ir.glsl b/test/tint/bug/tint/1538.wgsl.expected.ir.glsl
index 9eaf0fe..cec32aa 100644
--- a/test/tint/bug/tint/1538.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1538.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-uint buf[1];
+layout(binding = 1, std430)
+buffer tint_symbol_2_1_ssbo {
+ uint tint_symbol_1[1];
+} v;
int g() {
return 0;
}
@@ -18,11 +21,11 @@
void main() {
{
while(true) {
- if ((buf[0] == 0u)) {
+ if ((v.tint_symbol_1[0] == 0u)) {
break;
}
int s = f();
- buf[0] = 0u;
+ v.tint_symbol_1[0] = 0u;
{
}
continue;
diff --git a/test/tint/bug/tint/1542.wgsl.expected.ir.glsl b/test/tint/bug/tint/1542.wgsl.expected.ir.glsl
index 90a054e..86e2765 100644
--- a/test/tint/bug/tint/1542.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1542.wgsl.expected.ir.glsl
@@ -4,8 +4,11 @@
ivec3 d;
};
-uniform UniformBuffer u_input;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ UniformBuffer tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- ivec3 temp = (u_input.d << (uvec3(0u) & uvec3(31u)));
+ ivec3 temp = (v.tint_symbol_1.d << (uvec3(0u) & uvec3(31u)));
}
diff --git a/test/tint/bug/tint/1557.wgsl.expected.ir.glsl b/test/tint/bug/tint/1557.wgsl.expected.ir.glsl
index 8b34167..28ef300 100644
--- a/test/tint/bug/tint/1557.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1557.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-uniform int u;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ int tint_symbol_1;
+} v;
int f() {
return 0;
}
@@ -21,10 +24,10 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- switch(u) {
+ switch(v.tint_symbol_1) {
case 0:
{
- switch(u) {
+ switch(v.tint_symbol_1) {
case 0:
{
break;
diff --git a/test/tint/bug/tint/1604.wgsl.expected.ir.glsl b/test/tint/bug/tint/1604.wgsl.expected.ir.glsl
index 9313d17..afad50f 100644
--- a/test/tint/bug/tint/1604.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1604.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
-uniform int x;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ int tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- switch(x) {
+ switch(v.tint_symbol_1) {
case 0:
{
{
diff --git a/test/tint/bug/tint/1605.wgsl.expected.ir.glsl b/test/tint/bug/tint/1605.wgsl.expected.ir.glsl
index 743f623..1f705f2 100644
--- a/test/tint/bug/tint/1605.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1605.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-uniform int b;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ int tint_symbol_1;
+} v;
bool func_3() {
{
int i = 0;
while(true) {
- if ((i < b)) {
+ if ((i < v.tint_symbol_1)) {
} else {
break;
}
diff --git a/test/tint/bug/tint/1660.wgsl.expected.ir.glsl b/test/tint/bug/tint/1660.wgsl.expected.ir.glsl
index 438d7b7..ba0a98e 100644
--- a/test/tint/bug/tint/1660.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1660.wgsl.expected.ir.glsl
@@ -1,6 +1,6 @@
#version 310 es
-float a[2];
+shared float a[2];
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
diff --git a/test/tint/bug/tint/1666.wgsl.expected.ir.glsl b/test/tint/bug/tint/1666.wgsl.expected.ir.glsl
index 0d19887..98d0454 100644
--- a/test/tint/bug/tint/1666.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1666.wgsl.expected.ir.glsl
@@ -1,8 +1,9 @@
-SKIP: FAILED
-
#version 310 es
-float rarr[];
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol[];
+} v;
void vector() {
int idx = 3;
int x = ivec2(1, 2)[idx];
@@ -18,7 +19,7 @@
}
void runtime_size_array() {
int idx = -1;
- float x = rarr[idx];
+ float x = v.tint_symbol[idx];
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
@@ -27,11 +28,3 @@
fixed_size_array();
runtime_size_array();
}
-error: Error parsing GLSL shader:
-ERROR: 0:3: '' : array size required
-ERROR: 1 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/bug/tint/1735.wgsl.expected.ir.glsl b/test/tint/bug/tint/1735.wgsl.expected.ir.glsl
index 8f7f9ee..010b718 100644
--- a/test/tint/bug/tint/1735.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1735.wgsl.expected.ir.glsl
@@ -4,9 +4,15 @@
float f;
};
-S tint_symbol;
-S tint_symbol_1;
+layout(binding = 0, std430)
+buffer tint_symbol_4_1_ssbo {
+ S tint_symbol_3;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_6_1_ssbo {
+ S tint_symbol_5;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_1 = tint_symbol;
+ v_1.tint_symbol_5 = v.tint_symbol_3;
}
diff --git a/test/tint/bug/tint/1737.wgsl.expected.ir.glsl b/test/tint/bug/tint/1737.wgsl.expected.ir.glsl
index cb0e2ed..28d2045 100644
--- a/test/tint/bug/tint/1737.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1737.wgsl.expected.ir.glsl
@@ -1,7 +1,7 @@
#version 310 es
-float a[10];
-float b[20];
+shared float a[10];
+shared float b[20];
void f() {
float x = a[0];
float y = b[0];
diff --git a/test/tint/bug/tint/1739.wgsl.expected.spvasm b/test/tint/bug/tint/1739.wgsl.expected.spvasm
index c86722c..aac484c 100644
--- a/test/tint/bug/tint/1739.wgsl.expected.spvasm
+++ b/test/tint/bug/tint/1739.wgsl.expected.spvasm
@@ -69,8 +69,8 @@
OpName %tint_GammaCorrection "tint_GammaCorrection"
OpName %v "v"
OpName %params_0 "params"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpDecorate %t_plane0 DescriptorSet 0
OpDecorate %t_plane0 Binding 0
OpDecorate %t_plane1 DescriptorSet 0
@@ -189,7 +189,7 @@
%25 = OpLoad %3 %t_plane1 None
%26 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %6 %uint_0
%29 = OpLoad %tint_ExternalTextureParams_std140 %26 None
- %30 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %29
+ %30 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %29
%35 = OpCompositeExtract %v2uint %30 12
%36 = OpIAdd %v2uint %35 %37
%39 = OpISub %v2uint %36 %37
@@ -204,7 +204,7 @@
%56 = OpLoad %3 %t_plane1 None
%57 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %6 %uint_0
%58 = OpLoad %tint_ExternalTextureParams_std140 %57 None
- %59 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %58
+ %59 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %58
%60 = OpCompositeExtract %v2uint %59 12
%61 = OpIAdd %v2uint %60 %37
%62 = OpISub %v2uint %61 %37
@@ -304,32 +304,32 @@
%154 = OpSelect %v3float %141 %146 %153
OpReturnValue %154
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %156
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %156
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%157 = OpLabel
- %158 = OpCompositeExtract %uint %input 0
- %159 = OpCompositeExtract %uint %input 1
- %160 = OpCompositeExtract %mat3v4float %input 2
- %161 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %162 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %163 = OpCompositeExtract %v3float %input 5
- %164 = OpCompositeExtract %v3float %input 6
- %165 = OpCompositeExtract %v3float %input 7
+ %158 = OpCompositeExtract %uint %tint_input 0
+ %159 = OpCompositeExtract %uint %tint_input 1
+ %160 = OpCompositeExtract %mat3v4float %tint_input 2
+ %161 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %162 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %163 = OpCompositeExtract %v3float %tint_input 5
+ %164 = OpCompositeExtract %v3float %tint_input 6
+ %165 = OpCompositeExtract %v3float %tint_input 7
%166 = OpCompositeConstruct %mat3v3float %163 %164 %165
- %167 = OpCompositeExtract %v2float %input 8
- %168 = OpCompositeExtract %v2float %input 9
- %169 = OpCompositeExtract %v2float %input 10
+ %167 = OpCompositeExtract %v2float %tint_input 8
+ %168 = OpCompositeExtract %v2float %tint_input 9
+ %169 = OpCompositeExtract %v2float %tint_input 10
%170 = OpCompositeConstruct %mat3v2float %167 %168 %169
- %171 = OpCompositeExtract %v2float %input 11
- %172 = OpCompositeExtract %v2float %input 12
- %173 = OpCompositeExtract %v2float %input 13
+ %171 = OpCompositeExtract %v2float %tint_input 11
+ %172 = OpCompositeExtract %v2float %tint_input 12
+ %173 = OpCompositeExtract %v2float %tint_input 13
%174 = OpCompositeConstruct %mat3v2float %171 %172 %173
- %175 = OpCompositeExtract %v2float %input 14
- %176 = OpCompositeExtract %v2float %input 15
- %177 = OpCompositeExtract %v2float %input 16
- %178 = OpCompositeExtract %v2float %input 17
- %179 = OpCompositeExtract %v2uint %input 18
- %180 = OpCompositeExtract %v2float %input 19
+ %175 = OpCompositeExtract %v2float %tint_input 14
+ %176 = OpCompositeExtract %v2float %tint_input 15
+ %177 = OpCompositeExtract %v2float %tint_input 16
+ %178 = OpCompositeExtract %v2float %tint_input 17
+ %179 = OpCompositeExtract %v2uint %tint_input 18
+ %180 = OpCompositeExtract %v2float %tint_input 19
%181 = OpCompositeConstruct %tint_ExternalTextureParams %158 %159 %160 %161 %162 %166 %170 %174 %175 %176 %177 %178 %179 %180
OpReturnValue %181
OpFunctionEnd
diff --git a/test/tint/bug/tint/1776.spvasm.expected.ir.glsl b/test/tint/bug/tint/1776.spvasm.expected.ir.glsl
index 2c53a7e..90721d2 100644
--- a/test/tint/bug/tint/1776.spvasm.expected.ir.glsl
+++ b/test/tint/bug/tint/1776.spvasm.expected.ir.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
struct S {
@@ -7,11 +5,10 @@
int b;
};
-struct sb_block {
+layout(binding = 0, std430)
+buffer sb_block_1_ssbo {
S inner[];
-};
-
-sb_block sb;
+} sb;
void main_1() {
S x_18 = sb.inner[1];
}
@@ -19,12 +16,3 @@
void main() {
main_1();
}
-error: Error parsing GLSL shader:
-ERROR: 0:9: '' : array size required
-ERROR: 0:10: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/bug/tint/1776.wgsl.expected.ir.glsl b/test/tint/bug/tint/1776.wgsl.expected.ir.glsl
index 85c525a..35c62f9 100644
--- a/test/tint/bug/tint/1776.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1776.wgsl.expected.ir.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
struct S {
@@ -7,16 +5,11 @@
int b;
};
-S sb[];
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ S tint_symbol_1[];
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- S x = sb[1];
+ S x = v.tint_symbol_1[1];
}
-error: Error parsing GLSL shader:
-ERROR: 0:8: '' : array size required
-ERROR: 1 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/bug/tint/1875.wgsl.expected.ir.glsl b/test/tint/bug/tint/1875.wgsl.expected.ir.glsl
index 2474d6d..750373f 100644
--- a/test/tint/bug/tint/1875.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/1875.wgsl.expected.ir.glsl
@@ -1,13 +1,10 @@
-SKIP: FAILED
-
#version 310 es
-struct Outputs {
- uint data[];
-};
-
uint count = 0u;
-Outputs outputs;
+layout(binding = 1, std430)
+buffer Outputs_1_ssbo {
+ uint data[];
+} outputs;
void push_output(uint value) {
outputs.data[count] = value;
count = (count + 1u);
@@ -24,12 +21,3 @@
push_output(b);
push_output(c);
}
-error: Error parsing GLSL shader:
-ERROR: 0:4: '' : array size required
-ERROR: 0:5: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/bug/tint/2029.wgsl.expected.ir.glsl b/test/tint/bug/tint/2029.wgsl.expected.ir.glsl
index 2a4b7bf..87fc1c3 100644
--- a/test/tint/bug/tint/2029.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/2029.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-ivec3 s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ ivec3 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- s = ivec3(1);
+ v.tint_symbol_1 = ivec3(1);
}
diff --git a/test/tint/bug/tint/2038.wgsl.expected.ir.glsl b/test/tint/bug/tint/2038.wgsl.expected.ir.glsl
index dc87bf8..6ee577e 100644
--- a/test/tint/bug/tint/2038.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/2038.wgsl.expected.ir.glsl
@@ -1,12 +1,15 @@
#version 310 es
-uint tint_symbol[2];
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ uint tint_symbol_2[2];
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
if (false) {
- tint_symbol[0] = 1u;
+ v.tint_symbol_2[0] = 1u;
}
if (false) {
- tint_symbol[1] = 1u;
+ v.tint_symbol_2[1] = 1u;
}
}
diff --git a/test/tint/bug/tint/2039.wgsl.expected.ir.glsl b/test/tint/bug/tint/2039.wgsl.expected.ir.glsl
index d425d63..cca3418 100644
--- a/test/tint/bug/tint/2039.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/2039.wgsl.expected.ir.glsl
@@ -5,19 +5,24 @@
uint tint_symbol_1 = 0u;
{
while(true) {
+ bool tint_continue = false;
switch(2) {
case 1:
{
- {
- if (true) { break; }
- }
- continue;
+ tint_continue = true;
+ break;
}
default:
{
break;
}
}
+ if (tint_continue) {
+ {
+ if (true) { break; }
+ }
+ continue;
+ }
tint_symbol_1 = (tint_symbol_1 + 1u);
{
if (true) { break; }
diff --git a/test/tint/bug/tint/2076.wgsl.expected.ir.glsl b/test/tint/bug/tint/2076.wgsl.expected.ir.glsl
index b771681..b4e0760 100644
--- a/test/tint/bug/tint/2076.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/2076.wgsl.expected.ir.glsl
@@ -1,11 +1,46 @@
-SKIP: FAILED
+#version 310 es
-<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:585 internal compiler error: Switch() matched no cases. Type: tint::core::type::Sampler
-********************************************************************
-* 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 tint_GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
-tint executable returned error: signal: trace/BPT trap
+struct tint_ExternalTextureParams_std140 {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ mat3x4 yuvToRgbConversionMatrix;
+ tint_GammaTransferParams gammaDecodeParams;
+ tint_GammaTransferParams gammaEncodeParams;
+ vec3 gamutConversionMatrix_col0;
+ vec3 gamutConversionMatrix_col1;
+ vec3 gamutConversionMatrix_col2;
+ vec2 sampleTransform_col0;
+ vec2 sampleTransform_col1;
+ vec2 sampleTransform_col2;
+ vec2 loadTransform_col0;
+ vec2 loadTransform_col1;
+ vec2 loadTransform_col2;
+ vec2 samplePlane0RectMin;
+ vec2 samplePlane0RectMax;
+ vec2 samplePlane1RectMin;
+ vec2 samplePlane1RectMax;
+ uvec2 visibleSize;
+ vec2 plane1CoordFactor;
+};
+
+uniform highp sampler2D randomTexture_plane0;
+uniform highp sampler2D randomTexture_plane1;
+layout(binding = 4, std140)
+uniform tint_symbol_1_std140_1_ubo {
+ tint_ExternalTextureParams_std140 tint_symbol;
+} v;
+uniform highp sampler2D depthTexture;
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+}
diff --git a/test/tint/bug/tint/2175.wgsl.expected.ir.glsl b/test/tint/bug/tint/2175.wgsl.expected.ir.glsl
index e750375..bb3a1c5 100644
--- a/test/tint/bug/tint/2175.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/2175.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-uint tint_symbol_2;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ uint tint_symbol;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol_2 = 0u;
+ v.tint_symbol = 0u;
}
diff --git a/test/tint/bug/tint/2237.wgsl.expected.ir.glsl b/test/tint/bug/tint/2237.wgsl.expected.ir.glsl
index 130260d..14171e5 100644
--- a/test/tint/bug/tint/2237.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/2237.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-uint tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ uint tint_symbol_2;
+} v_1;
uint foo() {
- return uint[4](0u, 1u, 2u, 4u)[tint_symbol];
+ return uint[4](0u, 1u, 2u, 4u)[v_1.tint_symbol_2];
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- uint v = uint[4](0u, 1u, 2u, 4u)[tint_symbol];
- tint_symbol = (v + foo());
+ uint v = uint[4](0u, 1u, 2u, 4u)[v_1.tint_symbol_2];
+ v_1.tint_symbol_2 = (v + foo());
}
diff --git a/test/tint/bug/tint/294.wgsl.expected.ir.glsl b/test/tint/bug/tint/294.wgsl.expected.ir.glsl
index f302236..24ddd33 100644
--- a/test/tint/bug/tint/294.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/294.wgsl.expected.ir.glsl
@@ -5,11 +5,10 @@
vec3 colour;
};
-struct Lights {
+layout(binding = 1, std430)
+buffer Lights_1_ssbo {
Light light[];
-};
-
-Lights lights;
+} lights;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
diff --git a/test/tint/bug/tint/349310442.wgsl.expected.spvasm b/test/tint/bug/tint/349310442.wgsl.expected.spvasm
index e873080..7c65e7b 100644
--- a/test/tint/bug/tint/349310442.wgsl.expected.spvasm
+++ b/test/tint/bug/tint/349310442.wgsl.expected.spvasm
@@ -67,8 +67,8 @@
OpName %tint_GammaCorrection "tint_GammaCorrection"
OpName %v "v"
OpName %params_0 "params"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpDecorate %t_plane0 DescriptorSet 0
OpDecorate %t_plane0 Binding 0
OpDecorate %t_plane1 DescriptorSet 0
@@ -171,7 +171,7 @@
%22 = OpLoad %3 %t_plane1 None
%23 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %6 %uint_0
%26 = OpLoad %tint_ExternalTextureParams_std140 %23 None
- %27 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %26
+ %27 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %26
%32 = OpBitcast %v2uint %33
%36 = OpFunctionCall %v4float %tint_TextureLoadExternal %21 %22 %27 %32
OpStore %r %36
@@ -264,32 +264,32 @@
%120 = OpSelect %v3float %107 %112 %119
OpReturnValue %120
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %122
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %122
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%123 = OpLabel
- %124 = OpCompositeExtract %uint %input 0
- %125 = OpCompositeExtract %uint %input 1
- %126 = OpCompositeExtract %mat3v4float %input 2
- %127 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %128 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %129 = OpCompositeExtract %v3float %input 5
- %130 = OpCompositeExtract %v3float %input 6
- %131 = OpCompositeExtract %v3float %input 7
+ %124 = OpCompositeExtract %uint %tint_input 0
+ %125 = OpCompositeExtract %uint %tint_input 1
+ %126 = OpCompositeExtract %mat3v4float %tint_input 2
+ %127 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %128 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %129 = OpCompositeExtract %v3float %tint_input 5
+ %130 = OpCompositeExtract %v3float %tint_input 6
+ %131 = OpCompositeExtract %v3float %tint_input 7
%132 = OpCompositeConstruct %mat3v3float %129 %130 %131
- %133 = OpCompositeExtract %v2float %input 8
- %134 = OpCompositeExtract %v2float %input 9
- %135 = OpCompositeExtract %v2float %input 10
+ %133 = OpCompositeExtract %v2float %tint_input 8
+ %134 = OpCompositeExtract %v2float %tint_input 9
+ %135 = OpCompositeExtract %v2float %tint_input 10
%136 = OpCompositeConstruct %mat3v2float %133 %134 %135
- %137 = OpCompositeExtract %v2float %input 11
- %138 = OpCompositeExtract %v2float %input 12
- %139 = OpCompositeExtract %v2float %input 13
+ %137 = OpCompositeExtract %v2float %tint_input 11
+ %138 = OpCompositeExtract %v2float %tint_input 12
+ %139 = OpCompositeExtract %v2float %tint_input 13
%140 = OpCompositeConstruct %mat3v2float %137 %138 %139
- %141 = OpCompositeExtract %v2float %input 14
- %142 = OpCompositeExtract %v2float %input 15
- %143 = OpCompositeExtract %v2float %input 16
- %144 = OpCompositeExtract %v2float %input 17
- %145 = OpCompositeExtract %v2uint %input 18
- %146 = OpCompositeExtract %v2float %input 19
+ %141 = OpCompositeExtract %v2float %tint_input 14
+ %142 = OpCompositeExtract %v2float %tint_input 15
+ %143 = OpCompositeExtract %v2float %tint_input 16
+ %144 = OpCompositeExtract %v2float %tint_input 17
+ %145 = OpCompositeExtract %v2uint %tint_input 18
+ %146 = OpCompositeExtract %v2float %tint_input 19
%147 = OpCompositeConstruct %tint_ExternalTextureParams %124 %125 %126 %127 %128 %132 %136 %140 %141 %142 %143 %144 %145 %146
OpReturnValue %147
OpFunctionEnd
diff --git a/test/tint/bug/tint/354627692.wgsl.expected.ir.glsl b/test/tint/bug/tint/354627692.wgsl.expected.ir.glsl
index bcdf974..eeac09f 100644
--- a/test/tint/bug/tint/354627692.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/354627692.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
-int tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- int i = tint_symbol;
+ int i = v.tint_symbol_2;
{
while(true) {
{
@@ -24,5 +27,5 @@
continue;
}
}
- tint_symbol = i;
+ v.tint_symbol_2 = i;
}
diff --git a/test/tint/bug/tint/369.wgsl.expected.ir.glsl b/test/tint/bug/tint/369.wgsl.expected.ir.glsl
index e7c17b7..22150c4 100644
--- a/test/tint/bug/tint/369.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/369.wgsl.expected.ir.glsl
@@ -4,8 +4,19 @@
mat2 m;
};
-S SSBO;
-uniform S UBO;
+struct S_std140 {
+ vec2 m_col0;
+ vec2 m_col1;
+};
+
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v;
+layout(binding = 0, std140)
+uniform tint_symbol_3_std140_1_ubo {
+ S_std140 tint_symbol_2;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
diff --git a/test/tint/bug/tint/998.wgsl.expected.ir.glsl b/test/tint/bug/tint/998.wgsl.expected.ir.glsl
index 9180a58..ec924ed 100644
--- a/test/tint/bug/tint/998.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/998.wgsl.expected.ir.glsl
@@ -8,9 +8,12 @@
uint data[3];
};
-uniform Constants constants;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ Constants tint_symbol_1;
+} v;
S s = S(uint[3](0u, 0u, 0u));
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- s.data[constants.zero] = 0u;
+ s.data[v.tint_symbol_1.zero] = 0u;
}
diff --git a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.ir.glsl
index f165a90..d9b52fd 100644
--- a/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdx/0763f7.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdx_0763f7() {
vec3 res = dFdx(vec3(1.0f));
return res;
}
void main() {
- prevent_dce = dpdx_0763f7();
+ v.tint_symbol = dpdx_0763f7();
}
diff --git a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.ir.glsl
index f4610ea..9ce8729 100644
--- a/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdx/99edb1.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdx_99edb1() {
vec2 res = dFdx(vec2(1.0f));
return res;
}
void main() {
- prevent_dce = dpdx_99edb1();
+ v.tint_symbol = dpdx_99edb1();
}
diff --git a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.ir.glsl
index fb638c0..96ed593 100644
--- a/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdx/c487fa.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdx_c487fa() {
vec4 res = dFdx(vec4(1.0f));
return res;
}
void main() {
- prevent_dce = dpdx_c487fa();
+ v.tint_symbol = dpdx_c487fa();
}
diff --git a/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.ir.glsl
index 95f8f13..966befb 100644
--- a/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdx/e263de.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdx_e263de() {
float res = dFdx(1.0f);
return res;
}
void main() {
- prevent_dce = dpdx_e263de();
+ v.tint_symbol = dpdx_e263de();
}
diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.ir.glsl
index 074b269..11b1d02 100644
--- a/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdxCoarse/029152.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdxCoarse_029152() {
float res = dFdx(1.0f);
return res;
}
void main() {
- prevent_dce = dpdxCoarse_029152();
+ v.tint_symbol = dpdxCoarse_029152();
}
diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.ir.glsl
index d8bade6..3f844a5 100644
--- a/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdxCoarse/9581cf.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdxCoarse_9581cf() {
vec2 res = dFdx(vec2(1.0f));
return res;
}
void main() {
- prevent_dce = dpdxCoarse_9581cf();
+ v.tint_symbol = dpdxCoarse_9581cf();
}
diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.ir.glsl
index 37c13a0..9f9b7e1 100644
--- a/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdxCoarse/c28641.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdxCoarse_c28641() {
vec4 res = dFdx(vec4(1.0f));
return res;
}
void main() {
- prevent_dce = dpdxCoarse_c28641();
+ v.tint_symbol = dpdxCoarse_c28641();
}
diff --git a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.ir.glsl
index f92c6d9..4f9c1e6 100644
--- a/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdxCoarse/f64d7b.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdxCoarse_f64d7b() {
vec3 res = dFdx(vec3(1.0f));
return res;
}
void main() {
- prevent_dce = dpdxCoarse_f64d7b();
+ v.tint_symbol = dpdxCoarse_f64d7b();
}
diff --git a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.ir.glsl
index e37c9d0..8d52a97 100644
--- a/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdxFine/8c5069.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdxFine_8c5069() {
vec4 res = dFdx(vec4(1.0f));
return res;
}
void main() {
- prevent_dce = dpdxFine_8c5069();
+ v.tint_symbol = dpdxFine_8c5069();
}
diff --git a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.ir.glsl
index 1898294..3bc9188 100644
--- a/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdxFine/9631de.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdxFine_9631de() {
vec2 res = dFdx(vec2(1.0f));
return res;
}
void main() {
- prevent_dce = dpdxFine_9631de();
+ v.tint_symbol = dpdxFine_9631de();
}
diff --git a/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.ir.glsl
index b28789a..94d76c7 100644
--- a/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdxFine/f401a2.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdxFine_f401a2() {
float res = dFdx(1.0f);
return res;
}
void main() {
- prevent_dce = dpdxFine_f401a2();
+ v.tint_symbol = dpdxFine_f401a2();
}
diff --git a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.ir.glsl
index b480f0b..8a8b822 100644
--- a/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdxFine/f92fb6.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdxFine_f92fb6() {
vec3 res = dFdx(vec3(1.0f));
return res;
}
void main() {
- prevent_dce = dpdxFine_f92fb6();
+ v.tint_symbol = dpdxFine_f92fb6();
}
diff --git a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.ir.glsl
index 336ff68..16fd347 100644
--- a/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdy/699a05.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdy_699a05() {
vec4 res = dFdy(vec4(1.0f));
return res;
}
void main() {
- prevent_dce = dpdy_699a05();
+ v.tint_symbol = dpdy_699a05();
}
diff --git a/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.ir.glsl
index e4093c0..6367bda 100644
--- a/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdy/7f8d84.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdy_7f8d84() {
float res = dFdy(1.0f);
return res;
}
void main() {
- prevent_dce = dpdy_7f8d84();
+ v.tint_symbol = dpdy_7f8d84();
}
diff --git a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.ir.glsl
index d2f8e85..4cafd6a 100644
--- a/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdy/a8b56e.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdy_a8b56e() {
vec2 res = dFdy(vec2(1.0f));
return res;
}
void main() {
- prevent_dce = dpdy_a8b56e();
+ v.tint_symbol = dpdy_a8b56e();
}
diff --git a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.ir.glsl
index 9dd3a62..7168320 100644
--- a/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdy/feb40f.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdy_feb40f() {
vec3 res = dFdy(vec3(1.0f));
return res;
}
void main() {
- prevent_dce = dpdy_feb40f();
+ v.tint_symbol = dpdy_feb40f();
}
diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.ir.glsl
index 143bbce..990ad38 100644
--- a/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdyCoarse/3e1ab4.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdyCoarse_3e1ab4() {
vec2 res = dFdy(vec2(1.0f));
return res;
}
void main() {
- prevent_dce = dpdyCoarse_3e1ab4();
+ v.tint_symbol = dpdyCoarse_3e1ab4();
}
diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.ir.glsl
index f1a6bef..6956bfb 100644
--- a/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdyCoarse/445d24.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdyCoarse_445d24() {
vec4 res = dFdy(vec4(1.0f));
return res;
}
void main() {
- prevent_dce = dpdyCoarse_445d24();
+ v.tint_symbol = dpdyCoarse_445d24();
}
diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.ir.glsl
index 578d8e6..f3db3ca 100644
--- a/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdyCoarse/870a7e.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdyCoarse_870a7e() {
float res = dFdy(1.0f);
return res;
}
void main() {
- prevent_dce = dpdyCoarse_870a7e();
+ v.tint_symbol = dpdyCoarse_870a7e();
}
diff --git a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.ir.glsl
index 77a677e..4b24344 100644
--- a/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdyCoarse/ae1873.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdyCoarse_ae1873() {
vec3 res = dFdy(vec3(1.0f));
return res;
}
void main() {
- prevent_dce = dpdyCoarse_ae1873();
+ v.tint_symbol = dpdyCoarse_ae1873();
}
diff --git a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.ir.glsl
index 52d77aa..a812f31 100644
--- a/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdyFine/1fb7ab.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdyFine_1fb7ab() {
vec3 res = dFdy(vec3(1.0f));
return res;
}
void main() {
- prevent_dce = dpdyFine_1fb7ab();
+ v.tint_symbol = dpdyFine_1fb7ab();
}
diff --git a/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.ir.glsl
index 9428fe2..66cc4ef 100644
--- a/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdyFine/6eb673.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdyFine_6eb673() {
float res = dFdy(1.0f);
return res;
}
void main() {
- prevent_dce = dpdyFine_6eb673();
+ v.tint_symbol = dpdyFine_6eb673();
}
diff --git a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.ir.glsl
index d0044d4..18abf01 100644
--- a/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdyFine/d0a648.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdyFine_d0a648() {
vec4 res = dFdy(vec4(1.0f));
return res;
}
void main() {
- prevent_dce = dpdyFine_d0a648();
+ v.tint_symbol = dpdyFine_d0a648();
}
diff --git a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.ir.glsl
index faa7912..6b2730e 100644
--- a/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/dpdyFine/df33aa.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdyFine_df33aa() {
vec2 res = dFdy(vec2(1.0f));
return res;
}
void main() {
- prevent_dce = dpdyFine_df33aa();
+ v.tint_symbol = dpdyFine_df33aa();
}
diff --git a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.ir.glsl
index 646a464..86fba35 100644
--- a/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidth/5d1b39.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 fwidth_5d1b39() {
vec3 res = fwidth(vec3(1.0f));
return res;
}
void main() {
- prevent_dce = fwidth_5d1b39();
+ v.tint_symbol = fwidth_5d1b39();
}
diff --git a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.ir.glsl
index 63f45e3..ad25226 100644
--- a/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidth/b83ebb.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 fwidth_b83ebb() {
vec2 res = fwidth(vec2(1.0f));
return res;
}
void main() {
- prevent_dce = fwidth_b83ebb();
+ v.tint_symbol = fwidth_b83ebb();
}
diff --git a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.ir.glsl
index cd6ea38..c650520 100644
--- a/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidth/d2ab9a.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 fwidth_d2ab9a() {
vec4 res = fwidth(vec4(1.0f));
return res;
}
void main() {
- prevent_dce = fwidth_d2ab9a();
+ v.tint_symbol = fwidth_d2ab9a();
}
diff --git a/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.ir.glsl
index 4ff9f77..18cb417 100644
--- a/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidth/df38ef.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float fwidth_df38ef() {
float res = fwidth(1.0f);
return res;
}
void main() {
- prevent_dce = fwidth_df38ef();
+ v.tint_symbol = fwidth_df38ef();
}
diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.ir.glsl
index 15430bd..f4f0a8f 100644
--- a/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidthCoarse/159c8a.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float fwidthCoarse_159c8a() {
float res = fwidth(1.0f);
return res;
}
void main() {
- prevent_dce = fwidthCoarse_159c8a();
+ v.tint_symbol = fwidthCoarse_159c8a();
}
diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.ir.glsl
index 9dfeaff..fdd1469 100644
--- a/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidthCoarse/1e59d9.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 fwidthCoarse_1e59d9() {
vec3 res = fwidth(vec3(1.0f));
return res;
}
void main() {
- prevent_dce = fwidthCoarse_1e59d9();
+ v.tint_symbol = fwidthCoarse_1e59d9();
}
diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.ir.glsl
index b48342f..4cfc7c3 100644
--- a/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidthCoarse/4e4fc4.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 fwidthCoarse_4e4fc4() {
vec4 res = fwidth(vec4(1.0f));
return res;
}
void main() {
- prevent_dce = fwidthCoarse_4e4fc4();
+ v.tint_symbol = fwidthCoarse_4e4fc4();
}
diff --git a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.ir.glsl
index 2883f0a..255e643 100644
--- a/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidthCoarse/e653f7.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 fwidthCoarse_e653f7() {
vec2 res = fwidth(vec2(1.0f));
return res;
}
void main() {
- prevent_dce = fwidthCoarse_e653f7();
+ v.tint_symbol = fwidthCoarse_e653f7();
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.glsl
index 9fa42f9..ad8cdd8 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/523fdc.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 fwidthFine_523fdc() {
vec3 res = fwidth(vec3(1.0f));
return res;
}
void main() {
- prevent_dce = fwidthFine_523fdc();
+ v.tint_symbol = fwidthFine_523fdc();
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.glsl
index 258ff1e..3089a23 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/68f4ef.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 fwidthFine_68f4ef() {
vec4 res = fwidth(vec4(1.0f));
return res;
}
void main() {
- prevent_dce = fwidthFine_68f4ef();
+ v.tint_symbol = fwidthFine_68f4ef();
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.glsl
index 104b38b..bd13366 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/f1742d.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float fwidthFine_f1742d() {
float res = fwidth(1.0f);
return res;
}
void main() {
- prevent_dce = fwidthFine_f1742d();
+ v.tint_symbol = fwidthFine_f1742d();
}
diff --git a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.glsl b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.glsl
index 348ff69..6a3b954 100644
--- a/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/literal/fwidthFine/ff6aa0.wgsl.expected.ir.glsl
@@ -3,11 +3,14 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 fwidthFine_ff6aa0() {
vec2 res = fwidth(vec2(1.0f));
return res;
}
void main() {
- prevent_dce = fwidthFine_ff6aa0();
+ v.tint_symbol = fwidthFine_ff6aa0();
}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.spvasm
index ddfbd67..004b716 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/literal/textureDimensions/cdc6c9.wgsl.expected.spvasm
@@ -74,8 +74,8 @@
OpName %VertexOutput "VertexOutput"
OpName %out "out"
OpName %vertex_main "vertex_main"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpMemberDecorate %tint_symbol_1 0 Offset 0
OpDecorate %tint_symbol_1 Block
OpDecorate %1 DescriptorSet 0
@@ -200,7 +200,7 @@
%30 = OpLoad %8 %arg_0_plane1 None
%31 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %11 %uint_0
%34 = OpLoad %tint_ExternalTextureParams_std140 %31 None
- %35 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %34
+ %35 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %34
%40 = OpCompositeExtract %v2uint %35 12
%41 = OpIAdd %v2uint %40 %42
OpStore %res %41
@@ -242,32 +242,32 @@
OpStore %vertex_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %78
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %78
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%79 = OpLabel
- %80 = OpCompositeExtract %uint %input 0
- %81 = OpCompositeExtract %uint %input 1
- %82 = OpCompositeExtract %mat3v4float %input 2
- %83 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %84 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %85 = OpCompositeExtract %v3float %input 5
- %86 = OpCompositeExtract %v3float %input 6
- %87 = OpCompositeExtract %v3float %input 7
+ %80 = OpCompositeExtract %uint %tint_input 0
+ %81 = OpCompositeExtract %uint %tint_input 1
+ %82 = OpCompositeExtract %mat3v4float %tint_input 2
+ %83 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %84 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %85 = OpCompositeExtract %v3float %tint_input 5
+ %86 = OpCompositeExtract %v3float %tint_input 6
+ %87 = OpCompositeExtract %v3float %tint_input 7
%88 = OpCompositeConstruct %mat3v3float %85 %86 %87
- %89 = OpCompositeExtract %v2float %input 8
- %90 = OpCompositeExtract %v2float %input 9
- %91 = OpCompositeExtract %v2float %input 10
+ %89 = OpCompositeExtract %v2float %tint_input 8
+ %90 = OpCompositeExtract %v2float %tint_input 9
+ %91 = OpCompositeExtract %v2float %tint_input 10
%92 = OpCompositeConstruct %mat3v2float %89 %90 %91
- %93 = OpCompositeExtract %v2float %input 11
- %94 = OpCompositeExtract %v2float %input 12
- %95 = OpCompositeExtract %v2float %input 13
+ %93 = OpCompositeExtract %v2float %tint_input 11
+ %94 = OpCompositeExtract %v2float %tint_input 12
+ %95 = OpCompositeExtract %v2float %tint_input 13
%96 = OpCompositeConstruct %mat3v2float %93 %94 %95
- %97 = OpCompositeExtract %v2float %input 14
- %98 = OpCompositeExtract %v2float %input 15
- %99 = OpCompositeExtract %v2float %input 16
- %100 = OpCompositeExtract %v2float %input 17
- %101 = OpCompositeExtract %v2uint %input 18
- %102 = OpCompositeExtract %v2float %input 19
+ %97 = OpCompositeExtract %v2float %tint_input 14
+ %98 = OpCompositeExtract %v2float %tint_input 15
+ %99 = OpCompositeExtract %v2float %tint_input 16
+ %100 = OpCompositeExtract %v2float %tint_input 17
+ %101 = OpCompositeExtract %v2uint %tint_input 18
+ %102 = OpCompositeExtract %v2float %tint_input 19
%103 = OpCompositeConstruct %tint_ExternalTextureParams %80 %81 %82 %83 %84 %88 %92 %96 %97 %98 %99 %100 %101 %102
OpReturnValue %103
OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm
index b530bcd..bf05e58 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm
@@ -83,8 +83,8 @@
OpName %v "v"
OpName %params_0 "params"
OpName %vertex_main "vertex_main"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpMemberDecorate %tint_symbol_1 0 Offset 0
OpDecorate %tint_symbol_1 Block
OpDecorate %1 DescriptorSet 0
@@ -211,7 +211,7 @@
%29 = OpLoad %8 %arg_0_plane1 None
%30 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %10 %uint_0
%33 = OpLoad %tint_ExternalTextureParams_std140 %30 None
- %34 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %33
+ %34 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %33
%39 = OpFunctionCall %v4float %tint_TextureLoadExternal %28 %29 %34 %41
OpStore %res %39
%45 = OpLoad %v4float %res None
@@ -339,32 +339,32 @@
OpStore %vertex_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %155
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %155
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%156 = OpLabel
- %157 = OpCompositeExtract %uint %input 0
- %158 = OpCompositeExtract %uint %input 1
- %159 = OpCompositeExtract %mat3v4float %input 2
- %160 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %161 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %162 = OpCompositeExtract %v3float %input 5
- %163 = OpCompositeExtract %v3float %input 6
- %164 = OpCompositeExtract %v3float %input 7
+ %157 = OpCompositeExtract %uint %tint_input 0
+ %158 = OpCompositeExtract %uint %tint_input 1
+ %159 = OpCompositeExtract %mat3v4float %tint_input 2
+ %160 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %161 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %162 = OpCompositeExtract %v3float %tint_input 5
+ %163 = OpCompositeExtract %v3float %tint_input 6
+ %164 = OpCompositeExtract %v3float %tint_input 7
%165 = OpCompositeConstruct %mat3v3float %162 %163 %164
- %166 = OpCompositeExtract %v2float %input 8
- %167 = OpCompositeExtract %v2float %input 9
- %168 = OpCompositeExtract %v2float %input 10
+ %166 = OpCompositeExtract %v2float %tint_input 8
+ %167 = OpCompositeExtract %v2float %tint_input 9
+ %168 = OpCompositeExtract %v2float %tint_input 10
%169 = OpCompositeConstruct %mat3v2float %166 %167 %168
- %170 = OpCompositeExtract %v2float %input 11
- %171 = OpCompositeExtract %v2float %input 12
- %172 = OpCompositeExtract %v2float %input 13
+ %170 = OpCompositeExtract %v2float %tint_input 11
+ %171 = OpCompositeExtract %v2float %tint_input 12
+ %172 = OpCompositeExtract %v2float %tint_input 13
%173 = OpCompositeConstruct %mat3v2float %170 %171 %172
- %174 = OpCompositeExtract %v2float %input 14
- %175 = OpCompositeExtract %v2float %input 15
- %176 = OpCompositeExtract %v2float %input 16
- %177 = OpCompositeExtract %v2float %input 17
- %178 = OpCompositeExtract %v2uint %input 18
- %179 = OpCompositeExtract %v2float %input 19
+ %174 = OpCompositeExtract %v2float %tint_input 14
+ %175 = OpCompositeExtract %v2float %tint_input 15
+ %176 = OpCompositeExtract %v2float %tint_input 16
+ %177 = OpCompositeExtract %v2float %tint_input 17
+ %178 = OpCompositeExtract %v2uint %tint_input 18
+ %179 = OpCompositeExtract %v2float %tint_input 19
%180 = OpCompositeConstruct %tint_ExternalTextureParams %157 %158 %159 %160 %161 %165 %169 %173 %174 %175 %176 %177 %178 %179
OpReturnValue %180
OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm
index d01baa1..2de901b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm
@@ -83,8 +83,8 @@
OpName %v "v"
OpName %params_0 "params"
OpName %vertex_main "vertex_main"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpMemberDecorate %tint_symbol_1 0 Offset 0
OpDecorate %tint_symbol_1 Block
OpDecorate %1 DescriptorSet 0
@@ -214,7 +214,7 @@
%29 = OpLoad %8 %arg_0_plane1 None
%30 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %10 %uint_0
%33 = OpLoad %tint_ExternalTextureParams_std140 %30 None
- %34 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %33
+ %34 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %33
%39 = OpBitcast %v2uint %40
%44 = OpFunctionCall %v4float %tint_TextureLoadExternal %28 %29 %34 %39
OpStore %res %44
@@ -343,32 +343,32 @@
OpStore %vertex_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %159
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %159
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%160 = OpLabel
- %161 = OpCompositeExtract %uint %input 0
- %162 = OpCompositeExtract %uint %input 1
- %163 = OpCompositeExtract %mat3v4float %input 2
- %164 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %165 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %166 = OpCompositeExtract %v3float %input 5
- %167 = OpCompositeExtract %v3float %input 6
- %168 = OpCompositeExtract %v3float %input 7
+ %161 = OpCompositeExtract %uint %tint_input 0
+ %162 = OpCompositeExtract %uint %tint_input 1
+ %163 = OpCompositeExtract %mat3v4float %tint_input 2
+ %164 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %165 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %166 = OpCompositeExtract %v3float %tint_input 5
+ %167 = OpCompositeExtract %v3float %tint_input 6
+ %168 = OpCompositeExtract %v3float %tint_input 7
%169 = OpCompositeConstruct %mat3v3float %166 %167 %168
- %170 = OpCompositeExtract %v2float %input 8
- %171 = OpCompositeExtract %v2float %input 9
- %172 = OpCompositeExtract %v2float %input 10
+ %170 = OpCompositeExtract %v2float %tint_input 8
+ %171 = OpCompositeExtract %v2float %tint_input 9
+ %172 = OpCompositeExtract %v2float %tint_input 10
%173 = OpCompositeConstruct %mat3v2float %170 %171 %172
- %174 = OpCompositeExtract %v2float %input 11
- %175 = OpCompositeExtract %v2float %input 12
- %176 = OpCompositeExtract %v2float %input 13
+ %174 = OpCompositeExtract %v2float %tint_input 11
+ %175 = OpCompositeExtract %v2float %tint_input 12
+ %176 = OpCompositeExtract %v2float %tint_input 13
%177 = OpCompositeConstruct %mat3v2float %174 %175 %176
- %178 = OpCompositeExtract %v2float %input 14
- %179 = OpCompositeExtract %v2float %input 15
- %180 = OpCompositeExtract %v2float %input 16
- %181 = OpCompositeExtract %v2float %input 17
- %182 = OpCompositeExtract %v2uint %input 18
- %183 = OpCompositeExtract %v2float %input 19
+ %178 = OpCompositeExtract %v2float %tint_input 14
+ %179 = OpCompositeExtract %v2float %tint_input 15
+ %180 = OpCompositeExtract %v2float %tint_input 16
+ %181 = OpCompositeExtract %v2float %tint_input 17
+ %182 = OpCompositeExtract %v2uint %tint_input 18
+ %183 = OpCompositeExtract %v2float %tint_input 19
%184 = OpCompositeConstruct %tint_ExternalTextureParams %161 %162 %163 %164 %165 %169 %173 %177 %178 %179 %180 %181 %182 %183
OpReturnValue %184
OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm
index 9b41dc3..3320fc0 100644
--- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm
@@ -85,8 +85,8 @@
OpName %v "v"
OpName %params_0 "params"
OpName %vertex_main "vertex_main"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpMemberDecorate %tint_symbol_1 0 Offset 0
OpDecorate %tint_symbol_1 Block
OpDecorate %1 DescriptorSet 0
@@ -220,7 +220,7 @@
%32 = OpLoad %8 %arg_0_plane1 None
%33 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %10 %uint_0
%36 = OpLoad %tint_ExternalTextureParams_std140 %33 None
- %37 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %36
+ %37 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %36
%42 = OpLoad %22 %arg_1 None
%43 = OpFunctionCall %v4float %tint_TextureSampleExternal %31 %32 %37 %42 %45
OpStore %res %43
@@ -351,32 +351,32 @@
OpStore %vertex_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %163
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %163
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%164 = OpLabel
- %165 = OpCompositeExtract %uint %input 0
- %166 = OpCompositeExtract %uint %input 1
- %167 = OpCompositeExtract %mat3v4float %input 2
- %168 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %169 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %170 = OpCompositeExtract %v3float %input 5
- %171 = OpCompositeExtract %v3float %input 6
- %172 = OpCompositeExtract %v3float %input 7
+ %165 = OpCompositeExtract %uint %tint_input 0
+ %166 = OpCompositeExtract %uint %tint_input 1
+ %167 = OpCompositeExtract %mat3v4float %tint_input 2
+ %168 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %169 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %170 = OpCompositeExtract %v3float %tint_input 5
+ %171 = OpCompositeExtract %v3float %tint_input 6
+ %172 = OpCompositeExtract %v3float %tint_input 7
%173 = OpCompositeConstruct %mat3v3float %170 %171 %172
- %174 = OpCompositeExtract %v2float %input 8
- %175 = OpCompositeExtract %v2float %input 9
- %176 = OpCompositeExtract %v2float %input 10
+ %174 = OpCompositeExtract %v2float %tint_input 8
+ %175 = OpCompositeExtract %v2float %tint_input 9
+ %176 = OpCompositeExtract %v2float %tint_input 10
%177 = OpCompositeConstruct %mat3v2float %174 %175 %176
- %178 = OpCompositeExtract %v2float %input 11
- %179 = OpCompositeExtract %v2float %input 12
- %180 = OpCompositeExtract %v2float %input 13
+ %178 = OpCompositeExtract %v2float %tint_input 11
+ %179 = OpCompositeExtract %v2float %tint_input 12
+ %180 = OpCompositeExtract %v2float %tint_input 13
%181 = OpCompositeConstruct %mat3v2float %178 %179 %180
- %182 = OpCompositeExtract %v2float %input 14
- %183 = OpCompositeExtract %v2float %input 15
- %184 = OpCompositeExtract %v2float %input 16
- %185 = OpCompositeExtract %v2float %input 17
- %186 = OpCompositeExtract %v2uint %input 18
- %187 = OpCompositeExtract %v2float %input 19
+ %182 = OpCompositeExtract %v2float %tint_input 14
+ %183 = OpCompositeExtract %v2float %tint_input 15
+ %184 = OpCompositeExtract %v2float %tint_input 16
+ %185 = OpCompositeExtract %v2float %tint_input 17
+ %186 = OpCompositeExtract %v2uint %tint_input 18
+ %187 = OpCompositeExtract %v2float %tint_input 19
%188 = OpCompositeConstruct %tint_ExternalTextureParams %165 %166 %167 %168 %169 %173 %177 %181 %182 %183 %184 %185 %186 %187
OpReturnValue %188
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.ir.glsl
index 2da6b27..1bf684f 100644
--- a/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdx/0763f7.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdx_0763f7() {
vec3 arg_0 = vec3(1.0f);
vec3 res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdx_0763f7();
+ v.tint_symbol = dpdx_0763f7();
}
diff --git a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.ir.glsl
index 8a53b5b..23cafde 100644
--- a/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdx/99edb1.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdx_99edb1() {
vec2 arg_0 = vec2(1.0f);
vec2 res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdx_99edb1();
+ v.tint_symbol = dpdx_99edb1();
}
diff --git a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.ir.glsl
index eaf885e..0b071ab 100644
--- a/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdx/c487fa.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdx_c487fa() {
vec4 arg_0 = vec4(1.0f);
vec4 res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdx_c487fa();
+ v.tint_symbol = dpdx_c487fa();
}
diff --git a/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.ir.glsl
index 5bc8889..0e4f2a9 100644
--- a/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdx/e263de.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdx_e263de() {
float arg_0 = 1.0f;
float res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdx_e263de();
+ v.tint_symbol = dpdx_e263de();
}
diff --git a/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.ir.glsl
index 2623f79..5020aa7 100644
--- a/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdxCoarse/029152.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdxCoarse_029152() {
float arg_0 = 1.0f;
float res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdxCoarse_029152();
+ v.tint_symbol = dpdxCoarse_029152();
}
diff --git a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.ir.glsl
index 3e98291..d8e5986 100644
--- a/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdxCoarse/9581cf.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdxCoarse_9581cf() {
vec2 arg_0 = vec2(1.0f);
vec2 res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdxCoarse_9581cf();
+ v.tint_symbol = dpdxCoarse_9581cf();
}
diff --git a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.ir.glsl
index 3a074f1..cb71d73 100644
--- a/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdxCoarse/c28641.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdxCoarse_c28641() {
vec4 arg_0 = vec4(1.0f);
vec4 res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdxCoarse_c28641();
+ v.tint_symbol = dpdxCoarse_c28641();
}
diff --git a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.ir.glsl
index 4e20fdd..9b65c12 100644
--- a/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdxCoarse/f64d7b.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdxCoarse_f64d7b() {
vec3 arg_0 = vec3(1.0f);
vec3 res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdxCoarse_f64d7b();
+ v.tint_symbol = dpdxCoarse_f64d7b();
}
diff --git a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.ir.glsl
index e745b62..de25343 100644
--- a/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdxFine/8c5069.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdxFine_8c5069() {
vec4 arg_0 = vec4(1.0f);
vec4 res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdxFine_8c5069();
+ v.tint_symbol = dpdxFine_8c5069();
}
diff --git a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.ir.glsl
index 0b0f007..c7a23ba 100644
--- a/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdxFine/9631de.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdxFine_9631de() {
vec2 arg_0 = vec2(1.0f);
vec2 res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdxFine_9631de();
+ v.tint_symbol = dpdxFine_9631de();
}
diff --git a/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.ir.glsl
index a102f79..ba6e78b 100644
--- a/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdxFine/f401a2.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdxFine_f401a2() {
float arg_0 = 1.0f;
float res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdxFine_f401a2();
+ v.tint_symbol = dpdxFine_f401a2();
}
diff --git a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.ir.glsl
index 720edcc..7f0b19f 100644
--- a/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdxFine/f92fb6.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdxFine_f92fb6() {
vec3 arg_0 = vec3(1.0f);
vec3 res = dFdx(arg_0);
return res;
}
void main() {
- prevent_dce = dpdxFine_f92fb6();
+ v.tint_symbol = dpdxFine_f92fb6();
}
diff --git a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.ir.glsl
index f2c640f..7b9e363 100644
--- a/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdy/699a05.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdy_699a05() {
vec4 arg_0 = vec4(1.0f);
vec4 res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdy_699a05();
+ v.tint_symbol = dpdy_699a05();
}
diff --git a/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.ir.glsl
index 9920c07..b7dd552 100644
--- a/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdy/7f8d84.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdy_7f8d84() {
float arg_0 = 1.0f;
float res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdy_7f8d84();
+ v.tint_symbol = dpdy_7f8d84();
}
diff --git a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.ir.glsl
index d65c06c..71f3368 100644
--- a/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdy/a8b56e.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdy_a8b56e() {
vec2 arg_0 = vec2(1.0f);
vec2 res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdy_a8b56e();
+ v.tint_symbol = dpdy_a8b56e();
}
diff --git a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.ir.glsl
index fc0e3be..99a7f82 100644
--- a/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdy/feb40f.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdy_feb40f() {
vec3 arg_0 = vec3(1.0f);
vec3 res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdy_feb40f();
+ v.tint_symbol = dpdy_feb40f();
}
diff --git a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.ir.glsl
index e396067..bcd867b 100644
--- a/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdyCoarse/3e1ab4.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdyCoarse_3e1ab4() {
vec2 arg_0 = vec2(1.0f);
vec2 res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdyCoarse_3e1ab4();
+ v.tint_symbol = dpdyCoarse_3e1ab4();
}
diff --git a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.ir.glsl
index b6cf3dd..5b9452f 100644
--- a/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdyCoarse/445d24.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdyCoarse_445d24() {
vec4 arg_0 = vec4(1.0f);
vec4 res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdyCoarse_445d24();
+ v.tint_symbol = dpdyCoarse_445d24();
}
diff --git a/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.ir.glsl
index 8ca9471..9734a2b 100644
--- a/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdyCoarse/870a7e.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdyCoarse_870a7e() {
float arg_0 = 1.0f;
float res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdyCoarse_870a7e();
+ v.tint_symbol = dpdyCoarse_870a7e();
}
diff --git a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.ir.glsl
index 61699bb..d612720 100644
--- a/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdyCoarse/ae1873.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdyCoarse_ae1873() {
vec3 arg_0 = vec3(1.0f);
vec3 res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdyCoarse_ae1873();
+ v.tint_symbol = dpdyCoarse_ae1873();
}
diff --git a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.ir.glsl
index 7fecc72..0e55929 100644
--- a/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdyFine/1fb7ab.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 dpdyFine_1fb7ab() {
vec3 arg_0 = vec3(1.0f);
vec3 res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdyFine_1fb7ab();
+ v.tint_symbol = dpdyFine_1fb7ab();
}
diff --git a/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.ir.glsl
index 4cb6b10..04bc81b 100644
--- a/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdyFine/6eb673.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float dpdyFine_6eb673() {
float arg_0 = 1.0f;
float res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdyFine_6eb673();
+ v.tint_symbol = dpdyFine_6eb673();
}
diff --git a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.ir.glsl
index a030609..7b1e269 100644
--- a/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdyFine/d0a648.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 dpdyFine_d0a648() {
vec4 arg_0 = vec4(1.0f);
vec4 res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdyFine_d0a648();
+ v.tint_symbol = dpdyFine_d0a648();
}
diff --git a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.ir.glsl
index 1a534df..ef9172b 100644
--- a/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/dpdyFine/df33aa.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 dpdyFine_df33aa() {
vec2 arg_0 = vec2(1.0f);
vec2 res = dFdy(arg_0);
return res;
}
void main() {
- prevent_dce = dpdyFine_df33aa();
+ v.tint_symbol = dpdyFine_df33aa();
}
diff --git a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.ir.glsl
index 5b2b040..c8d7433 100644
--- a/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidth/5d1b39.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 fwidth_5d1b39() {
vec3 arg_0 = vec3(1.0f);
vec3 res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidth_5d1b39();
+ v.tint_symbol = fwidth_5d1b39();
}
diff --git a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.ir.glsl
index 1577356..26d027f 100644
--- a/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidth/b83ebb.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 fwidth_b83ebb() {
vec2 arg_0 = vec2(1.0f);
vec2 res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidth_b83ebb();
+ v.tint_symbol = fwidth_b83ebb();
}
diff --git a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.ir.glsl
index dd82cca..56a9309 100644
--- a/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidth/d2ab9a.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 fwidth_d2ab9a() {
vec4 arg_0 = vec4(1.0f);
vec4 res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidth_d2ab9a();
+ v.tint_symbol = fwidth_d2ab9a();
}
diff --git a/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.ir.glsl
index b9e70f5..813cd77 100644
--- a/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidth/df38ef.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float fwidth_df38ef() {
float arg_0 = 1.0f;
float res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidth_df38ef();
+ v.tint_symbol = fwidth_df38ef();
}
diff --git a/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.ir.glsl
index 0f5e74a..2c7ed9d 100644
--- a/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidthCoarse/159c8a.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float fwidthCoarse_159c8a() {
float arg_0 = 1.0f;
float res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidthCoarse_159c8a();
+ v.tint_symbol = fwidthCoarse_159c8a();
}
diff --git a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.ir.glsl
index b1c2914..ad85900 100644
--- a/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidthCoarse/1e59d9.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 fwidthCoarse_1e59d9() {
vec3 arg_0 = vec3(1.0f);
vec3 res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidthCoarse_1e59d9();
+ v.tint_symbol = fwidthCoarse_1e59d9();
}
diff --git a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.ir.glsl
index 1de93e2..a66fbdd 100644
--- a/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidthCoarse/4e4fc4.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 fwidthCoarse_4e4fc4() {
vec4 arg_0 = vec4(1.0f);
vec4 res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidthCoarse_4e4fc4();
+ v.tint_symbol = fwidthCoarse_4e4fc4();
}
diff --git a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.ir.glsl
index cd52a0c..b00a399 100644
--- a/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidthCoarse/e653f7.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 fwidthCoarse_e653f7() {
vec2 arg_0 = vec2(1.0f);
vec2 res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidthCoarse_e653f7();
+ v.tint_symbol = fwidthCoarse_e653f7();
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.glsl
index 30cb72d..25daec4 100644
--- a/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidthFine/523fdc.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec3 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec3 tint_symbol;
+} v;
vec3 fwidthFine_523fdc() {
vec3 arg_0 = vec3(1.0f);
vec3 res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidthFine_523fdc();
+ v.tint_symbol = fwidthFine_523fdc();
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.glsl
index c835f9b..2dcd088 100644
--- a/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidthFine/68f4ef.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec4 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec4 tint_symbol;
+} v;
vec4 fwidthFine_68f4ef() {
vec4 arg_0 = vec4(1.0f);
vec4 res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidthFine_68f4ef();
+ v.tint_symbol = fwidthFine_68f4ef();
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.glsl
index 2fb83df..889bde6 100644
--- a/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidthFine/f1742d.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-float prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ float tint_symbol;
+} v;
float fwidthFine_f1742d() {
float arg_0 = 1.0f;
float res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidthFine_f1742d();
+ v.tint_symbol = fwidthFine_f1742d();
}
diff --git a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.glsl b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.glsl
index 3477372..5ca8714 100644
--- a/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.glsl
+++ b/test/tint/builtins/gen/var/fwidthFine/ff6aa0.wgsl.expected.ir.glsl
@@ -3,12 +3,15 @@
precision highp int;
-vec2 prevent_dce;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ vec2 tint_symbol;
+} v;
vec2 fwidthFine_ff6aa0() {
vec2 arg_0 = vec2(1.0f);
vec2 res = fwidth(arg_0);
return res;
}
void main() {
- prevent_dce = fwidthFine_ff6aa0();
+ v.tint_symbol = fwidthFine_ff6aa0();
}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.spvasm
index ddfbd67..004b716 100644
--- a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.spvasm
@@ -74,8 +74,8 @@
OpName %VertexOutput "VertexOutput"
OpName %out "out"
OpName %vertex_main "vertex_main"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpMemberDecorate %tint_symbol_1 0 Offset 0
OpDecorate %tint_symbol_1 Block
OpDecorate %1 DescriptorSet 0
@@ -200,7 +200,7 @@
%30 = OpLoad %8 %arg_0_plane1 None
%31 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %11 %uint_0
%34 = OpLoad %tint_ExternalTextureParams_std140 %31 None
- %35 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %34
+ %35 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %34
%40 = OpCompositeExtract %v2uint %35 12
%41 = OpIAdd %v2uint %40 %42
OpStore %res %41
@@ -242,32 +242,32 @@
OpStore %vertex_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %78
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %78
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%79 = OpLabel
- %80 = OpCompositeExtract %uint %input 0
- %81 = OpCompositeExtract %uint %input 1
- %82 = OpCompositeExtract %mat3v4float %input 2
- %83 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %84 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %85 = OpCompositeExtract %v3float %input 5
- %86 = OpCompositeExtract %v3float %input 6
- %87 = OpCompositeExtract %v3float %input 7
+ %80 = OpCompositeExtract %uint %tint_input 0
+ %81 = OpCompositeExtract %uint %tint_input 1
+ %82 = OpCompositeExtract %mat3v4float %tint_input 2
+ %83 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %84 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %85 = OpCompositeExtract %v3float %tint_input 5
+ %86 = OpCompositeExtract %v3float %tint_input 6
+ %87 = OpCompositeExtract %v3float %tint_input 7
%88 = OpCompositeConstruct %mat3v3float %85 %86 %87
- %89 = OpCompositeExtract %v2float %input 8
- %90 = OpCompositeExtract %v2float %input 9
- %91 = OpCompositeExtract %v2float %input 10
+ %89 = OpCompositeExtract %v2float %tint_input 8
+ %90 = OpCompositeExtract %v2float %tint_input 9
+ %91 = OpCompositeExtract %v2float %tint_input 10
%92 = OpCompositeConstruct %mat3v2float %89 %90 %91
- %93 = OpCompositeExtract %v2float %input 11
- %94 = OpCompositeExtract %v2float %input 12
- %95 = OpCompositeExtract %v2float %input 13
+ %93 = OpCompositeExtract %v2float %tint_input 11
+ %94 = OpCompositeExtract %v2float %tint_input 12
+ %95 = OpCompositeExtract %v2float %tint_input 13
%96 = OpCompositeConstruct %mat3v2float %93 %94 %95
- %97 = OpCompositeExtract %v2float %input 14
- %98 = OpCompositeExtract %v2float %input 15
- %99 = OpCompositeExtract %v2float %input 16
- %100 = OpCompositeExtract %v2float %input 17
- %101 = OpCompositeExtract %v2uint %input 18
- %102 = OpCompositeExtract %v2float %input 19
+ %97 = OpCompositeExtract %v2float %tint_input 14
+ %98 = OpCompositeExtract %v2float %tint_input 15
+ %99 = OpCompositeExtract %v2float %tint_input 16
+ %100 = OpCompositeExtract %v2float %tint_input 17
+ %101 = OpCompositeExtract %v2uint %tint_input 18
+ %102 = OpCompositeExtract %v2float %tint_input 19
%103 = OpCompositeConstruct %tint_ExternalTextureParams %80 %81 %82 %83 %84 %88 %92 %96 %97 %98 %99 %100 %101 %102
OpReturnValue %103
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm
index cb95423..48158d5 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm
@@ -84,8 +84,8 @@
OpName %v "v"
OpName %params_0 "params"
OpName %vertex_main "vertex_main"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpMemberDecorate %tint_symbol_1 0 Offset 0
OpDecorate %tint_symbol_1 Block
OpDecorate %1 DescriptorSet 0
@@ -215,7 +215,7 @@
%33 = OpLoad %8 %arg_0_plane1 None
%34 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %10 %uint_0
%37 = OpLoad %tint_ExternalTextureParams_std140 %34 None
- %38 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %37
+ %38 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %37
%43 = OpLoad %v2uint %arg_1 None
%44 = OpFunctionCall %v4float %tint_TextureLoadExternal %32 %33 %38 %43
OpStore %res %44
@@ -344,32 +344,32 @@
OpStore %vertex_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %158
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %158
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%159 = OpLabel
- %160 = OpCompositeExtract %uint %input 0
- %161 = OpCompositeExtract %uint %input 1
- %162 = OpCompositeExtract %mat3v4float %input 2
- %163 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %164 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %165 = OpCompositeExtract %v3float %input 5
- %166 = OpCompositeExtract %v3float %input 6
- %167 = OpCompositeExtract %v3float %input 7
+ %160 = OpCompositeExtract %uint %tint_input 0
+ %161 = OpCompositeExtract %uint %tint_input 1
+ %162 = OpCompositeExtract %mat3v4float %tint_input 2
+ %163 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %164 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %165 = OpCompositeExtract %v3float %tint_input 5
+ %166 = OpCompositeExtract %v3float %tint_input 6
+ %167 = OpCompositeExtract %v3float %tint_input 7
%168 = OpCompositeConstruct %mat3v3float %165 %166 %167
- %169 = OpCompositeExtract %v2float %input 8
- %170 = OpCompositeExtract %v2float %input 9
- %171 = OpCompositeExtract %v2float %input 10
+ %169 = OpCompositeExtract %v2float %tint_input 8
+ %170 = OpCompositeExtract %v2float %tint_input 9
+ %171 = OpCompositeExtract %v2float %tint_input 10
%172 = OpCompositeConstruct %mat3v2float %169 %170 %171
- %173 = OpCompositeExtract %v2float %input 11
- %174 = OpCompositeExtract %v2float %input 12
- %175 = OpCompositeExtract %v2float %input 13
+ %173 = OpCompositeExtract %v2float %tint_input 11
+ %174 = OpCompositeExtract %v2float %tint_input 12
+ %175 = OpCompositeExtract %v2float %tint_input 13
%176 = OpCompositeConstruct %mat3v2float %173 %174 %175
- %177 = OpCompositeExtract %v2float %input 14
- %178 = OpCompositeExtract %v2float %input 15
- %179 = OpCompositeExtract %v2float %input 16
- %180 = OpCompositeExtract %v2float %input 17
- %181 = OpCompositeExtract %v2uint %input 18
- %182 = OpCompositeExtract %v2float %input 19
+ %177 = OpCompositeExtract %v2float %tint_input 14
+ %178 = OpCompositeExtract %v2float %tint_input 15
+ %179 = OpCompositeExtract %v2float %tint_input 16
+ %180 = OpCompositeExtract %v2float %tint_input 17
+ %181 = OpCompositeExtract %v2uint %tint_input 18
+ %182 = OpCompositeExtract %v2float %tint_input 19
%183 = OpCompositeConstruct %tint_ExternalTextureParams %160 %161 %162 %163 %164 %168 %172 %176 %177 %178 %179 %180 %181 %182
OpReturnValue %183
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm
index a6933c7..4ff2371 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm
@@ -84,8 +84,8 @@
OpName %v "v"
OpName %params_0 "params"
OpName %vertex_main "vertex_main"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpMemberDecorate %tint_symbol_1 0 Offset 0
OpDecorate %tint_symbol_1 Block
OpDecorate %1 DescriptorSet 0
@@ -218,7 +218,7 @@
%35 = OpLoad %8 %arg_0_plane1 None
%36 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %10 %uint_0
%39 = OpLoad %tint_ExternalTextureParams_std140 %36 None
- %40 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %39
+ %40 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %39
%45 = OpLoad %v2int %arg_1 None
%46 = OpBitcast %v2uint %45
%47 = OpFunctionCall %v4float %tint_TextureLoadExternal %34 %35 %40 %46
@@ -348,32 +348,32 @@
OpStore %vertex_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %162
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %162
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%163 = OpLabel
- %164 = OpCompositeExtract %uint %input 0
- %165 = OpCompositeExtract %uint %input 1
- %166 = OpCompositeExtract %mat3v4float %input 2
- %167 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %168 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %169 = OpCompositeExtract %v3float %input 5
- %170 = OpCompositeExtract %v3float %input 6
- %171 = OpCompositeExtract %v3float %input 7
+ %164 = OpCompositeExtract %uint %tint_input 0
+ %165 = OpCompositeExtract %uint %tint_input 1
+ %166 = OpCompositeExtract %mat3v4float %tint_input 2
+ %167 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %168 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %169 = OpCompositeExtract %v3float %tint_input 5
+ %170 = OpCompositeExtract %v3float %tint_input 6
+ %171 = OpCompositeExtract %v3float %tint_input 7
%172 = OpCompositeConstruct %mat3v3float %169 %170 %171
- %173 = OpCompositeExtract %v2float %input 8
- %174 = OpCompositeExtract %v2float %input 9
- %175 = OpCompositeExtract %v2float %input 10
+ %173 = OpCompositeExtract %v2float %tint_input 8
+ %174 = OpCompositeExtract %v2float %tint_input 9
+ %175 = OpCompositeExtract %v2float %tint_input 10
%176 = OpCompositeConstruct %mat3v2float %173 %174 %175
- %177 = OpCompositeExtract %v2float %input 11
- %178 = OpCompositeExtract %v2float %input 12
- %179 = OpCompositeExtract %v2float %input 13
+ %177 = OpCompositeExtract %v2float %tint_input 11
+ %178 = OpCompositeExtract %v2float %tint_input 12
+ %179 = OpCompositeExtract %v2float %tint_input 13
%180 = OpCompositeConstruct %mat3v2float %177 %178 %179
- %181 = OpCompositeExtract %v2float %input 14
- %182 = OpCompositeExtract %v2float %input 15
- %183 = OpCompositeExtract %v2float %input 16
- %184 = OpCompositeExtract %v2float %input 17
- %185 = OpCompositeExtract %v2uint %input 18
- %186 = OpCompositeExtract %v2float %input 19
+ %181 = OpCompositeExtract %v2float %tint_input 14
+ %182 = OpCompositeExtract %v2float %tint_input 15
+ %183 = OpCompositeExtract %v2float %tint_input 16
+ %184 = OpCompositeExtract %v2float %tint_input 17
+ %185 = OpCompositeExtract %v2uint %tint_input 18
+ %186 = OpCompositeExtract %v2float %tint_input 19
%187 = OpCompositeConstruct %tint_ExternalTextureParams %164 %165 %166 %167 %168 %172 %176 %180 %181 %182 %183 %184 %185 %186
OpReturnValue %187
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm
index b971b66..9a8aced 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm
@@ -86,8 +86,8 @@
OpName %v "v"
OpName %params_0 "params"
OpName %vertex_main "vertex_main"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpMemberDecorate %tint_symbol_1 0 Offset 0
OpDecorate %tint_symbol_1 Block
OpDecorate %1 DescriptorSet 0
@@ -224,7 +224,7 @@
%36 = OpLoad %8 %arg_0_plane1 None
%37 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %10 %uint_0
%40 = OpLoad %tint_ExternalTextureParams_std140 %37 None
- %41 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %40
+ %41 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %40
%46 = OpLoad %22 %arg_1 None
%47 = OpLoad %v2float %arg_2 None
%48 = OpFunctionCall %v4float %tint_TextureSampleExternal %35 %36 %41 %46 %47
@@ -356,32 +356,32 @@
OpStore %vertex_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %166
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %166
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%167 = OpLabel
- %168 = OpCompositeExtract %uint %input 0
- %169 = OpCompositeExtract %uint %input 1
- %170 = OpCompositeExtract %mat3v4float %input 2
- %171 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %172 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %173 = OpCompositeExtract %v3float %input 5
- %174 = OpCompositeExtract %v3float %input 6
- %175 = OpCompositeExtract %v3float %input 7
+ %168 = OpCompositeExtract %uint %tint_input 0
+ %169 = OpCompositeExtract %uint %tint_input 1
+ %170 = OpCompositeExtract %mat3v4float %tint_input 2
+ %171 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %172 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %173 = OpCompositeExtract %v3float %tint_input 5
+ %174 = OpCompositeExtract %v3float %tint_input 6
+ %175 = OpCompositeExtract %v3float %tint_input 7
%176 = OpCompositeConstruct %mat3v3float %173 %174 %175
- %177 = OpCompositeExtract %v2float %input 8
- %178 = OpCompositeExtract %v2float %input 9
- %179 = OpCompositeExtract %v2float %input 10
+ %177 = OpCompositeExtract %v2float %tint_input 8
+ %178 = OpCompositeExtract %v2float %tint_input 9
+ %179 = OpCompositeExtract %v2float %tint_input 10
%180 = OpCompositeConstruct %mat3v2float %177 %178 %179
- %181 = OpCompositeExtract %v2float %input 11
- %182 = OpCompositeExtract %v2float %input 12
- %183 = OpCompositeExtract %v2float %input 13
+ %181 = OpCompositeExtract %v2float %tint_input 11
+ %182 = OpCompositeExtract %v2float %tint_input 12
+ %183 = OpCompositeExtract %v2float %tint_input 13
%184 = OpCompositeConstruct %mat3v2float %181 %182 %183
- %185 = OpCompositeExtract %v2float %input 14
- %186 = OpCompositeExtract %v2float %input 15
- %187 = OpCompositeExtract %v2float %input 16
- %188 = OpCompositeExtract %v2float %input 17
- %189 = OpCompositeExtract %v2uint %input 18
- %190 = OpCompositeExtract %v2float %input 19
+ %185 = OpCompositeExtract %v2float %tint_input 14
+ %186 = OpCompositeExtract %v2float %tint_input 15
+ %187 = OpCompositeExtract %v2float %tint_input 16
+ %188 = OpCompositeExtract %v2float %tint_input 17
+ %189 = OpCompositeExtract %v2uint %tint_input 18
+ %190 = OpCompositeExtract %v2float %tint_input 19
%191 = OpCompositeConstruct %tint_ExternalTextureParams %168 %169 %170 %171 %172 %176 %180 %184 %185 %186 %187 %188 %189 %190
OpReturnValue %191
OpFunctionEnd
diff --git a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.spvasm b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.spvasm
index 67ef974..e91f313 100644
--- a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.spvasm
+++ b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.spvasm
@@ -81,8 +81,8 @@
OpName %v "v"
OpName %params_0 "params"
OpName %vertex_main "vertex_main"
- OpName %convert_tint_ExternalTextureParams "convert_tint_ExternalTextureParams"
- OpName %input "input"
+ OpName %tint_convert_tint_ExternalTextureParams "tint_convert_tint_ExternalTextureParams"
+ OpName %tint_input "tint_input"
OpDecorate %arg_0_plane0 DescriptorSet 1
OpDecorate %arg_0_plane0 Binding 0
OpDecorate %arg_0_plane1 DescriptorSet 1
@@ -204,7 +204,7 @@
%41 = OpLoad %3 %arg_0_plane1 None
%42 = OpAccessChain %_ptr_Uniform_tint_ExternalTextureParams_std140 %6 %uint_0
%45 = OpLoad %tint_ExternalTextureParams_std140 %42 None
- %46 = OpFunctionCall %tint_ExternalTextureParams %convert_tint_ExternalTextureParams %45
+ %46 = OpFunctionCall %tint_ExternalTextureParams %tint_convert_tint_ExternalTextureParams %45
%48 = OpFunctionCall %v4float %textureLoad2d %40 %41 %46 %49
OpStore %res %48
OpReturn
@@ -318,32 +318,32 @@
OpStore %vertex_main___point_size_Output %float_1 None
OpReturn
OpFunctionEnd
-%convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %148
- %input = OpFunctionParameter %tint_ExternalTextureParams_std140
+%tint_convert_tint_ExternalTextureParams = OpFunction %tint_ExternalTextureParams None %148
+ %tint_input = OpFunctionParameter %tint_ExternalTextureParams_std140
%149 = OpLabel
- %150 = OpCompositeExtract %uint %input 0
- %151 = OpCompositeExtract %uint %input 1
- %152 = OpCompositeExtract %mat3v4float %input 2
- %153 = OpCompositeExtract %tint_GammaTransferParams %input 3
- %154 = OpCompositeExtract %tint_GammaTransferParams %input 4
- %155 = OpCompositeExtract %v3float %input 5
- %156 = OpCompositeExtract %v3float %input 6
- %157 = OpCompositeExtract %v3float %input 7
+ %150 = OpCompositeExtract %uint %tint_input 0
+ %151 = OpCompositeExtract %uint %tint_input 1
+ %152 = OpCompositeExtract %mat3v4float %tint_input 2
+ %153 = OpCompositeExtract %tint_GammaTransferParams %tint_input 3
+ %154 = OpCompositeExtract %tint_GammaTransferParams %tint_input 4
+ %155 = OpCompositeExtract %v3float %tint_input 5
+ %156 = OpCompositeExtract %v3float %tint_input 6
+ %157 = OpCompositeExtract %v3float %tint_input 7
%158 = OpCompositeConstruct %mat3v3float %155 %156 %157
- %159 = OpCompositeExtract %v2float %input 8
- %160 = OpCompositeExtract %v2float %input 9
- %161 = OpCompositeExtract %v2float %input 10
+ %159 = OpCompositeExtract %v2float %tint_input 8
+ %160 = OpCompositeExtract %v2float %tint_input 9
+ %161 = OpCompositeExtract %v2float %tint_input 10
%162 = OpCompositeConstruct %mat3v2float %159 %160 %161
- %163 = OpCompositeExtract %v2float %input 11
- %164 = OpCompositeExtract %v2float %input 12
- %165 = OpCompositeExtract %v2float %input 13
+ %163 = OpCompositeExtract %v2float %tint_input 11
+ %164 = OpCompositeExtract %v2float %tint_input 12
+ %165 = OpCompositeExtract %v2float %tint_input 13
%166 = OpCompositeConstruct %mat3v2float %163 %164 %165
- %167 = OpCompositeExtract %v2float %input 14
- %168 = OpCompositeExtract %v2float %input 15
- %169 = OpCompositeExtract %v2float %input 16
- %170 = OpCompositeExtract %v2float %input 17
- %171 = OpCompositeExtract %v2uint %input 18
- %172 = OpCompositeExtract %v2float %input 19
+ %167 = OpCompositeExtract %v2float %tint_input 14
+ %168 = OpCompositeExtract %v2float %tint_input 15
+ %169 = OpCompositeExtract %v2float %tint_input 16
+ %170 = OpCompositeExtract %v2float %tint_input 17
+ %171 = OpCompositeExtract %v2uint %tint_input 18
+ %172 = OpCompositeExtract %v2float %tint_input 19
%173 = OpCompositeConstruct %tint_ExternalTextureParams %150 %151 %152 %153 %154 %158 %162 %166 %167 %168 %169 %170 %171 %172
OpReturnValue %173
OpFunctionEnd
diff --git a/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.glsl b/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.glsl
index 4a128fb..d23e9ac 100644
--- a/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.glsl
@@ -1,15 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
- f16mat3x2 matrix;
+struct S_std140 {
+ f16vec2 matrix_col0;
+ f16vec2 matrix_col1;
+ f16vec2 matrix_col2;
f16vec3 vector;
};
precision highp float;
precision highp int;
-uniform S data;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ S_std140 tint_symbol_1;
+} v;
void main() {
- f16vec2 x = (data.matrix * data.vector);
+ f16mat3x2 v_1 = f16mat3x2(v.tint_symbol_1.matrix_col0, v.tint_symbol_1.matrix_col1, v.tint_symbol_1.matrix_col2);
+ f16vec2 x = (v_1 * v.tint_symbol_1.vector);
}
diff --git a/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.glsl b/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.glsl
index f216af5..0aac941 100644
--- a/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.glsl
@@ -1,15 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
- f16mat3 matrix;
+struct S_std140 {
+ f16vec3 matrix_col0;
+ f16vec3 matrix_col1;
+ f16vec3 matrix_col2;
f16vec3 vector;
};
precision highp float;
precision highp int;
-uniform S data;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ S_std140 tint_symbol_1;
+} v;
void main() {
- f16vec3 x = (data.matrix * data.vector);
+ f16mat3 v_1 = f16mat3(v.tint_symbol_1.matrix_col0, v.tint_symbol_1.matrix_col1, v.tint_symbol_1.matrix_col2);
+ f16vec3 x = (v_1 * v.tint_symbol_1.vector);
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.glsl b/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.glsl
index 8a20df1..2658de2 100644
--- a/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.glsl
@@ -1,15 +1,21 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
- f16mat3 matrix;
+struct S_std140 {
+ f16vec3 matrix_col0;
+ f16vec3 matrix_col1;
+ f16vec3 matrix_col2;
f16vec3 vector;
};
precision highp float;
precision highp int;
-uniform S data;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ S_std140 tint_symbol_1;
+} v;
void main() {
- f16vec3 x = (data.vector * data.matrix);
+ f16vec3 v_1 = v.tint_symbol_1.vector;
+ f16vec3 x = (v_1 * f16mat3(v.tint_symbol_1.matrix_col0, v.tint_symbol_1.matrix_col1, v.tint_symbol_1.matrix_col2));
}
diff --git a/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.glsl b/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.glsl
index ee391b1..f455684 100644
--- a/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.glsl
@@ -1,15 +1,22 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-struct S {
- f16mat4x3 matrix;
+struct S_std140 {
+ f16vec3 matrix_col0;
+ f16vec3 matrix_col1;
+ f16vec3 matrix_col2;
+ f16vec3 matrix_col3;
f16vec3 vector;
};
precision highp float;
precision highp int;
-uniform S data;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ S_std140 tint_symbol_1;
+} v;
void main() {
- f16vec4 x = (data.vector * data.matrix);
+ f16vec3 v_1 = v.tint_symbol_1.vector;
+ f16vec4 x = (v_1 * f16mat4x3(v.tint_symbol_1.matrix_col0, v.tint_symbol_1.matrix_col1, v.tint_symbol_1.matrix_col2, v.tint_symbol_1.matrix_col3));
}
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 516661b..f563926 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
@@ -5,129 +5,132 @@
f16vec3 v;
};
-uniform S U;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol;
+} v_1;
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;
+ f16vec3 v = v_1.tint_symbol.v;
+ float16_t x = v_1.tint_symbol.v.x;
+ float16_t y = v_1.tint_symbol.v.y;
+ float16_t z = v_1.tint_symbol.v.z;
+ f16vec2 xx = v_1.tint_symbol.v.xx;
+ f16vec2 xy = v_1.tint_symbol.v.xy;
+ f16vec2 xz = v_1.tint_symbol.v.xz;
+ f16vec2 yx = v_1.tint_symbol.v.yx;
+ f16vec2 yy = v_1.tint_symbol.v.yy;
+ f16vec2 yz = v_1.tint_symbol.v.yz;
+ f16vec2 zx = v_1.tint_symbol.v.zx;
+ f16vec2 zy = v_1.tint_symbol.v.zy;
+ f16vec2 zz = v_1.tint_symbol.v.zz;
+ f16vec3 xxx = v_1.tint_symbol.v.xxx;
+ f16vec3 xxy = v_1.tint_symbol.v.xxy;
+ f16vec3 xxz = v_1.tint_symbol.v.xxz;
+ f16vec3 xyx = v_1.tint_symbol.v.xyx;
+ f16vec3 xyy = v_1.tint_symbol.v.xyy;
+ f16vec3 xyz = v_1.tint_symbol.v.xyz;
+ f16vec3 xzx = v_1.tint_symbol.v.xzx;
+ f16vec3 xzy = v_1.tint_symbol.v.xzy;
+ f16vec3 xzz = v_1.tint_symbol.v.xzz;
+ f16vec3 yxx = v_1.tint_symbol.v.yxx;
+ f16vec3 yxy = v_1.tint_symbol.v.yxy;
+ f16vec3 yxz = v_1.tint_symbol.v.yxz;
+ f16vec3 yyx = v_1.tint_symbol.v.yyx;
+ f16vec3 yyy = v_1.tint_symbol.v.yyy;
+ f16vec3 yyz = v_1.tint_symbol.v.yyz;
+ f16vec3 yzx = v_1.tint_symbol.v.yzx;
+ f16vec3 yzy = v_1.tint_symbol.v.yzy;
+ f16vec3 yzz = v_1.tint_symbol.v.yzz;
+ f16vec3 zxx = v_1.tint_symbol.v.zxx;
+ f16vec3 zxy = v_1.tint_symbol.v.zxy;
+ f16vec3 zxz = v_1.tint_symbol.v.zxz;
+ f16vec3 zyx = v_1.tint_symbol.v.zyx;
+ f16vec3 zyy = v_1.tint_symbol.v.zyy;
+ f16vec3 zyz = v_1.tint_symbol.v.zyz;
+ f16vec3 zzx = v_1.tint_symbol.v.zzx;
+ f16vec3 zzy = v_1.tint_symbol.v.zzy;
+ f16vec3 zzz = v_1.tint_symbol.v.zzz;
+ f16vec4 xxxx = v_1.tint_symbol.v.xxxx;
+ f16vec4 xxxy = v_1.tint_symbol.v.xxxy;
+ f16vec4 xxxz = v_1.tint_symbol.v.xxxz;
+ f16vec4 xxyx = v_1.tint_symbol.v.xxyx;
+ f16vec4 xxyy = v_1.tint_symbol.v.xxyy;
+ f16vec4 xxyz = v_1.tint_symbol.v.xxyz;
+ f16vec4 xxzx = v_1.tint_symbol.v.xxzx;
+ f16vec4 xxzy = v_1.tint_symbol.v.xxzy;
+ f16vec4 xxzz = v_1.tint_symbol.v.xxzz;
+ f16vec4 xyxx = v_1.tint_symbol.v.xyxx;
+ f16vec4 xyxy = v_1.tint_symbol.v.xyxy;
+ f16vec4 xyxz = v_1.tint_symbol.v.xyxz;
+ f16vec4 xyyx = v_1.tint_symbol.v.xyyx;
+ f16vec4 xyyy = v_1.tint_symbol.v.xyyy;
+ f16vec4 xyyz = v_1.tint_symbol.v.xyyz;
+ f16vec4 xyzx = v_1.tint_symbol.v.xyzx;
+ f16vec4 xyzy = v_1.tint_symbol.v.xyzy;
+ f16vec4 xyzz = v_1.tint_symbol.v.xyzz;
+ f16vec4 xzxx = v_1.tint_symbol.v.xzxx;
+ f16vec4 xzxy = v_1.tint_symbol.v.xzxy;
+ f16vec4 xzxz = v_1.tint_symbol.v.xzxz;
+ f16vec4 xzyx = v_1.tint_symbol.v.xzyx;
+ f16vec4 xzyy = v_1.tint_symbol.v.xzyy;
+ f16vec4 xzyz = v_1.tint_symbol.v.xzyz;
+ f16vec4 xzzx = v_1.tint_symbol.v.xzzx;
+ f16vec4 xzzy = v_1.tint_symbol.v.xzzy;
+ f16vec4 xzzz = v_1.tint_symbol.v.xzzz;
+ f16vec4 yxxx = v_1.tint_symbol.v.yxxx;
+ f16vec4 yxxy = v_1.tint_symbol.v.yxxy;
+ f16vec4 yxxz = v_1.tint_symbol.v.yxxz;
+ f16vec4 yxyx = v_1.tint_symbol.v.yxyx;
+ f16vec4 yxyy = v_1.tint_symbol.v.yxyy;
+ f16vec4 yxyz = v_1.tint_symbol.v.yxyz;
+ f16vec4 yxzx = v_1.tint_symbol.v.yxzx;
+ f16vec4 yxzy = v_1.tint_symbol.v.yxzy;
+ f16vec4 yxzz = v_1.tint_symbol.v.yxzz;
+ f16vec4 yyxx = v_1.tint_symbol.v.yyxx;
+ f16vec4 yyxy = v_1.tint_symbol.v.yyxy;
+ f16vec4 yyxz = v_1.tint_symbol.v.yyxz;
+ f16vec4 yyyx = v_1.tint_symbol.v.yyyx;
+ f16vec4 yyyy = v_1.tint_symbol.v.yyyy;
+ f16vec4 yyyz = v_1.tint_symbol.v.yyyz;
+ f16vec4 yyzx = v_1.tint_symbol.v.yyzx;
+ f16vec4 yyzy = v_1.tint_symbol.v.yyzy;
+ f16vec4 yyzz = v_1.tint_symbol.v.yyzz;
+ f16vec4 yzxx = v_1.tint_symbol.v.yzxx;
+ f16vec4 yzxy = v_1.tint_symbol.v.yzxy;
+ f16vec4 yzxz = v_1.tint_symbol.v.yzxz;
+ f16vec4 yzyx = v_1.tint_symbol.v.yzyx;
+ f16vec4 yzyy = v_1.tint_symbol.v.yzyy;
+ f16vec4 yzyz = v_1.tint_symbol.v.yzyz;
+ f16vec4 yzzx = v_1.tint_symbol.v.yzzx;
+ f16vec4 yzzy = v_1.tint_symbol.v.yzzy;
+ f16vec4 yzzz = v_1.tint_symbol.v.yzzz;
+ f16vec4 zxxx = v_1.tint_symbol.v.zxxx;
+ f16vec4 zxxy = v_1.tint_symbol.v.zxxy;
+ f16vec4 zxxz = v_1.tint_symbol.v.zxxz;
+ f16vec4 zxyx = v_1.tint_symbol.v.zxyx;
+ f16vec4 zxyy = v_1.tint_symbol.v.zxyy;
+ f16vec4 zxyz = v_1.tint_symbol.v.zxyz;
+ f16vec4 zxzx = v_1.tint_symbol.v.zxzx;
+ f16vec4 zxzy = v_1.tint_symbol.v.zxzy;
+ f16vec4 zxzz = v_1.tint_symbol.v.zxzz;
+ f16vec4 zyxx = v_1.tint_symbol.v.zyxx;
+ f16vec4 zyxy = v_1.tint_symbol.v.zyxy;
+ f16vec4 zyxz = v_1.tint_symbol.v.zyxz;
+ f16vec4 zyyx = v_1.tint_symbol.v.zyyx;
+ f16vec4 zyyy = v_1.tint_symbol.v.zyyy;
+ f16vec4 zyyz = v_1.tint_symbol.v.zyyz;
+ f16vec4 zyzx = v_1.tint_symbol.v.zyzx;
+ f16vec4 zyzy = v_1.tint_symbol.v.zyzy;
+ f16vec4 zyzz = v_1.tint_symbol.v.zyzz;
+ f16vec4 zzxx = v_1.tint_symbol.v.zzxx;
+ f16vec4 zzxy = v_1.tint_symbol.v.zzxy;
+ f16vec4 zzxz = v_1.tint_symbol.v.zzxz;
+ f16vec4 zzyx = v_1.tint_symbol.v.zzyx;
+ f16vec4 zzyy = v_1.tint_symbol.v.zzyy;
+ f16vec4 zzyz = v_1.tint_symbol.v.zzyz;
+ f16vec4 zzzx = v_1.tint_symbol.v.zzzx;
+ f16vec4 zzzy = v_1.tint_symbol.v.zzzy;
+ f16vec4 zzzz = v_1.tint_symbol.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 694870a..0f29f4f 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
@@ -4,129 +4,132 @@
vec3 v;
};
-uniform S U;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol;
+} v_1;
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;
+ vec3 v = v_1.tint_symbol.v;
+ float x = v_1.tint_symbol.v.x;
+ float y = v_1.tint_symbol.v.y;
+ float z = v_1.tint_symbol.v.z;
+ vec2 xx = v_1.tint_symbol.v.xx;
+ vec2 xy = v_1.tint_symbol.v.xy;
+ vec2 xz = v_1.tint_symbol.v.xz;
+ vec2 yx = v_1.tint_symbol.v.yx;
+ vec2 yy = v_1.tint_symbol.v.yy;
+ vec2 yz = v_1.tint_symbol.v.yz;
+ vec2 zx = v_1.tint_symbol.v.zx;
+ vec2 zy = v_1.tint_symbol.v.zy;
+ vec2 zz = v_1.tint_symbol.v.zz;
+ vec3 xxx = v_1.tint_symbol.v.xxx;
+ vec3 xxy = v_1.tint_symbol.v.xxy;
+ vec3 xxz = v_1.tint_symbol.v.xxz;
+ vec3 xyx = v_1.tint_symbol.v.xyx;
+ vec3 xyy = v_1.tint_symbol.v.xyy;
+ vec3 xyz = v_1.tint_symbol.v.xyz;
+ vec3 xzx = v_1.tint_symbol.v.xzx;
+ vec3 xzy = v_1.tint_symbol.v.xzy;
+ vec3 xzz = v_1.tint_symbol.v.xzz;
+ vec3 yxx = v_1.tint_symbol.v.yxx;
+ vec3 yxy = v_1.tint_symbol.v.yxy;
+ vec3 yxz = v_1.tint_symbol.v.yxz;
+ vec3 yyx = v_1.tint_symbol.v.yyx;
+ vec3 yyy = v_1.tint_symbol.v.yyy;
+ vec3 yyz = v_1.tint_symbol.v.yyz;
+ vec3 yzx = v_1.tint_symbol.v.yzx;
+ vec3 yzy = v_1.tint_symbol.v.yzy;
+ vec3 yzz = v_1.tint_symbol.v.yzz;
+ vec3 zxx = v_1.tint_symbol.v.zxx;
+ vec3 zxy = v_1.tint_symbol.v.zxy;
+ vec3 zxz = v_1.tint_symbol.v.zxz;
+ vec3 zyx = v_1.tint_symbol.v.zyx;
+ vec3 zyy = v_1.tint_symbol.v.zyy;
+ vec3 zyz = v_1.tint_symbol.v.zyz;
+ vec3 zzx = v_1.tint_symbol.v.zzx;
+ vec3 zzy = v_1.tint_symbol.v.zzy;
+ vec3 zzz = v_1.tint_symbol.v.zzz;
+ vec4 xxxx = v_1.tint_symbol.v.xxxx;
+ vec4 xxxy = v_1.tint_symbol.v.xxxy;
+ vec4 xxxz = v_1.tint_symbol.v.xxxz;
+ vec4 xxyx = v_1.tint_symbol.v.xxyx;
+ vec4 xxyy = v_1.tint_symbol.v.xxyy;
+ vec4 xxyz = v_1.tint_symbol.v.xxyz;
+ vec4 xxzx = v_1.tint_symbol.v.xxzx;
+ vec4 xxzy = v_1.tint_symbol.v.xxzy;
+ vec4 xxzz = v_1.tint_symbol.v.xxzz;
+ vec4 xyxx = v_1.tint_symbol.v.xyxx;
+ vec4 xyxy = v_1.tint_symbol.v.xyxy;
+ vec4 xyxz = v_1.tint_symbol.v.xyxz;
+ vec4 xyyx = v_1.tint_symbol.v.xyyx;
+ vec4 xyyy = v_1.tint_symbol.v.xyyy;
+ vec4 xyyz = v_1.tint_symbol.v.xyyz;
+ vec4 xyzx = v_1.tint_symbol.v.xyzx;
+ vec4 xyzy = v_1.tint_symbol.v.xyzy;
+ vec4 xyzz = v_1.tint_symbol.v.xyzz;
+ vec4 xzxx = v_1.tint_symbol.v.xzxx;
+ vec4 xzxy = v_1.tint_symbol.v.xzxy;
+ vec4 xzxz = v_1.tint_symbol.v.xzxz;
+ vec4 xzyx = v_1.tint_symbol.v.xzyx;
+ vec4 xzyy = v_1.tint_symbol.v.xzyy;
+ vec4 xzyz = v_1.tint_symbol.v.xzyz;
+ vec4 xzzx = v_1.tint_symbol.v.xzzx;
+ vec4 xzzy = v_1.tint_symbol.v.xzzy;
+ vec4 xzzz = v_1.tint_symbol.v.xzzz;
+ vec4 yxxx = v_1.tint_symbol.v.yxxx;
+ vec4 yxxy = v_1.tint_symbol.v.yxxy;
+ vec4 yxxz = v_1.tint_symbol.v.yxxz;
+ vec4 yxyx = v_1.tint_symbol.v.yxyx;
+ vec4 yxyy = v_1.tint_symbol.v.yxyy;
+ vec4 yxyz = v_1.tint_symbol.v.yxyz;
+ vec4 yxzx = v_1.tint_symbol.v.yxzx;
+ vec4 yxzy = v_1.tint_symbol.v.yxzy;
+ vec4 yxzz = v_1.tint_symbol.v.yxzz;
+ vec4 yyxx = v_1.tint_symbol.v.yyxx;
+ vec4 yyxy = v_1.tint_symbol.v.yyxy;
+ vec4 yyxz = v_1.tint_symbol.v.yyxz;
+ vec4 yyyx = v_1.tint_symbol.v.yyyx;
+ vec4 yyyy = v_1.tint_symbol.v.yyyy;
+ vec4 yyyz = v_1.tint_symbol.v.yyyz;
+ vec4 yyzx = v_1.tint_symbol.v.yyzx;
+ vec4 yyzy = v_1.tint_symbol.v.yyzy;
+ vec4 yyzz = v_1.tint_symbol.v.yyzz;
+ vec4 yzxx = v_1.tint_symbol.v.yzxx;
+ vec4 yzxy = v_1.tint_symbol.v.yzxy;
+ vec4 yzxz = v_1.tint_symbol.v.yzxz;
+ vec4 yzyx = v_1.tint_symbol.v.yzyx;
+ vec4 yzyy = v_1.tint_symbol.v.yzyy;
+ vec4 yzyz = v_1.tint_symbol.v.yzyz;
+ vec4 yzzx = v_1.tint_symbol.v.yzzx;
+ vec4 yzzy = v_1.tint_symbol.v.yzzy;
+ vec4 yzzz = v_1.tint_symbol.v.yzzz;
+ vec4 zxxx = v_1.tint_symbol.v.zxxx;
+ vec4 zxxy = v_1.tint_symbol.v.zxxy;
+ vec4 zxxz = v_1.tint_symbol.v.zxxz;
+ vec4 zxyx = v_1.tint_symbol.v.zxyx;
+ vec4 zxyy = v_1.tint_symbol.v.zxyy;
+ vec4 zxyz = v_1.tint_symbol.v.zxyz;
+ vec4 zxzx = v_1.tint_symbol.v.zxzx;
+ vec4 zxzy = v_1.tint_symbol.v.zxzy;
+ vec4 zxzz = v_1.tint_symbol.v.zxzz;
+ vec4 zyxx = v_1.tint_symbol.v.zyxx;
+ vec4 zyxy = v_1.tint_symbol.v.zyxy;
+ vec4 zyxz = v_1.tint_symbol.v.zyxz;
+ vec4 zyyx = v_1.tint_symbol.v.zyyx;
+ vec4 zyyy = v_1.tint_symbol.v.zyyy;
+ vec4 zyyz = v_1.tint_symbol.v.zyyz;
+ vec4 zyzx = v_1.tint_symbol.v.zyzx;
+ vec4 zyzy = v_1.tint_symbol.v.zyzy;
+ vec4 zyzz = v_1.tint_symbol.v.zyzz;
+ vec4 zzxx = v_1.tint_symbol.v.zzxx;
+ vec4 zzxy = v_1.tint_symbol.v.zzxy;
+ vec4 zzxz = v_1.tint_symbol.v.zzxz;
+ vec4 zzyx = v_1.tint_symbol.v.zzyx;
+ vec4 zzyy = v_1.tint_symbol.v.zzyy;
+ vec4 zzyz = v_1.tint_symbol.v.zzyz;
+ vec4 zzzx = v_1.tint_symbol.v.zzzx;
+ vec4 zzzy = v_1.tint_symbol.v.zzzy;
+ vec4 zzzz = v_1.tint_symbol.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 3ace889..cb8a6a5 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
@@ -4,129 +4,132 @@
ivec3 v;
};
-uniform S U;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol;
+} v_1;
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;
+ ivec3 v = v_1.tint_symbol.v;
+ int x = v_1.tint_symbol.v.x;
+ int y = v_1.tint_symbol.v.y;
+ int z = v_1.tint_symbol.v.z;
+ ivec2 xx = v_1.tint_symbol.v.xx;
+ ivec2 xy = v_1.tint_symbol.v.xy;
+ ivec2 xz = v_1.tint_symbol.v.xz;
+ ivec2 yx = v_1.tint_symbol.v.yx;
+ ivec2 yy = v_1.tint_symbol.v.yy;
+ ivec2 yz = v_1.tint_symbol.v.yz;
+ ivec2 zx = v_1.tint_symbol.v.zx;
+ ivec2 zy = v_1.tint_symbol.v.zy;
+ ivec2 zz = v_1.tint_symbol.v.zz;
+ ivec3 xxx = v_1.tint_symbol.v.xxx;
+ ivec3 xxy = v_1.tint_symbol.v.xxy;
+ ivec3 xxz = v_1.tint_symbol.v.xxz;
+ ivec3 xyx = v_1.tint_symbol.v.xyx;
+ ivec3 xyy = v_1.tint_symbol.v.xyy;
+ ivec3 xyz = v_1.tint_symbol.v.xyz;
+ ivec3 xzx = v_1.tint_symbol.v.xzx;
+ ivec3 xzy = v_1.tint_symbol.v.xzy;
+ ivec3 xzz = v_1.tint_symbol.v.xzz;
+ ivec3 yxx = v_1.tint_symbol.v.yxx;
+ ivec3 yxy = v_1.tint_symbol.v.yxy;
+ ivec3 yxz = v_1.tint_symbol.v.yxz;
+ ivec3 yyx = v_1.tint_symbol.v.yyx;
+ ivec3 yyy = v_1.tint_symbol.v.yyy;
+ ivec3 yyz = v_1.tint_symbol.v.yyz;
+ ivec3 yzx = v_1.tint_symbol.v.yzx;
+ ivec3 yzy = v_1.tint_symbol.v.yzy;
+ ivec3 yzz = v_1.tint_symbol.v.yzz;
+ ivec3 zxx = v_1.tint_symbol.v.zxx;
+ ivec3 zxy = v_1.tint_symbol.v.zxy;
+ ivec3 zxz = v_1.tint_symbol.v.zxz;
+ ivec3 zyx = v_1.tint_symbol.v.zyx;
+ ivec3 zyy = v_1.tint_symbol.v.zyy;
+ ivec3 zyz = v_1.tint_symbol.v.zyz;
+ ivec3 zzx = v_1.tint_symbol.v.zzx;
+ ivec3 zzy = v_1.tint_symbol.v.zzy;
+ ivec3 zzz = v_1.tint_symbol.v.zzz;
+ ivec4 xxxx = v_1.tint_symbol.v.xxxx;
+ ivec4 xxxy = v_1.tint_symbol.v.xxxy;
+ ivec4 xxxz = v_1.tint_symbol.v.xxxz;
+ ivec4 xxyx = v_1.tint_symbol.v.xxyx;
+ ivec4 xxyy = v_1.tint_symbol.v.xxyy;
+ ivec4 xxyz = v_1.tint_symbol.v.xxyz;
+ ivec4 xxzx = v_1.tint_symbol.v.xxzx;
+ ivec4 xxzy = v_1.tint_symbol.v.xxzy;
+ ivec4 xxzz = v_1.tint_symbol.v.xxzz;
+ ivec4 xyxx = v_1.tint_symbol.v.xyxx;
+ ivec4 xyxy = v_1.tint_symbol.v.xyxy;
+ ivec4 xyxz = v_1.tint_symbol.v.xyxz;
+ ivec4 xyyx = v_1.tint_symbol.v.xyyx;
+ ivec4 xyyy = v_1.tint_symbol.v.xyyy;
+ ivec4 xyyz = v_1.tint_symbol.v.xyyz;
+ ivec4 xyzx = v_1.tint_symbol.v.xyzx;
+ ivec4 xyzy = v_1.tint_symbol.v.xyzy;
+ ivec4 xyzz = v_1.tint_symbol.v.xyzz;
+ ivec4 xzxx = v_1.tint_symbol.v.xzxx;
+ ivec4 xzxy = v_1.tint_symbol.v.xzxy;
+ ivec4 xzxz = v_1.tint_symbol.v.xzxz;
+ ivec4 xzyx = v_1.tint_symbol.v.xzyx;
+ ivec4 xzyy = v_1.tint_symbol.v.xzyy;
+ ivec4 xzyz = v_1.tint_symbol.v.xzyz;
+ ivec4 xzzx = v_1.tint_symbol.v.xzzx;
+ ivec4 xzzy = v_1.tint_symbol.v.xzzy;
+ ivec4 xzzz = v_1.tint_symbol.v.xzzz;
+ ivec4 yxxx = v_1.tint_symbol.v.yxxx;
+ ivec4 yxxy = v_1.tint_symbol.v.yxxy;
+ ivec4 yxxz = v_1.tint_symbol.v.yxxz;
+ ivec4 yxyx = v_1.tint_symbol.v.yxyx;
+ ivec4 yxyy = v_1.tint_symbol.v.yxyy;
+ ivec4 yxyz = v_1.tint_symbol.v.yxyz;
+ ivec4 yxzx = v_1.tint_symbol.v.yxzx;
+ ivec4 yxzy = v_1.tint_symbol.v.yxzy;
+ ivec4 yxzz = v_1.tint_symbol.v.yxzz;
+ ivec4 yyxx = v_1.tint_symbol.v.yyxx;
+ ivec4 yyxy = v_1.tint_symbol.v.yyxy;
+ ivec4 yyxz = v_1.tint_symbol.v.yyxz;
+ ivec4 yyyx = v_1.tint_symbol.v.yyyx;
+ ivec4 yyyy = v_1.tint_symbol.v.yyyy;
+ ivec4 yyyz = v_1.tint_symbol.v.yyyz;
+ ivec4 yyzx = v_1.tint_symbol.v.yyzx;
+ ivec4 yyzy = v_1.tint_symbol.v.yyzy;
+ ivec4 yyzz = v_1.tint_symbol.v.yyzz;
+ ivec4 yzxx = v_1.tint_symbol.v.yzxx;
+ ivec4 yzxy = v_1.tint_symbol.v.yzxy;
+ ivec4 yzxz = v_1.tint_symbol.v.yzxz;
+ ivec4 yzyx = v_1.tint_symbol.v.yzyx;
+ ivec4 yzyy = v_1.tint_symbol.v.yzyy;
+ ivec4 yzyz = v_1.tint_symbol.v.yzyz;
+ ivec4 yzzx = v_1.tint_symbol.v.yzzx;
+ ivec4 yzzy = v_1.tint_symbol.v.yzzy;
+ ivec4 yzzz = v_1.tint_symbol.v.yzzz;
+ ivec4 zxxx = v_1.tint_symbol.v.zxxx;
+ ivec4 zxxy = v_1.tint_symbol.v.zxxy;
+ ivec4 zxxz = v_1.tint_symbol.v.zxxz;
+ ivec4 zxyx = v_1.tint_symbol.v.zxyx;
+ ivec4 zxyy = v_1.tint_symbol.v.zxyy;
+ ivec4 zxyz = v_1.tint_symbol.v.zxyz;
+ ivec4 zxzx = v_1.tint_symbol.v.zxzx;
+ ivec4 zxzy = v_1.tint_symbol.v.zxzy;
+ ivec4 zxzz = v_1.tint_symbol.v.zxzz;
+ ivec4 zyxx = v_1.tint_symbol.v.zyxx;
+ ivec4 zyxy = v_1.tint_symbol.v.zyxy;
+ ivec4 zyxz = v_1.tint_symbol.v.zyxz;
+ ivec4 zyyx = v_1.tint_symbol.v.zyyx;
+ ivec4 zyyy = v_1.tint_symbol.v.zyyy;
+ ivec4 zyyz = v_1.tint_symbol.v.zyyz;
+ ivec4 zyzx = v_1.tint_symbol.v.zyzx;
+ ivec4 zyzy = v_1.tint_symbol.v.zyzy;
+ ivec4 zyzz = v_1.tint_symbol.v.zyzz;
+ ivec4 zzxx = v_1.tint_symbol.v.zzxx;
+ ivec4 zzxy = v_1.tint_symbol.v.zzxy;
+ ivec4 zzxz = v_1.tint_symbol.v.zzxz;
+ ivec4 zzyx = v_1.tint_symbol.v.zzyx;
+ ivec4 zzyy = v_1.tint_symbol.v.zzyy;
+ ivec4 zzyz = v_1.tint_symbol.v.zzyz;
+ ivec4 zzzx = v_1.tint_symbol.v.zzzx;
+ ivec4 zzzy = v_1.tint_symbol.v.zzzy;
+ ivec4 zzzz = v_1.tint_symbol.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 580ad7a..f111e53 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
@@ -4,129 +4,132 @@
uvec3 v;
};
-uniform S U;
+layout(binding = 0, std140)
+uniform tint_symbol_1_1_ubo {
+ S tint_symbol;
+} v_1;
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;
+ uvec3 v = v_1.tint_symbol.v;
+ uint x = v_1.tint_symbol.v.x;
+ uint y = v_1.tint_symbol.v.y;
+ uint z = v_1.tint_symbol.v.z;
+ uvec2 xx = v_1.tint_symbol.v.xx;
+ uvec2 xy = v_1.tint_symbol.v.xy;
+ uvec2 xz = v_1.tint_symbol.v.xz;
+ uvec2 yx = v_1.tint_symbol.v.yx;
+ uvec2 yy = v_1.tint_symbol.v.yy;
+ uvec2 yz = v_1.tint_symbol.v.yz;
+ uvec2 zx = v_1.tint_symbol.v.zx;
+ uvec2 zy = v_1.tint_symbol.v.zy;
+ uvec2 zz = v_1.tint_symbol.v.zz;
+ uvec3 xxx = v_1.tint_symbol.v.xxx;
+ uvec3 xxy = v_1.tint_symbol.v.xxy;
+ uvec3 xxz = v_1.tint_symbol.v.xxz;
+ uvec3 xyx = v_1.tint_symbol.v.xyx;
+ uvec3 xyy = v_1.tint_symbol.v.xyy;
+ uvec3 xyz = v_1.tint_symbol.v.xyz;
+ uvec3 xzx = v_1.tint_symbol.v.xzx;
+ uvec3 xzy = v_1.tint_symbol.v.xzy;
+ uvec3 xzz = v_1.tint_symbol.v.xzz;
+ uvec3 yxx = v_1.tint_symbol.v.yxx;
+ uvec3 yxy = v_1.tint_symbol.v.yxy;
+ uvec3 yxz = v_1.tint_symbol.v.yxz;
+ uvec3 yyx = v_1.tint_symbol.v.yyx;
+ uvec3 yyy = v_1.tint_symbol.v.yyy;
+ uvec3 yyz = v_1.tint_symbol.v.yyz;
+ uvec3 yzx = v_1.tint_symbol.v.yzx;
+ uvec3 yzy = v_1.tint_symbol.v.yzy;
+ uvec3 yzz = v_1.tint_symbol.v.yzz;
+ uvec3 zxx = v_1.tint_symbol.v.zxx;
+ uvec3 zxy = v_1.tint_symbol.v.zxy;
+ uvec3 zxz = v_1.tint_symbol.v.zxz;
+ uvec3 zyx = v_1.tint_symbol.v.zyx;
+ uvec3 zyy = v_1.tint_symbol.v.zyy;
+ uvec3 zyz = v_1.tint_symbol.v.zyz;
+ uvec3 zzx = v_1.tint_symbol.v.zzx;
+ uvec3 zzy = v_1.tint_symbol.v.zzy;
+ uvec3 zzz = v_1.tint_symbol.v.zzz;
+ uvec4 xxxx = v_1.tint_symbol.v.xxxx;
+ uvec4 xxxy = v_1.tint_symbol.v.xxxy;
+ uvec4 xxxz = v_1.tint_symbol.v.xxxz;
+ uvec4 xxyx = v_1.tint_symbol.v.xxyx;
+ uvec4 xxyy = v_1.tint_symbol.v.xxyy;
+ uvec4 xxyz = v_1.tint_symbol.v.xxyz;
+ uvec4 xxzx = v_1.tint_symbol.v.xxzx;
+ uvec4 xxzy = v_1.tint_symbol.v.xxzy;
+ uvec4 xxzz = v_1.tint_symbol.v.xxzz;
+ uvec4 xyxx = v_1.tint_symbol.v.xyxx;
+ uvec4 xyxy = v_1.tint_symbol.v.xyxy;
+ uvec4 xyxz = v_1.tint_symbol.v.xyxz;
+ uvec4 xyyx = v_1.tint_symbol.v.xyyx;
+ uvec4 xyyy = v_1.tint_symbol.v.xyyy;
+ uvec4 xyyz = v_1.tint_symbol.v.xyyz;
+ uvec4 xyzx = v_1.tint_symbol.v.xyzx;
+ uvec4 xyzy = v_1.tint_symbol.v.xyzy;
+ uvec4 xyzz = v_1.tint_symbol.v.xyzz;
+ uvec4 xzxx = v_1.tint_symbol.v.xzxx;
+ uvec4 xzxy = v_1.tint_symbol.v.xzxy;
+ uvec4 xzxz = v_1.tint_symbol.v.xzxz;
+ uvec4 xzyx = v_1.tint_symbol.v.xzyx;
+ uvec4 xzyy = v_1.tint_symbol.v.xzyy;
+ uvec4 xzyz = v_1.tint_symbol.v.xzyz;
+ uvec4 xzzx = v_1.tint_symbol.v.xzzx;
+ uvec4 xzzy = v_1.tint_symbol.v.xzzy;
+ uvec4 xzzz = v_1.tint_symbol.v.xzzz;
+ uvec4 yxxx = v_1.tint_symbol.v.yxxx;
+ uvec4 yxxy = v_1.tint_symbol.v.yxxy;
+ uvec4 yxxz = v_1.tint_symbol.v.yxxz;
+ uvec4 yxyx = v_1.tint_symbol.v.yxyx;
+ uvec4 yxyy = v_1.tint_symbol.v.yxyy;
+ uvec4 yxyz = v_1.tint_symbol.v.yxyz;
+ uvec4 yxzx = v_1.tint_symbol.v.yxzx;
+ uvec4 yxzy = v_1.tint_symbol.v.yxzy;
+ uvec4 yxzz = v_1.tint_symbol.v.yxzz;
+ uvec4 yyxx = v_1.tint_symbol.v.yyxx;
+ uvec4 yyxy = v_1.tint_symbol.v.yyxy;
+ uvec4 yyxz = v_1.tint_symbol.v.yyxz;
+ uvec4 yyyx = v_1.tint_symbol.v.yyyx;
+ uvec4 yyyy = v_1.tint_symbol.v.yyyy;
+ uvec4 yyyz = v_1.tint_symbol.v.yyyz;
+ uvec4 yyzx = v_1.tint_symbol.v.yyzx;
+ uvec4 yyzy = v_1.tint_symbol.v.yyzy;
+ uvec4 yyzz = v_1.tint_symbol.v.yyzz;
+ uvec4 yzxx = v_1.tint_symbol.v.yzxx;
+ uvec4 yzxy = v_1.tint_symbol.v.yzxy;
+ uvec4 yzxz = v_1.tint_symbol.v.yzxz;
+ uvec4 yzyx = v_1.tint_symbol.v.yzyx;
+ uvec4 yzyy = v_1.tint_symbol.v.yzyy;
+ uvec4 yzyz = v_1.tint_symbol.v.yzyz;
+ uvec4 yzzx = v_1.tint_symbol.v.yzzx;
+ uvec4 yzzy = v_1.tint_symbol.v.yzzy;
+ uvec4 yzzz = v_1.tint_symbol.v.yzzz;
+ uvec4 zxxx = v_1.tint_symbol.v.zxxx;
+ uvec4 zxxy = v_1.tint_symbol.v.zxxy;
+ uvec4 zxxz = v_1.tint_symbol.v.zxxz;
+ uvec4 zxyx = v_1.tint_symbol.v.zxyx;
+ uvec4 zxyy = v_1.tint_symbol.v.zxyy;
+ uvec4 zxyz = v_1.tint_symbol.v.zxyz;
+ uvec4 zxzx = v_1.tint_symbol.v.zxzx;
+ uvec4 zxzy = v_1.tint_symbol.v.zxzy;
+ uvec4 zxzz = v_1.tint_symbol.v.zxzz;
+ uvec4 zyxx = v_1.tint_symbol.v.zyxx;
+ uvec4 zyxy = v_1.tint_symbol.v.zyxy;
+ uvec4 zyxz = v_1.tint_symbol.v.zyxz;
+ uvec4 zyyx = v_1.tint_symbol.v.zyyx;
+ uvec4 zyyy = v_1.tint_symbol.v.zyyy;
+ uvec4 zyyz = v_1.tint_symbol.v.zyyz;
+ uvec4 zyzx = v_1.tint_symbol.v.zyzx;
+ uvec4 zyzy = v_1.tint_symbol.v.zyzy;
+ uvec4 zyzz = v_1.tint_symbol.v.zyzz;
+ uvec4 zzxx = v_1.tint_symbol.v.zzxx;
+ uvec4 zzxy = v_1.tint_symbol.v.zzxy;
+ uvec4 zzxz = v_1.tint_symbol.v.zzxz;
+ uvec4 zzyx = v_1.tint_symbol.v.zzyx;
+ uvec4 zzyy = v_1.tint_symbol.v.zzyy;
+ uvec4 zzyz = v_1.tint_symbol.v.zzyz;
+ uvec4 zzzx = v_1.tint_symbol.v.zzzx;
+ uvec4 zzzy = v_1.tint_symbol.v.zzzy;
+ uvec4 zzzz = v_1.tint_symbol.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 b657961..24e7490 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
@@ -5,12 +5,15 @@
f16vec3 v;
};
-S U;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
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;
+ v_1.tint_symbol.v = f16vec3(1.0hf, 2.0hf, 3.0hf);
+ v_1.tint_symbol.v[0u] = 1.0hf;
+ v_1.tint_symbol.v[1u] = 2.0hf;
+ v_1.tint_symbol.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 257b3dc..a403a25 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
@@ -4,12 +4,15 @@
vec3 v;
};
-S U;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
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;
+ v_1.tint_symbol.v = vec3(1.0f, 2.0f, 3.0f);
+ v_1.tint_symbol.v[0u] = 1.0f;
+ v_1.tint_symbol.v[1u] = 2.0f;
+ v_1.tint_symbol.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 f0b7c58..d90d90d 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
@@ -4,12 +4,15 @@
ivec3 v;
};
-S U;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void f() {
- U.v = ivec3(1, 2, 3);
- U.v[0u] = 1;
- U.v[1u] = 2;
- U.v[2u] = 3;
+ v_1.tint_symbol.v = ivec3(1, 2, 3);
+ v_1.tint_symbol.v[0u] = 1;
+ v_1.tint_symbol.v[1u] = 2;
+ v_1.tint_symbol.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 cb0d0b4..1e4d1f2 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
@@ -4,12 +4,15 @@
uvec3 v;
};
-S U;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void f() {
- U.v = uvec3(1u, 2u, 3u);
- U.v[0u] = 1u;
- U.v[1u] = 2u;
- U.v[2u] = 3u;
+ v_1.tint_symbol.v = uvec3(1u, 2u, 3u);
+ v_1.tint_symbol.v[0u] = 1u;
+ v_1.tint_symbol.v[1u] = 2u;
+ v_1.tint_symbol.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/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.ir.glsl
index 7b1eb2e..164e16f 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2 m = f16mat2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf));
-f16mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat2(m);
+ v.tint_symbol_1 = f16mat2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.ir.glsl
index 708da53..30d82c5 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f));
-mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat2(m);
+ v.tint_symbol_1 = mat2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.ir.glsl
index dabeaf9..e239fe1 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2 m = f16mat2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf));
-f16mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.ir.glsl
index e8b61bf..3dbfafc 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f));
-mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.ir.glsl
index dabeaf9..e239fe1 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2 m = f16mat2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf));
-f16mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.ir.glsl
index e8b61bf..3dbfafc 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f));
-mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.ir.glsl
index 7b1eb2e..164e16f 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2 m = f16mat2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf));
-f16mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat2(m);
+ v.tint_symbol_1 = f16mat2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.ir.glsl
index 708da53..30d82c5 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f));
-mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat2(m);
+ v.tint_symbol_1 = mat2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index d65e4b8..a60a884 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f));
+ v.tint_symbol_1 = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.ir.glsl
index dabeaf9..e239fe1 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2 m = f16mat2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf));
-f16mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.ir.glsl
index e8b61bf..3dbfafc 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f));
-mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index d65e4b8..a60a884 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f));
+ v.tint_symbol_1 = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.ir.glsl
index dabeaf9..e239fe1 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2 m = f16mat2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf));
-f16mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.ir.glsl
index e8b61bf..3dbfafc 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f));
-mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/load/f16.wgsl.expected.ir.glsl
index 54a9283..717628c 100644
--- a/test/tint/expressions/type_ctor/mat2x2/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/load/f16.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
f16mat2 m = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
- tint_symbol = f16mat2(m);
+ v.tint_symbol_1 = f16mat2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/load/f32.wgsl.expected.ir.glsl
index 44aa841..1dcf6b9 100644
--- a/test/tint/expressions/type_ctor/mat2x2/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/load/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat2 m = mat2(vec2(0.0f), vec2(0.0f));
- tint_symbol = mat2(m);
+ v.tint_symbol_1 = mat2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.ir.glsl
index aef2750..0f66dea 100644
--- a/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/zero/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2 m = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
-f16mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.ir.glsl
index a54f9b2..959ce45 100644
--- a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2 m = mat2(vec2(0.0f), vec2(0.0f));
-mat2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.glsl
index e61f072..67b2561 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -2,12 +2,15 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x3 m = f16mat2x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf));
-f16mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, f16mat2x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, f16mat2x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.glsl
index 402494e..5562e8c 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -1,12 +1,15 @@
#version 310 es
mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f));
-mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, mat2x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat2x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.glsl
index 759d96c..657029c 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -2,12 +2,15 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x3 m = f16mat2x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf));
-f16mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.glsl
index 7077b54..e443f43 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -1,12 +1,15 @@
#version 310 es
mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f));
-mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.glsl
index 759d96c..657029c 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -2,12 +2,15 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x3 m = f16mat2x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf));
-f16mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.glsl
index 7077b54..e443f43 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -1,12 +1,15 @@
#version 310 es
mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f));
-mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.glsl
index e61f072..67b2561 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -2,12 +2,15 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x3 m = f16mat2x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf));
-f16mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, f16mat2x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, f16mat2x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.glsl
index 402494e..5562e8c 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -1,12 +1,15 @@
#version 310 es
mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f));
-mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, mat2x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat2x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index 282538c..e54591f 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)));
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.glsl
index 759d96c..657029c 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -2,12 +2,15 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x3 m = f16mat2x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf));
-f16mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.glsl
index 7077b54..e443f43 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -1,12 +1,15 @@
#version 310 es
mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f));
-mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index 282538c..e54591f 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)));
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.glsl
index 759d96c..657029c 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -2,12 +2,15 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x3 m = f16mat2x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf));
-f16mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.glsl
index 7077b54..e443f43 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -1,12 +1,15 @@
#version 310 es
mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f));
-mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.glsl
index 3d54305..d25f2f6 100644
--- a/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
f16mat2x3 m = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf));
- tint_store_and_preserve_padding(tint_symbol, f16mat2x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, f16mat2x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.glsl
index 533a6ee..bca28b7 100644
--- a/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -8,5 +11,5 @@
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat2x3 m = mat2x3(vec3(0.0f), vec3(0.0f));
- tint_store_and_preserve_padding(tint_symbol, mat2x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat2x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.glsl
index 0f14a8c..eaaffec 100644
--- a/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.glsl
@@ -2,12 +2,15 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x3 m = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf));
-f16mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.glsl
index 7575f0b..ff3026e 100644
--- a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.glsl
@@ -1,12 +1,15 @@
#version 310 es
mat2x3 m = mat2x3(vec3(0.0f), vec3(0.0f));
-mat2x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x3 tint_symbol_1;
+} v;
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(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.ir.glsl
index ffa11f9..14b43c2 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x4 m = f16mat2x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf));
-f16mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat2x4(m);
+ v.tint_symbol_1 = f16mat2x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.ir.glsl
index 7baebce..caedb17 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f));
-mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat2x4(m);
+ v.tint_symbol_1 = mat2x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.ir.glsl
index 51d7065..d15fd52 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x4 m = f16mat2x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf));
-f16mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.ir.glsl
index 5c8e53f..c0babae 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f));
-mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.ir.glsl
index 51d7065..d15fd52 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x4 m = f16mat2x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf));
-f16mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.ir.glsl
index 5c8e53f..c0babae 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f));
-mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.ir.glsl
index ffa11f9..14b43c2 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x4 m = f16mat2x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf));
-f16mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat2x4(m);
+ v.tint_symbol_1 = f16mat2x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.ir.glsl
index 7baebce..caedb17 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f));
-mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat2x4(m);
+ v.tint_symbol_1 = mat2x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index d1bab6b..e8381d6 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f));
+ v.tint_symbol_1 = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.ir.glsl
index 51d7065..d15fd52 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x4 m = f16mat2x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf));
-f16mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.ir.glsl
index 5c8e53f..c0babae 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f));
-mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index d1bab6b..e8381d6 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f));
+ v.tint_symbol_1 = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.ir.glsl
index 51d7065..d15fd52 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x4 m = f16mat2x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf));
-f16mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.ir.glsl
index 5c8e53f..c0babae 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f));
-mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/load/f16.wgsl.expected.ir.glsl
index 2d8a755..cb26ba6 100644
--- a/test/tint/expressions/type_ctor/mat2x4/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/load/f16.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
f16mat2x4 m = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
- tint_symbol = f16mat2x4(m);
+ v.tint_symbol_1 = f16mat2x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/load/f32.wgsl.expected.ir.glsl
index bc2d55a..8c54195 100644
--- a/test/tint/expressions/type_ctor/mat2x4/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/load/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat2x4 m = mat2x4(vec4(0.0f), vec4(0.0f));
- tint_symbol = mat2x4(m);
+ v.tint_symbol_1 = mat2x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.ir.glsl
index 184a190..531db8f 100644
--- a/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/zero/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat2x4 m = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
-f16mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.ir.glsl
index 9ed4e92..2518aaf 100644
--- a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat2x4 m = mat2x4(vec4(0.0f), vec4(0.0f));
-mat2x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.ir.glsl
index 6f8569d..7b46d06 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x2 m = f16mat3x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf));
-f16mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat3x2(m);
+ v.tint_symbol_1 = f16mat3x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.ir.glsl
index 9805917..95104d5 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f));
-mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat3x2(m);
+ v.tint_symbol_1 = mat3x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.ir.glsl
index 8f9c36d..45c474d 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x2 m = f16mat3x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf));
-f16mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.ir.glsl
index 22ae175..69e1a42 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f));
-mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.ir.glsl
index 8f9c36d..45c474d 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x2 m = f16mat3x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf));
-f16mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.ir.glsl
index 22ae175..69e1a42 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f));
-mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.ir.glsl
index 6f8569d..7b46d06 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x2 m = f16mat3x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf));
-f16mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat3x2(m);
+ v.tint_symbol_1 = f16mat3x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.ir.glsl
index 9805917..95104d5 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f));
-mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat3x2(m);
+ v.tint_symbol_1 = mat3x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index 80beffa..bc88e9e 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f));
+ v.tint_symbol_1 = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.ir.glsl
index 8f9c36d..45c474d 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x2 m = f16mat3x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf));
-f16mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.ir.glsl
index 22ae175..69e1a42 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f));
-mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index 80beffa..bc88e9e 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f));
+ v.tint_symbol_1 = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.ir.glsl
index 8f9c36d..45c474d 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x2 m = f16mat3x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf));
-f16mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.ir.glsl
index 22ae175..69e1a42 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f));
-mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/load/f16.wgsl.expected.ir.glsl
index 8c64b4b..2c408a3 100644
--- a/test/tint/expressions/type_ctor/mat3x2/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/load/f16.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
f16mat3x2 m = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
- tint_symbol = f16mat3x2(m);
+ v.tint_symbol_1 = f16mat3x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/load/f32.wgsl.expected.ir.glsl
index 1614fe7..deda0c5 100644
--- a/test/tint/expressions/type_ctor/mat3x2/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/load/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat3x2 m = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
- tint_symbol = mat3x2(m);
+ v.tint_symbol_1 = mat3x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.ir.glsl
index 710f187..fb7faf6 100644
--- a/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/zero/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x2 m = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
-f16mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.ir.glsl
index 6f10c9f..1fa9cbb 100644
--- a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x2 m = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
-mat3x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.glsl
index 4f544a0..049c10d 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3 m = f16mat3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf));
-f16mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, f16mat3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, f16mat3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.glsl
index acb79fd..60953d3 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f));
-mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, mat3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.glsl
index 3797a02..c975058 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3 m = f16mat3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf));
-f16mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.glsl
index 9d38dd3..b32be2c 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f));
-mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.glsl
index 3797a02..c975058 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3 m = f16mat3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf));
-f16mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.glsl
index 9d38dd3..b32be2c 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f));
-mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.glsl
index 4f544a0..049c10d 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3 m = f16mat3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf));
-f16mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, f16mat3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, f16mat3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.glsl
index acb79fd..60953d3 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f));
-mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, mat3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index 1ce04e0..99dffc0 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -8,5 +11,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)));
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.glsl
index 3797a02..c975058 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3 m = f16mat3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf));
-f16mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.glsl
index 9d38dd3..b32be2c 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f));
-mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index 1ce04e0..99dffc0 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -8,5 +11,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)));
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.glsl
index 3797a02..c975058 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3 m = f16mat3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf));
-f16mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.glsl
index 9d38dd3..b32be2c 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f));
-mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.glsl
index 6c801e1..9b00542 100644
--- a/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
f16mat3 m = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
- tint_store_and_preserve_padding(tint_symbol, f16mat3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, f16mat3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.glsl
index 78082f6..18ac4a7 100644
--- a/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat3 m = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f));
- tint_store_and_preserve_padding(tint_symbol, mat3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.glsl
index 1360ea6..5138ab7 100644
--- a/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3 m = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
-f16mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.glsl
index 89ba1f0..b17ff3b 100644
--- a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat3 m = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f));
-mat3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.ir.glsl
index c4061bc..1fcf385 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x4 m = f16mat3x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf));
-f16mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat3x4(m);
+ v.tint_symbol_1 = f16mat3x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.ir.glsl
index 6906449..e39696d 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f));
-mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat3x4(m);
+ v.tint_symbol_1 = mat3x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.ir.glsl
index e84cf0d..f484b3e 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x4 m = f16mat3x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf));
-f16mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.ir.glsl
index 9b77737..173e3ca 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f));
-mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.ir.glsl
index e84cf0d..f484b3e 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x4 m = f16mat3x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf));
-f16mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.ir.glsl
index 9b77737..173e3ca 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f));
-mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.ir.glsl
index c4061bc..1fcf385 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x4 m = f16mat3x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf));
-f16mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat3x4(m);
+ v.tint_symbol_1 = f16mat3x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.ir.glsl
index 6906449..e39696d 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f));
-mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat3x4(m);
+ v.tint_symbol_1 = mat3x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index 3949629..0b9b3e1 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f));
+ v.tint_symbol_1 = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.ir.glsl
index e84cf0d..f484b3e 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x4 m = f16mat3x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf));
-f16mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.ir.glsl
index 9b77737..173e3ca 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f));
-mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index 3949629..0b9b3e1 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f));
+ v.tint_symbol_1 = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.ir.glsl
index e84cf0d..f484b3e 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x4 m = f16mat3x4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf));
-f16mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.ir.glsl
index 9b77737..173e3ca 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f));
-mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/load/f16.wgsl.expected.ir.glsl
index 32b22c2..d214993 100644
--- a/test/tint/expressions/type_ctor/mat3x4/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/load/f16.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
f16mat3x4 m = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
- tint_symbol = f16mat3x4(m);
+ v.tint_symbol_1 = f16mat3x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/load/f32.wgsl.expected.ir.glsl
index 8703a40..a9be481 100644
--- a/test/tint/expressions/type_ctor/mat3x4/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/load/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat3x4 m = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
- tint_symbol = mat3x4(m);
+ v.tint_symbol_1 = mat3x4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.ir.glsl
index e3e18ea..e5bdd32 100644
--- a/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/zero/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat3x4 m = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
-f16mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.ir.glsl
index 0dd9f5f..ae59e01 100644
--- a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat3x4 m = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
-mat3x4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat3x4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.ir.glsl
index eeaa947..e72f425 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x2 m = f16mat4x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf), f16vec2(6.0hf, 7.0hf));
-f16mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat4x2(m);
+ v.tint_symbol_1 = f16mat4x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.ir.glsl
index 9629c40..358df2b 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));
-mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat4x2(m);
+ v.tint_symbol_1 = mat4x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.ir.glsl
index 0fd179c..fb84d5c 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x2 m = f16mat4x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf), f16vec2(6.0hf, 7.0hf));
-f16mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.ir.glsl
index 29b14b7..af444cc 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));
-mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.ir.glsl
index 0fd179c..fb84d5c 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x2 m = f16mat4x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf), f16vec2(6.0hf, 7.0hf));
-f16mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.ir.glsl
index 29b14b7..af444cc 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));
-mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.ir.glsl
index eeaa947..e72f425 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x2 m = f16mat4x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf), f16vec2(6.0hf, 7.0hf));
-f16mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat4x2(m);
+ v.tint_symbol_1 = f16mat4x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.ir.glsl
index 9629c40..358df2b 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));
-mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat4x2(m);
+ v.tint_symbol_1 = mat4x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index 4d56fd8..dfe043f 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));
+ v.tint_symbol_1 = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.ir.glsl
index 0fd179c..fb84d5c 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x2 m = f16mat4x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf), f16vec2(6.0hf, 7.0hf));
-f16mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.ir.glsl
index 29b14b7..af444cc 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));
-mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index 4d56fd8..dfe043f 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));
+ v.tint_symbol_1 = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.ir.glsl
index 0fd179c..fb84d5c 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x2 m = f16mat4x2(f16vec2(0.0hf, 1.0hf), f16vec2(2.0hf, 3.0hf), f16vec2(4.0hf, 5.0hf), f16vec2(6.0hf, 7.0hf));
-f16mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.ir.glsl
index 29b14b7..af444cc 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f));
-mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/load/f16.wgsl.expected.ir.glsl
index 39fb5bf..66f80b7 100644
--- a/test/tint/expressions/type_ctor/mat4x2/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/load/f16.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
f16mat4x2 m = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
- tint_symbol = f16mat4x2(m);
+ v.tint_symbol_1 = f16mat4x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/load/f32.wgsl.expected.ir.glsl
index b0edd8c..4971e68 100644
--- a/test/tint/expressions/type_ctor/mat4x2/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/load/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat4x2 m = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
- tint_symbol = mat4x2(m);
+ v.tint_symbol_1 = mat4x2(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.ir.glsl
index efa6139..e4517c8 100644
--- a/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/zero/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x2 m = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
-f16mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.ir.glsl
index 6873a65..20dcc01 100644
--- a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4x2 m = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
-mat4x2 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x2 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.glsl
index b4ab416..cea8209 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x3 m = f16mat4x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf), f16vec3(9.0hf, 10.0hf, 11.0hf));
-f16mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,5 +14,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, f16mat4x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, f16mat4x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.glsl
index b7e4998..2bb6429 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f));
-mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, mat4x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat4x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.glsl
index 7bd2000..0d9ae7d 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x3 m = f16mat4x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf), f16vec3(9.0hf, 10.0hf, 11.0hf));
-f16mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,5 +14,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.glsl
index 6dc33c1..0fba945 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f));
-mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.glsl
index 7bd2000..0d9ae7d 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x3 m = f16mat4x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf), f16vec3(9.0hf, 10.0hf, 11.0hf));
-f16mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,5 +14,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.glsl
index 6dc33c1..0fba945 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f));
-mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.glsl
index b4ab416..cea8209 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x3 m = f16mat4x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf), f16vec3(9.0hf, 10.0hf, 11.0hf));
-f16mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,5 +14,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, f16mat4x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, f16mat4x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.glsl
index b7e4998..2bb6429 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f));
-mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, mat4x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat4x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index ca6eff8..e04e8f3 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)));
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.glsl
index 7bd2000..0d9ae7d 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x3 m = f16mat4x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf), f16vec3(9.0hf, 10.0hf, 11.0hf));
-f16mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,5 +14,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.glsl
index 6dc33c1..0fba945 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f));
-mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index ca6eff8..e04e8f3 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -9,5 +12,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)));
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.glsl
index 7bd2000..0d9ae7d 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x3 m = f16mat4x3(f16vec3(0.0hf, 1.0hf, 2.0hf), f16vec3(3.0hf, 4.0hf, 5.0hf), f16vec3(6.0hf, 7.0hf, 8.0hf), f16vec3(9.0hf, 10.0hf, 11.0hf));
-f16mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,5 +14,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.glsl
index 6dc33c1..0fba945 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f));
-mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.glsl
index 9a6527b..bdfab94 100644
--- a/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,5 +14,5 @@
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
f16mat4x3 m = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
- tint_store_and_preserve_padding(tint_symbol, f16mat4x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, f16mat4x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.glsl
index 1b40aae..b43188f 100644
--- a/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.glsl
@@ -1,6 +1,9 @@
#version 310 es
-mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat4x3 m = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f));
- tint_store_and_preserve_padding(tint_symbol, mat4x3(m));
+ tint_store_and_preserve_padding(v.tint_symbol_1, mat4x3(m));
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.glsl
index 53c3fbe..3130e37 100644
--- a/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.glsl
@@ -2,7 +2,10 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4x3 m = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
-f16mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -11,5 +14,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.glsl
index 97ac1ed..dbd6a15 100644
--- a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
mat4x3 m = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f));
-mat4x3 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4x3 tint_symbol_1;
+} v;
void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
target[0u] = value_param[0u];
target[1u] = value_param[1u];
@@ -10,5 +13,5 @@
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_store_and_preserve_padding(tint_symbol, m);
+ tint_store_and_preserve_padding(v.tint_symbol_1, m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.ir.glsl
index 3cc8392..24d62f6 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4 m = f16mat4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf), f16vec4(12.0hf, 13.0hf, 14.0hf, 15.0hf));
-f16mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat4(m);
+ v.tint_symbol_1 = f16mat4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.ir.glsl
index 3a3bc8d..c709126 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f));
-mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat4(m);
+ v.tint_symbol_1 = mat4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.ir.glsl
index a2483fa..a517a25 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4 m = f16mat4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf), f16vec4(12.0hf, 13.0hf, 14.0hf, 15.0hf));
-f16mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.ir.glsl
index 1012713..776e33b 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f));
-mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.ir.glsl
index a2483fa..a517a25 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4 m = f16mat4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf), f16vec4(12.0hf, 13.0hf, 14.0hf, 15.0hf));
-f16mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.ir.glsl
index 1012713..776e33b 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f));
-mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.ir.glsl
index 3cc8392..24d62f6 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4 m = f16mat4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf), f16vec4(12.0hf, 13.0hf, 14.0hf, 15.0hf));
-f16mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f16mat4(m);
+ v.tint_symbol_1 = f16mat4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.ir.glsl
index 3a3bc8d..c709126 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f));
-mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat4(m);
+ v.tint_symbol_1 = mat4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index 5f0280f..204cfc9 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f));
+ v.tint_symbol_1 = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.ir.glsl
index a2483fa..a517a25 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4 m = f16mat4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf), f16vec4(12.0hf, 13.0hf, 14.0hf, 15.0hf));
-f16mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.ir.glsl
index 1012713..776e33b 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f));
-mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index 5f0280f..204cfc9 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f));
+ v.tint_symbol_1 = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f));
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.ir.glsl
index a2483fa..a517a25 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4 m = f16mat4(f16vec4(0.0hf, 1.0hf, 2.0hf, 3.0hf), f16vec4(4.0hf, 5.0hf, 6.0hf, 7.0hf), f16vec4(8.0hf, 9.0hf, 10.0hf, 11.0hf), f16vec4(12.0hf, 13.0hf, 14.0hf, 15.0hf));
-f16mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.ir.glsl
index 1012713..776e33b 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f));
-mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/load/f16.wgsl.expected.ir.glsl
index 5f24bee..2de302f 100644
--- a/test/tint/expressions/type_ctor/mat4x4/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/load/f16.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
#extension GL_AMD_gpu_shader_half_float: require
-f16mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
f16mat4 m = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
- tint_symbol = f16mat4(m);
+ v.tint_symbol_1 = f16mat4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/load/f32.wgsl.expected.ir.glsl
index 0dd6a43..d2d5ec3 100644
--- a/test/tint/expressions/type_ctor/mat4x4/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/load/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
mat4 m = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
- tint_symbol = mat4(m);
+ v.tint_symbol_1 = mat4(m);
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.ir.glsl
index e2d1325..2020348 100644
--- a/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/zero/f16.wgsl.expected.ir.glsl
@@ -2,8 +2,11 @@
#extension GL_AMD_gpu_shader_half_float: require
f16mat4 m = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
-f16mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ f16mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.ir.glsl
index 9770713..fad3d9b 100644
--- a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
mat4 m = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
-mat4 tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat4 tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = m;
+ v.tint_symbol_1 = m;
}
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin.wgsl.expected.ir.glsl
index f297654..16ea413 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1116 internal compiler error: TINT_UNREACHABLE unhandled core builtin: select
********************************************************************
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location.wgsl.expected.ir.glsl
index f297654..16ea413 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1116 internal compiler error: TINT_UNREACHABLE unhandled core builtin: select
********************************************************************
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location_in_struct.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location_in_struct.wgsl.expected.ir.glsl
index f297654..16ea413 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_and_location_in_struct.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1116 internal compiler error: TINT_UNREACHABLE unhandled core builtin: select
********************************************************************
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct.wgsl.expected.ir.glsl
index f297654..16ea413 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1116 internal compiler error: TINT_UNREACHABLE unhandled core builtin: select
********************************************************************
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location.wgsl.expected.ir.glsl
index f297654..16ea413 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1116 internal compiler error: TINT_UNREACHABLE unhandled core builtin: select
********************************************************************
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location_in_struct.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location_in_struct.wgsl.expected.ir.glsl
index f297654..16ea413 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/builtin_in_struct_and_location_in_struct.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1116 internal compiler error: TINT_UNREACHABLE unhandled core builtin: select
********************************************************************
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin.wgsl.expected.ir.glsl
index f297654..16ea413 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1116 internal compiler error: TINT_UNREACHABLE unhandled core builtin: select
********************************************************************
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin_in_struct.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin_in_struct.wgsl.expected.ir.glsl
index f297654..16ea413 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/invariant_builtin_in_struct.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1116 internal compiler error: TINT_UNREACHABLE unhandled core builtin: select
********************************************************************
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/location.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/location.wgsl.expected.ir.glsl
index f297654..16ea413 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/location.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/location.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1116 internal compiler error: TINT_UNREACHABLE unhandled core builtin: select
********************************************************************
diff --git a/test/tint/extensions/pixel_local/entry_point_use/additional_params/location_in_struct.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/additional_params/location_in_struct.wgsl.expected.ir.glsl
index f297654..16ea413 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/additional_params/location_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/additional_params/location_in_struct.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:1116 internal compiler error: TINT_UNREACHABLE unhandled core builtin: select
********************************************************************
diff --git a/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.glsl
index aed01fb..3e9b53a 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
#version 310 es
@@ -23,8 +23,8 @@
return Out(vec4(10.0f), vec4(20.0f), vec4(30.0f));
}
error: Error parsing GLSL shader:
-ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
-ERROR: 0:6: '' : compilation terminated
+ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:6: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/single_attachment.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/single_attachment.wgsl.expected.ir.glsl
index cef6e14..728b28e 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/single_attachment.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/multiple_outputs/single_attachment.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
#version 310 es
@@ -21,8 +21,8 @@
return Out(vec4(10.0f), vec4(20.0f), vec4(30.0f));
}
error: Error parsing GLSL shader:
-ERROR: 0:8: 'float' : type requires declaration of default precision qualifier
-ERROR: 0:8: '' : compilation terminated
+ERROR: 0:8: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/tint/extensions/pixel_local/entry_point_use/one_output/multiple_attachments.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/one_output/multiple_attachments.wgsl.expected.ir.glsl
index 82ce66b..959fef6 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/one_output/multiple_attachments.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/one_output/multiple_attachments.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
#version 310 es
@@ -17,8 +17,8 @@
return vec4(2.0f);
}
error: Error parsing GLSL shader:
-ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
-ERROR: 0:6: '' : compilation terminated
+ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:6: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/tint/extensions/pixel_local/entry_point_use/one_output/single_attachment.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/one_output/single_attachment.wgsl.expected.ir.glsl
index 612435e..d0fd55f 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/one_output/single_attachment.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/one_output/single_attachment.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
#version 310 es
@@ -16,7 +16,7 @@
}
error: Error parsing GLSL shader:
ERROR: 0:11: 'float' : entry point cannot return a value
-ERROR: 0:11: '' : compilation terminated
+ERROR: 0:11: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/multiple_attachments.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/multiple_attachments.wgsl.expected.ir.glsl
index 8bc7f50..681d36a 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/multiple_attachments.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/multiple_attachments.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
#version 310 es
@@ -16,8 +16,8 @@
P.a = (P.a + 42u);
}
error: Error parsing GLSL shader:
-ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
-ERROR: 0:6: '' : compilation terminated
+ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:6: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/single_attachment.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/single_attachment.wgsl.expected.ir.glsl
index 64e1fa1..94504b6 100644
--- a/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/single_attachment.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/entry_point_use/zero_outputs/single_attachment.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-#version 310 es
+SKIP: INVALID
struct PixelLocal {
uint a;
diff --git a/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.glsl
index 6eb2bdb..3c14df4 100644
--- a/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/multiple_attachments.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
#version 310 es
@@ -34,8 +34,8 @@
return Out(vec4(10.0f), vec4(20.0f), vec4(30.0f));
}
error: Error parsing GLSL shader:
-ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
-ERROR: 0:6: '' : compilation terminated
+ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:6: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/single_attachment.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/single_attachment.wgsl.expected.ir.glsl
index bbbe4b1..0547a0d 100644
--- a/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/single_attachment.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/indirect_use/multiple_outputs/single_attachment.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
#version 310 es
@@ -32,8 +32,8 @@
return Out(vec4(10.0f), vec4(20.0f), vec4(30.0f));
}
error: Error parsing GLSL shader:
-ERROR: 0:8: 'float' : type requires declaration of default precision qualifier
-ERROR: 0:8: '' : compilation terminated
+ERROR: 0:8: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:8: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/tint/extensions/pixel_local/indirect_use/one_output/multiple_attachments.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/indirect_use/one_output/multiple_attachments.wgsl.expected.ir.glsl
index 317556a..2917150 100644
--- a/test/tint/extensions/pixel_local/indirect_use/one_output/multiple_attachments.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/indirect_use/one_output/multiple_attachments.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
#version 310 es
@@ -28,8 +28,8 @@
return vec4(2.0f);
}
error: Error parsing GLSL shader:
-ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
-ERROR: 0:6: '' : compilation terminated
+ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:6: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/tint/extensions/pixel_local/indirect_use/one_output/single_attachment.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/indirect_use/one_output/single_attachment.wgsl.expected.ir.glsl
index 9ef76bc..8b5799f 100644
--- a/test/tint/extensions/pixel_local/indirect_use/one_output/single_attachment.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/indirect_use/one_output/single_attachment.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
#version 310 es
@@ -27,7 +27,7 @@
}
error: Error parsing GLSL shader:
ERROR: 0:22: 'float' : entry point cannot return a value
-ERROR: 0:22: '' : compilation terminated
+ERROR: 0:22: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/tint/extensions/pixel_local/indirect_use/zero_outputs/multiple_attachments.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/indirect_use/zero_outputs/multiple_attachments.wgsl.expected.ir.glsl
index 73d90056..42f421c 100644
--- a/test/tint/extensions/pixel_local/indirect_use/zero_outputs/multiple_attachments.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/indirect_use/zero_outputs/multiple_attachments.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
#version 310 es
@@ -27,8 +27,8 @@
f2();
}
error: Error parsing GLSL shader:
-ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
-ERROR: 0:6: '' : compilation terminated
+ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
+ERROR: 0:6: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
diff --git a/test/tint/extensions/pixel_local/indirect_use/zero_outputs/single_attachment.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/indirect_use/zero_outputs/single_attachment.wgsl.expected.ir.glsl
index 4897dd4..8becfd0 100644
--- a/test/tint/extensions/pixel_local/indirect_use/zero_outputs/single_attachment.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/indirect_use/zero_outputs/single_attachment.wgsl.expected.ir.glsl
@@ -1,3 +1,5 @@
+SKIP: INVALID
+
#version 310 es
struct PixelLocal {
diff --git a/test/tint/extensions/pixel_local/ptr/local.wgsl.expected.ir.glsl b/test/tint/extensions/pixel_local/ptr/local.wgsl.expected.ir.glsl
index 4687334..e2d5618 100644
--- a/test/tint/extensions/pixel_local/ptr/local.wgsl.expected.ir.glsl
+++ b/test/tint/extensions/pixel_local/ptr/local.wgsl.expected.ir.glsl
@@ -1,4 +1,4 @@
-SKIP: FAILED
+SKIP: INVALID
<dawn>/src/tint/lang/glsl/writer/printer/printer.cc:489 internal compiler error: TINT_ASSERT(!l->Result(0)->Type()->Is<core::type::Pointer>())
********************************************************************
diff --git a/test/tint/identifiers/underscore/double/alias.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/double/alias.wgsl.expected.ir.glsl
index d725bd5..f07ad75 100644
--- a/test/tint/identifiers/underscore/double/alias.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/double/alias.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int c = 0;
int d = 0;
- s = (c + d);
+ v.tint_symbol = (c + d);
}
diff --git a/test/tint/identifiers/underscore/double/const.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/double/const.wgsl.expected.ir.glsl
index 560f21c..a08880d 100644
--- a/test/tint/identifiers/underscore/double/const.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/double/const.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- s = 3;
+ v.tint_symbol = 3;
}
diff --git a/test/tint/identifiers/underscore/double/let.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/double/let.wgsl.expected.ir.glsl
index f045b53..b812d67 100644
--- a/test/tint/identifiers/underscore/double/let.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/double/let.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int a = 1;
int tint_symbol = a;
int b = a;
int tint_symbol_1 = tint_symbol;
- s = (((a + tint_symbol) + b) + tint_symbol_1);
+ v.tint_symbol_2 = (((a + tint_symbol) + b) + tint_symbol_1);
}
diff --git a/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.glsl
index e2a94b9..586ce70 100644
--- a/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2;
+} v;
void f(int tint_symbol) {
int b = tint_symbol;
- s = b;
+ v.tint_symbol_2 = b;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/identifiers/underscore/double/struct.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/double/struct.wgsl.expected.ir.glsl
index d502b00..6a01ea2 100644
--- a/test/tint/identifiers/underscore/double/struct.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/double/struct.wgsl.expected.ir.glsl
@@ -4,10 +4,13 @@
int tint_symbol_1;
};
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol c = tint_symbol(0);
int d = c.tint_symbol_1;
- s = (c.tint_symbol_1 + d);
+ v.tint_symbol_2 = (c.tint_symbol_1 + d);
}
diff --git a/test/tint/identifiers/underscore/double/var.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/double/var.wgsl.expected.ir.glsl
index d04fa6d..c83a956 100644
--- a/test/tint/identifiers/underscore/double/var.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/double/var.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2;
+} v;
int a = 1;
int tint_symbol = 2;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int b = a;
int tint_symbol_1 = tint_symbol;
- s = (b + tint_symbol_1);
+ v.tint_symbol_2 = (b + tint_symbol_1);
}
diff --git a/test/tint/identifiers/underscore/prefix/lower/alias.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/lower/alias.wgsl.expected.ir.glsl
index d725bd5..f07ad75 100644
--- a/test/tint/identifiers/underscore/prefix/lower/alias.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/lower/alias.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int c = 0;
int d = 0;
- s = (c + d);
+ v.tint_symbol = (c + d);
}
diff --git a/test/tint/identifiers/underscore/prefix/lower/const.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/lower/const.wgsl.expected.ir.glsl
index 560f21c..a08880d 100644
--- a/test/tint/identifiers/underscore/prefix/lower/const.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/lower/const.wgsl.expected.ir.glsl
@@ -1,7 +1,10 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- s = 3;
+ v.tint_symbol = 3;
}
diff --git a/test/tint/identifiers/underscore/prefix/lower/let.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/lower/let.wgsl.expected.ir.glsl
index ae2ae1a..d937403 100644
--- a/test/tint/identifiers/underscore/prefix/lower/let.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/lower/let.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int a = 1;
int _a = a;
int b = a;
int _b = _a;
- s = (((a + _a) + b) + _b);
+ v.tint_symbol = (((a + _a) + b) + _b);
}
diff --git a/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.glsl
index 8c85d38..a8bd770 100644
--- a/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ int tint_symbol_1;
+} v;
void f(int _a) {
int b = _a;
- s = b;
+ v.tint_symbol_1 = b;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/identifiers/underscore/prefix/lower/struct.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/lower/struct.wgsl.expected.ir.glsl
index 8c999d4..48a3f85 100644
--- a/test/tint/identifiers/underscore/prefix/lower/struct.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/lower/struct.wgsl.expected.ir.glsl
@@ -4,10 +4,13 @@
int _b;
};
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
_a c = _a(0);
int d = c._b;
- s = (c._b + d);
+ v.tint_symbol = (c._b + d);
}
diff --git a/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.ir.glsl
index a61be7d..deeee4a 100644
--- a/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/lower/var.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
int a = 1;
int _a = 2;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int b = a;
int _b = _a;
- s = (b + _b);
+ v.tint_symbol = (b + _b);
}
diff --git a/test/tint/identifiers/underscore/prefix/upper/alias.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/upper/alias.wgsl.expected.ir.glsl
index d725bd5..f07ad75 100644
--- a/test/tint/identifiers/underscore/prefix/upper/alias.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/upper/alias.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int c = 0;
int d = 0;
- s = (c + d);
+ v.tint_symbol = (c + d);
}
diff --git a/test/tint/identifiers/underscore/prefix/upper/let.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/upper/let.wgsl.expected.ir.glsl
index 424c2f3..ac1c716 100644
--- a/test/tint/identifiers/underscore/prefix/upper/let.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/upper/let.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int A = 1;
int _A = 2;
int B = A;
int _B = _A;
- s = (((A + _A) + B) + _B);
+ v.tint_symbol = (((A + _A) + B) + _B);
}
diff --git a/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.glsl
index 36375e4..17ff1be 100644
--- a/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ int tint_symbol_1;
+} v;
void f(int _A) {
int B = _A;
- s = B;
+ v.tint_symbol_1 = B;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/identifiers/underscore/prefix/upper/struct.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/upper/struct.wgsl.expected.ir.glsl
index bf13a69..25213c7 100644
--- a/test/tint/identifiers/underscore/prefix/upper/struct.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/upper/struct.wgsl.expected.ir.glsl
@@ -4,10 +4,13 @@
int _B;
};
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
_A c = _A(0);
int d = c._B;
- s = (c._B + d);
+ v.tint_symbol = (c._B + d);
}
diff --git a/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.ir.glsl b/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.ir.glsl
index 46e383e..148816a 100644
--- a/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.ir.glsl
+++ b/test/tint/identifiers/underscore/prefix/upper/var.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-int s;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ int tint_symbol;
+} v;
int A = 1;
int _A = 2;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int B = A;
int _B = _A;
- s = (B + _B);
+ v.tint_symbol = (B + _B);
}
diff --git a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.glsl b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.glsl
index 73e23eb..242c91a 100644
--- a/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.glsl
+++ b/test/tint/layout/storage/mat2x2/f32.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
mat2 m;
};
-SSBO ssbo;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SSBO tint_symbol;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- mat2 v = ssbo.m;
- ssbo.m = v;
+ mat2 v = v_1.tint_symbol.m;
+ v_1.tint_symbol.m = v;
}
diff --git a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.ir.glsl b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.ir.glsl
index 72de2d5..5fcd03e 100644
--- a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.ir.glsl
+++ b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.ir.glsl
@@ -8,10 +8,13 @@
strided_arr m[2];
};
-SSBO ssbo;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ SSBO tint_symbol;
+} v;
strided_arr[2] mat2x2_stride_16_to_arr(mat2 m) {
- strided_arr v = strided_arr(m[0u]);
- return strided_arr[2](v, strided_arr(m[1u]));
+ strided_arr v_1 = strided_arr(m[0u]);
+ return strided_arr[2](v_1, strided_arr(m[1u]));
}
mat2 arr_to_mat2x2_stride_16(strided_arr arr[2]) {
return mat2(arr[0u].el, arr[1u].el);
@@ -21,23 +24,23 @@
}
void tint_store_and_preserve_padding(inout strided_arr target[2], strided_arr value_param[2]) {
{
- uint v_1 = 0u;
- v_1 = 0u;
+ uint v_2 = 0u;
+ v_2 = 0u;
while(true) {
- uint v_2 = v_1;
- if ((v_2 >= 2u)) {
+ uint v_3 = v_2;
+ if ((v_3 >= 2u)) {
break;
}
- tint_store_and_preserve_padding_1(target[v_2], value_param[v_2]);
+ tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
{
- v_1 = (v_2 + 1u);
+ v_2 = (v_3 + 1u);
}
continue;
}
}
}
void f_1() {
- tint_store_and_preserve_padding(ssbo.m, mat2x2_stride_16_to_arr(arr_to_mat2x2_stride_16(ssbo.m)));
+ tint_store_and_preserve_padding(v.tint_symbol.m, mat2x2_stride_16_to_arr(arr_to_mat2x2_stride_16(v.tint_symbol.m)));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/loops/continue_in_switch_with_breakif.wgsl.expected.ir.glsl b/test/tint/loops/continue_in_switch_with_breakif.wgsl.expected.ir.glsl
index b2fb639..551e9ad 100644
--- a/test/tint/loops/continue_in_switch_with_breakif.wgsl.expected.ir.glsl
+++ b/test/tint/loops/continue_in_switch_with_breakif.wgsl.expected.ir.glsl
@@ -5,20 +5,25 @@
int i = 0;
{
while(true) {
+ bool tint_continue = false;
switch(i) {
case 0:
{
- {
- i = (i + 1);
- if ((i >= 4)) { break; }
- }
- continue;
+ tint_continue = true;
+ break;
}
default:
{
break;
}
}
+ if (tint_continue) {
+ {
+ i = (i + 1);
+ if ((i >= 4)) { break; }
+ }
+ continue;
+ }
{
i = (i + 1);
if ((i >= 4)) { break; }
diff --git a/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.glsl
index eea91bc..49c79a3 100644
--- a/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int arr[4];
};
-str S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ str tint_symbol_1;
+} v;
int[4] func() {
- return S.arr;
+ return v.tint_symbol_1.arr;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.glsl
index e046592..51f4df3 100644
--- a/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-int S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ int tint_symbol_1;
+} v;
int func() {
- return S;
+ return v.tint_symbol_1;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.glsl
index 2a798a4..ed241d8 100644
--- a/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int i;
};
-str S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ str tint_symbol_1;
+} v;
int func() {
- return S.i;
+ return v.tint_symbol_1.i;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.glsl
index 6d6d914..c27da90 100644
--- a/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int i;
};
-str S[4];
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ str tint_symbol_1[4];
+} v;
str func(uint pointer_indices[1]) {
- return S[pointer_indices[0u]];
+ return v.tint_symbol_1[pointer_indices[0u]];
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl
index 5ebd6e4..7c27b4b 100644
--- a/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-mat2 S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
vec2 func(uint pointer_indices[1]) {
- return S[pointer_indices[0u]];
+ return v.tint_symbol_1[pointer_indices[0u]];
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.glsl
index aac2ee1..f938fb3 100644
--- a/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-vec4 S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ vec4 tint_symbol_1;
+} v;
vec4 func() {
- return S;
+ return v.tint_symbol_1;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl
index 50c8d46..39ac723 100644
--- a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-mat2x4 S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
vec4 func(uint pointer_indices[1]) {
- return S[pointer_indices[0u]];
+ return v.tint_symbol_1[pointer_indices[0u]];
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.glsl
index 7e60da4..201d975 100644
--- a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
vec4 i;
};
-str S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ str tint_symbol_1;
+} v;
vec4 func() {
- return S.i;
+ return v.tint_symbol_1.i;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.glsl
index 4ab205c..cb204fb 100644
--- a/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
ivec4 arr[4];
};
-uniform str S;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ str tint_symbol_1;
+} v;
ivec4[4] func() {
- return S.arr;
+ return v.tint_symbol_1.arr;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.glsl
index 73681a9..6672b18 100644
--- a/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-uniform int S;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ int tint_symbol_1;
+} v;
int func() {
- return S;
+ return v.tint_symbol_1;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.glsl
index 6c90606..30c289c 100644
--- a/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int i;
};
-uniform str S;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ str tint_symbol_1;
+} v;
int func() {
- return S.i;
+ return v.tint_symbol_1.i;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.glsl
index 41dcb3b..e359b59 100644
--- a/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
ivec4 i;
};
-uniform str S[4];
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ str tint_symbol_1[4];
+} v;
str func(uint pointer_indices[1]) {
- return S[pointer_indices[0u]];
+ return v.tint_symbol_1[pointer_indices[0u]];
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl
index 3212ee8..863909e 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl
@@ -1,8 +1,12 @@
#version 310 es
-uniform mat2 S;
+layout(binding = 0, std140)
+uniform tint_symbol_2_std140_1_ubo {
+ vec2 tint_symbol_1_col0;
+ vec2 tint_symbol_1_col1;
+} v;
vec2 func(uint pointer_indices[1]) {
- return S[pointer_indices[0u]];
+ return mat2(v.tint_symbol_1_col0, v.tint_symbol_1_col1)[pointer_indices[0u]];
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.glsl
index 7b0b3b9..b692d86 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-uniform vec4 S;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ vec4 tint_symbol_1;
+} v;
vec4 func() {
- return S;
+ return v.tint_symbol_1;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl
index fddded8..0ace70b 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-uniform mat2x4 S;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ mat2x4 tint_symbol_1;
+} v;
vec4 func(uint pointer_indices[1]) {
- return S[pointer_indices[0u]];
+ return v.tint_symbol_1[pointer_indices[0u]];
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.glsl b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.glsl
index f0f926e..bd06562 100644
--- a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
vec4 i;
};
-uniform str S;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ str tint_symbol_1;
+} v;
vec4 func() {
- return S.i;
+ return v.tint_symbol_1.i;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.glsl b/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.glsl
index be9bf5c..087377f 100644
--- a/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int arr[4];
};
-str S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ str tint_symbol_1;
+} v;
void func() {
- S.arr = int[4](0, 0, 0, 0);
+ v.tint_symbol_1.arr = int[4](0, 0, 0, 0);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.glsl b/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.glsl
index 76bd46d5..b37a234 100644
--- a/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-int S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ int tint_symbol_1;
+} v;
void func() {
- S = 42;
+ v.tint_symbol_1 = 42;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.glsl b/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.glsl
index c585faf..85ff754 100644
--- a/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int i;
};
-str S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ str tint_symbol_1;
+} v;
void func() {
- S.i = 42;
+ v.tint_symbol_1.i = 42;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.glsl b/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.glsl
index 87039fc..c633440 100644
--- a/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int i;
};
-str S[4];
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ str tint_symbol_1[4];
+} v;
void func(uint pointer_indices[1]) {
- S[pointer_indices[0u]] = str(0);
+ v.tint_symbol_1[pointer_indices[0u]] = str(0);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl
index 94af5a1..67a026e 100644
--- a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-mat2 S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2 tint_symbol_1;
+} v;
void func(uint pointer_indices[1]) {
- S[pointer_indices[0u]] = vec2(0.0f);
+ v.tint_symbol_1[pointer_indices[0u]] = vec2(0.0f);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.glsl b/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.glsl
index eb586fc..3d1a9e6 100644
--- a/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-vec4 S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ vec4 tint_symbol_1;
+} v;
void func() {
- S = vec4(0.0f);
+ v.tint_symbol_1 = vec4(0.0f);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl
index 29a220e..15a4d53 100644
--- a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-mat2x4 S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ mat2x4 tint_symbol_1;
+} v;
void func(uint pointer_indices[1]) {
- S[pointer_indices[0u]] = vec4(0.0f);
+ v.tint_symbol_1[pointer_indices[0u]] = vec4(0.0f);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.glsl b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.glsl
index d65f99f..cfcd5d9 100644
--- a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.glsl
+++ b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
vec4 i;
};
-str S;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ str tint_symbol_1;
+} v;
void func() {
- S.i = vec4(0.0f);
+ v.tint_symbol_1.i = vec4(0.0f);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/shadowing/loop.wgsl.expected.ir.glsl b/test/tint/shadowing/loop.wgsl.expected.ir.glsl
index 5bb1c57..af31d39 100644
--- a/test/tint/shadowing/loop.wgsl.expected.ir.glsl
+++ b/test/tint/shadowing/loop.wgsl.expected.ir.glsl
@@ -1,19 +1,22 @@
#version 310 es
-int tint_symbol[10];
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ int tint_symbol_1[10];
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
int i = 0;
{
while(true) {
- int x = tint_symbol[i];
+ int x = v.tint_symbol_1[i];
{
- int x = tint_symbol[x];
+ int x = v.tint_symbol_1[x];
i = (i + x);
if ((i > 10)) { break; }
}
continue;
}
}
- tint_symbol[0] = i;
+ v.tint_symbol_1[0] = i;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.glsl
index 8a185c9..64569d9 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.glsl
@@ -12,7 +12,10 @@
InnerS a1[8];
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
@@ -24,7 +27,7 @@
} else {
break;
}
- s1.a1[uniforms.i] = v;
+ s1.a1[v_1.tint_symbol_1.i] = v;
{
i = (i + 1);
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.glsl
index 6a91908..7854704 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.glsl
@@ -12,7 +12,10 @@
InnerS a1[8];
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
@@ -26,7 +29,7 @@
}
i = (i + 1);
{
- s1.a1[uniforms.i] = v;
+ s1.a1[v_1.tint_symbol_1.i] = v;
}
continue;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.glsl
index 63231a0..c88de06 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.glsl
@@ -12,14 +12,17 @@
InnerS a1[8];
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
OuterS s1 = OuterS(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)));
int i = 0;
{
- s1.a1[uniforms.i] = v;
+ s1.a1[v_1.tint_symbol_1.i] = v;
while(true) {
if ((i < 4)) {
} else {
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.glsl
index a3a6fd0..b9ff149 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.glsl
@@ -18,7 +18,10 @@
};
uint nextIndex = 0u;
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
uint getNextIndex() {
nextIndex = (nextIndex + 1u);
return nextIndex;
@@ -27,6 +30,6 @@
void main() {
InnerS v = InnerS(0);
OuterS s = OuterS(S1[8](S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)))));
- uint v_1 = getNextIndex();
- s.a1[v_1].a2[uniforms.j] = v;
+ uint v_2 = getNextIndex();
+ s.a1[v_2].a2[v_1.tint_symbol_1.j] = v;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.glsl
index 3762854..bf67f7d 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.glsl
@@ -12,10 +12,13 @@
InnerS a1[8];
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
OuterS s1 = OuterS(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)));
- s1.a1[uniforms.i] = v;
+ s1.a1[v_1.tint_symbol_1.i] = v;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.glsl
index e2f5363..063b979 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.glsl
@@ -13,10 +13,13 @@
InnerS a1[8][8];
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
OuterS s1 = OuterS(InnerS[8][8](InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)), InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)), InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)), InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)), InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)), InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)), InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)), InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))));
- s1.a1[uniforms.i][uniforms.j] = v;
+ s1.a1[v_1.tint_symbol_1.i][v_1.tint_symbol_1.j] = v;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.glsl
index e0ea516..177b425 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.glsl
@@ -16,10 +16,13 @@
S1 a1[8];
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
OuterS s1 = OuterS(S1[8](S1(InnerS(0)), S1(InnerS(0)), S1(InnerS(0)), S1(InnerS(0)), S1(InnerS(0)), S1(InnerS(0)), S1(InnerS(0)), S1(InnerS(0))));
- s1.a1[uniforms.i].s2 = v;
+ s1.a1[v_1.tint_symbol_1.i].s2 = v;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.glsl
index f288422..8580f65 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.glsl
@@ -17,10 +17,13 @@
S1 a1[8];
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
OuterS s = OuterS(S1[8](S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))), S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)))));
- s.a1[uniforms.i].a2[uniforms.j] = v;
+ s.a1[v_1.tint_symbol_1.i].a2[v_1.tint_symbol_1.j] = v;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.glsl
index 7570bbb..b3cad03 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
struct Uniforms {
@@ -10,23 +8,16 @@
int v;
};
-struct OuterS {
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
+layout(binding = 0, std430)
+buffer OuterS_1_ssbo {
InnerS a1[];
-};
-
-uniform Uniforms uniforms;
-OuterS s1;
+} s1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
- s1.a1[uniforms.i] = v;
+ s1.a1[v_1.tint_symbol_1.i] = v;
}
-error: Error parsing GLSL shader:
-ERROR: 0:12: '' : array size required
-ERROR: 0:13: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.glsl
index 1348baf..1a81145 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.glsl
@@ -1,5 +1,3 @@
-SKIP: FAILED
-
#version 310 es
struct Uniforms {
@@ -15,23 +13,16 @@
InnerS a2[8];
};
-struct OuterS {
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
+layout(binding = 0, std430)
+buffer OuterS_1_ssbo {
S1 a1[];
-};
-
-uniform Uniforms uniforms;
-OuterS s;
+} s;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
- s.a1[uniforms.i].a2[uniforms.j] = v;
+ s.a1[v_1.tint_symbol_1.i].a2[v_1.tint_symbol_1.j] = v;
}
-error: Error parsing GLSL shader:
-ERROR: 0:17: '' : array size required
-ERROR: 0:18: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
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 2a1d7b5..2fbd5e7 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
@@ -8,10 +8,13 @@
mat2x4 m1;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v;
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;
+ s1.m1[v.tint_symbol_1.i] = vec4(1.0f);
+ s1.m1[v.tint_symbol_1.i][v.tint_symbol_1.i] = 1.0f;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.glsl
index b26df73..1c894f9 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.glsl
@@ -13,11 +13,14 @@
InnerS a2[8];
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
OuterS s1 = OuterS(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)), InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0)));
- s1.a1[uniforms.i] = v;
- s1.a2[uniforms.i] = v;
+ s1.a1[v_1.tint_symbol_1.i] = v;
+ s1.a2[v_1.tint_symbol_1.i] = v;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.glsl
index 4224c91..029a539 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.glsl
@@ -16,10 +16,13 @@
S1 s2;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
InnerS v = InnerS(0);
OuterS s1 = OuterS(S1(InnerS[8](InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0), InnerS(0))));
- s1.s2.a[uniforms.i] = v;
+ s1.s2.a[v_1.tint_symbol_1.i] = v;
}
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 0aaa6f8..c4d85e1 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
@@ -8,9 +8,12 @@
vec3 v1;
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v;
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;
+ s1.v1[v.tint_symbol_1.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 ee105b5..c30eaa3 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
@@ -8,7 +8,10 @@
uint a1[8];
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
uint f(uint i) {
return (i + 1u);
}
@@ -16,6 +19,6 @@
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;
+ v[s1.a1[v_1.tint_symbol_1.i]] = 1.0f;
+ v[f(s1.a1[v_1.tint_symbol_1.i])] = 1.0f;
}
diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.glsl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.glsl
index 810270b..4489172 100644
--- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.glsl
@@ -12,10 +12,13 @@
InnerS a1[8];
};
-uniform Uniforms uniforms;
+layout(binding = 4, std140)
+uniform tint_symbol_2_1_ubo {
+ Uniforms tint_symbol_1;
+} v_1;
void f(inout OuterS p) {
InnerS v = InnerS(0);
- p.a1[uniforms.i] = v;
+ p.a1[v_1.tint_symbol_1.i] = v;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/assign/phony/addr_of_non_constructable.wgsl.expected.ir.glsl b/test/tint/statements/assign/phony/addr_of_non_constructable.wgsl.expected.ir.glsl
index 1ebd34c..d406c29 100644
--- a/test/tint/statements/assign/phony/addr_of_non_constructable.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/phony/addr_of_non_constructable.wgsl.expected.ir.glsl
@@ -1,21 +1,9 @@
-SKIP: FAILED
-
#version 310 es
-struct S {
+layout(binding = 0, std430)
+buffer S_1_ssbo {
int arr[];
-};
-
-S s;
+} s;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
-error: Error parsing GLSL shader:
-ERROR: 0:4: '' : array size required
-ERROR: 0:5: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/statements/assign/phony/addr_of_runtime_array.wgsl.expected.ir.glsl b/test/tint/statements/assign/phony/addr_of_runtime_array.wgsl.expected.ir.glsl
index 1ebd34c..d406c29 100644
--- a/test/tint/statements/assign/phony/addr_of_runtime_array.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/phony/addr_of_runtime_array.wgsl.expected.ir.glsl
@@ -1,21 +1,9 @@
-SKIP: FAILED
-
#version 310 es
-struct S {
+layout(binding = 0, std430)
+buffer S_1_ssbo {
int arr[];
-};
-
-S s;
+} s;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
-error: Error parsing GLSL shader:
-ERROR: 0:4: '' : array size required
-ERROR: 0:5: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/statements/assign/phony/storage_buffer.wgsl.expected.ir.glsl b/test/tint/statements/assign/phony/storage_buffer.wgsl.expected.ir.glsl
index 2dd9a07..d7f1b9d 100644
--- a/test/tint/statements/assign/phony/storage_buffer.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/phony/storage_buffer.wgsl.expected.ir.glsl
@@ -4,7 +4,10 @@
int i;
};
-S s;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ S tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
diff --git a/test/tint/statements/assign/phony/uniform_buffer.wgsl.expected.ir.glsl b/test/tint/statements/assign/phony/uniform_buffer.wgsl.expected.ir.glsl
index aa875f3..2f4d47d 100644
--- a/test/tint/statements/assign/phony/uniform_buffer.wgsl.expected.ir.glsl
+++ b/test/tint/statements/assign/phony/uniform_buffer.wgsl.expected.ir.glsl
@@ -4,7 +4,10 @@
int i;
};
-uniform S u;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ S tint_symbol_1;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
}
diff --git a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.glsl
index 00e1c6a..8c822f6 100644
--- a/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/matrix/minus.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
mat4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a - mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a - 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() {
diff --git a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.glsl
index 2d33cef..c5539c7 100644
--- a/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/matrix/plus.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
mat4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a + mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a + 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() {
diff --git a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.glsl
index 34ac696..201a543 100644
--- a/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/matrix/times-scalar.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
mat4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a * 2.0f);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a * 2.0f);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.glsl
index eaa062f..b23e4ec 100644
--- a/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/matrix/times.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
mat4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a * mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a * 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() {
diff --git a/test/tint/statements/compound_assign/scalar/and.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/scalar/and.wgsl.expected.ir.glsl
index 176f68d..1cb4281 100644
--- a/test/tint/statements/compound_assign/scalar/and.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/scalar/and.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a & 2);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a & 2);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/scalar/minus.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/scalar/minus.wgsl.expected.ir.glsl
index 6aec0cf..69b18e5 100644
--- a/test/tint/statements/compound_assign/scalar/minus.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/scalar/minus.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a - 2);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a - 2);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/scalar/or.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/scalar/or.wgsl.expected.ir.glsl
index 059fb74..a66586f 100644
--- a/test/tint/statements/compound_assign/scalar/or.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/scalar/or.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a | 2);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a | 2);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/scalar/plus.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/scalar/plus.wgsl.expected.ir.glsl
index f04b6a3..e0deba4 100644
--- a/test/tint/statements/compound_assign/scalar/plus.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/scalar/plus.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a + 2);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a + 2);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/scalar/shift_left.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/scalar/shift_left.wgsl.expected.ir.glsl
index 5c52632..9e908e2 100644
--- a/test/tint/statements/compound_assign/scalar/shift_left.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/scalar/shift_left.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a << (2u & 31u));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a << (2u & 31u));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/scalar/shift_right.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/scalar/shift_right.wgsl.expected.ir.glsl
index 9d08063..8b4de7b 100644
--- a/test/tint/statements/compound_assign/scalar/shift_right.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/scalar/shift_right.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a >> (2u & 31u));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a >> (2u & 31u));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/scalar/times.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/scalar/times.wgsl.expected.ir.glsl
index 3b8ff19..4f32754 100644
--- a/test/tint/statements/compound_assign/scalar/times.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/scalar/times.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a * 2);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a * 2);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/scalar/xor.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/scalar/xor.wgsl.expected.ir.glsl
index 5aca015..cb4f4de 100644
--- a/test/tint/statements/compound_assign/scalar/xor.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/scalar/xor.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
int a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a ^ 2);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a ^ 2);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/and.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/and.wgsl.expected.ir.glsl
index 1a1309f..9ffc09b 100644
--- a/test/tint/statements/compound_assign/vector/and.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/and.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
ivec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a & ivec4(2));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a & ivec4(2));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/divide-scalar.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/divide-scalar.wgsl.expected.ir.glsl
index 415d81c..66e3056 100644
--- a/test/tint/statements/compound_assign/vector/divide-scalar.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/divide-scalar.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
vec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a / 2.0f);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a / 2.0f);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/minus-scalar.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/minus-scalar.wgsl.expected.ir.glsl
index 6c6a8dd..307be90 100644
--- a/test/tint/statements/compound_assign/vector/minus-scalar.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/minus-scalar.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
vec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a - 2.0f);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a - 2.0f);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/minus.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/minus.wgsl.expected.ir.glsl
index 7b519df..2e1f2e7 100644
--- a/test/tint/statements/compound_assign/vector/minus.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/minus.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
ivec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a - ivec4(2));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a - ivec4(2));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/or.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/or.wgsl.expected.ir.glsl
index 85334f1..4b0cfdd 100644
--- a/test/tint/statements/compound_assign/vector/or.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/or.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
ivec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a | ivec4(2));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a | ivec4(2));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/plus-scalar.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/plus-scalar.wgsl.expected.ir.glsl
index 16c4f13..2b9ec35 100644
--- a/test/tint/statements/compound_assign/vector/plus-scalar.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/plus-scalar.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
vec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a + 2.0f);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a + 2.0f);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/plus.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/plus.wgsl.expected.ir.glsl
index cf3c448..eb4294a 100644
--- a/test/tint/statements/compound_assign/vector/plus.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/plus.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
ivec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a + ivec4(2));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a + ivec4(2));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/shift_left.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/shift_left.wgsl.expected.ir.glsl
index 8a4d0c7..95912d7 100644
--- a/test/tint/statements/compound_assign/vector/shift_left.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/shift_left.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
ivec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a << (uvec4(2u) & uvec4(31u)));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a << (uvec4(2u) & uvec4(31u)));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/shift_right.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/shift_right.wgsl.expected.ir.glsl
index 7eee516..1cd23df 100644
--- a/test/tint/statements/compound_assign/vector/shift_right.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/shift_right.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
ivec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a >> (uvec4(2u) & uvec4(31u)));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a >> (uvec4(2u) & uvec4(31u)));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/times-matrix.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/times-matrix.wgsl.expected.ir.glsl
index 6053f4a..ca38e1f 100644
--- a/test/tint/statements/compound_assign/vector/times-matrix.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/times-matrix.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
vec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a * mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a * 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() {
diff --git a/test/tint/statements/compound_assign/vector/times-scalar.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/times-scalar.wgsl.expected.ir.glsl
index 684f4b2..8f4124d 100644
--- a/test/tint/statements/compound_assign/vector/times-scalar.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/times-scalar.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
vec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a * 2.0f);
+ v_1.tint_symbol.a = (v_1.tint_symbol.a * 2.0f);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/times.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/times.wgsl.expected.ir.glsl
index 3627dd3..4d7462f 100644
--- a/test/tint/statements/compound_assign/vector/times.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/times.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
ivec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a * ivec4(2));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a * ivec4(2));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/compound_assign/vector/xor.wgsl.expected.ir.glsl b/test/tint/statements/compound_assign/vector/xor.wgsl.expected.ir.glsl
index 0100b9b..6429974 100644
--- a/test/tint/statements/compound_assign/vector/xor.wgsl.expected.ir.glsl
+++ b/test/tint/statements/compound_assign/vector/xor.wgsl.expected.ir.glsl
@@ -4,9 +4,12 @@
ivec4 a;
};
-S v;
+layout(binding = 0, std430)
+buffer tint_symbol_1_1_ssbo {
+ S tint_symbol;
+} v_1;
void foo() {
- v.a = (v.a ^ ivec4(2));
+ v_1.tint_symbol.a = (v_1.tint_symbol.a ^ ivec4(2));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/decrement/array_element.wgsl.expected.ir.glsl b/test/tint/statements/decrement/array_element.wgsl.expected.ir.glsl
index 7e0e566..9d423ac 100644
--- a/test/tint/statements/decrement/array_element.wgsl.expected.ir.glsl
+++ b/test/tint/statements/decrement/array_element.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-uint a[];
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ uint tint_symbol_1[];
+} v;
void tint_symbol() {
- a[1] = (a[1] - 1u);
+ v.tint_symbol_1[1] = (v.tint_symbol_1[1] - 1u);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.glsl b/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.glsl
index eea7937..f89a69a 100644
--- a/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.glsl
+++ b/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.glsl
@@ -1,15 +1,18 @@
#version 310 es
-uint i;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ uint tint_symbol_1;
+} v;
void tint_symbol() {
{
while(true) {
- if ((i < 10u)) {
+ if ((v.tint_symbol_1 < 10u)) {
} else {
break;
}
{
- i = (i - 1u);
+ v.tint_symbol_1 = (v.tint_symbol_1 - 1u);
}
continue;
}
diff --git a/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.glsl b/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.glsl
index 9f3a357..5566863 100644
--- a/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.glsl
+++ b/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-uint i;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ uint tint_symbol_1;
+} v;
void tint_symbol() {
{
- i = (i - 1u);
+ v.tint_symbol_1 = (v.tint_symbol_1 - 1u);
while(true) {
- if ((i < 10u)) {
+ if ((v.tint_symbol_1 < 10u)) {
} else {
break;
}
diff --git a/test/tint/statements/decrement/storage.wgsl.expected.ir.glsl b/test/tint/statements/decrement/storage.wgsl.expected.ir.glsl
index c86eece..853e812 100644
--- a/test/tint/statements/decrement/storage.wgsl.expected.ir.glsl
+++ b/test/tint/statements/decrement/storage.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-uint i;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ uint tint_symbol_1;
+} v;
void tint_symbol() {
- i = (i - 1u);
+ v.tint_symbol_1 = (v.tint_symbol_1 - 1u);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
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 fcce63e..43bd246 100644
--- a/test/tint/statements/decrement/vector_component.wgsl.expected.ir.glsl
+++ b/test/tint/statements/decrement/vector_component.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
-uvec4 a;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ uvec4 tint_symbol_1;
+} v;
void tint_symbol() {
- a[1] = (a.y - 1u);
- a[2u] = (a.z - 1u);
+ v.tint_symbol_1[1] = (v.tint_symbol_1.y - 1u);
+ v.tint_symbol_1[2u] = (v.tint_symbol_1.z - 1u);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/decrement/workgroup.wgsl.expected.ir.glsl b/test/tint/statements/decrement/workgroup.wgsl.expected.ir.glsl
index 7dc8753..5175407 100644
--- a/test/tint/statements/decrement/workgroup.wgsl.expected.ir.glsl
+++ b/test/tint/statements/decrement/workgroup.wgsl.expected.ir.glsl
@@ -1,6 +1,6 @@
#version 310 es
-int i;
+shared int i;
void tint_symbol() {
i = (i - 1);
}
diff --git a/test/tint/statements/discard/helper_functions.wgsl.expected.ir.glsl b/test/tint/statements/discard/helper_functions.wgsl.expected.ir.glsl
index d554b7d..b505ac3 100644
--- a/test/tint/statements/discard/helper_functions.wgsl.expected.ir.glsl
+++ b/test/tint/statements/discard/helper_functions.wgsl.expected.ir.glsl
@@ -3,18 +3,24 @@
precision highp int;
-int non_uniform_global;
-float tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_5_1_ssbo {
+ float tint_symbol_4;
+} v_1;
bool continue_execution = true;
void foo() {
- if ((non_uniform_global < 0)) {
+ if ((v.tint_symbol_2 < 0)) {
continue_execution = false;
}
}
void bar() {
- float v = dFdx(1.0f);
+ float v_2 = dFdx(1.0f);
if (continue_execution) {
- tint_symbol = v;
+ v_1.tint_symbol_4 = v_2;
}
}
void main() {
diff --git a/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.glsl b/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.glsl
index eae44cd..25d379e 100644
--- a/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.glsl
+++ b/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.glsl
@@ -3,26 +3,32 @@
precision highp int;
-int non_uniform_global;
-float tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_5_1_ssbo {
+ float tint_symbol_4;
+} v_1;
bool continue_execution = true;
void main() {
- if ((non_uniform_global < 0)) {
+ if ((v.tint_symbol_2 < 0)) {
continue_execution = false;
}
- float v = dFdx(1.0f);
+ float v_2 = dFdx(1.0f);
if (continue_execution) {
- tint_symbol = v;
+ v_1.tint_symbol_4 = v_2;
}
- if ((tint_symbol < 0.0f)) {
+ if ((v_1.tint_symbol_4 < 0.0f)) {
int i = 0;
{
while(true) {
- float v_1 = tint_symbol;
- if ((v_1 > float(i))) {
- float v_2 = float(i);
+ float v_3 = v_1.tint_symbol_4;
+ if ((v_3 > float(i))) {
+ float v_4 = float(i);
if (continue_execution) {
- tint_symbol = v_2;
+ v_1.tint_symbol_4 = v_4;
}
if (!(continue_execution)) {
discard;
diff --git a/test/tint/statements/discard/nested_return.wgsl.expected.ir.glsl b/test/tint/statements/discard/nested_return.wgsl.expected.ir.glsl
index dd4dc4f..b790c97 100644
--- a/test/tint/statements/discard/nested_return.wgsl.expected.ir.glsl
+++ b/test/tint/statements/discard/nested_return.wgsl.expected.ir.glsl
@@ -3,10 +3,13 @@
precision highp int;
-int non_uniform_global;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ int tint_symbol_1;
+} v;
bool continue_execution = true;
void main() {
- if ((non_uniform_global < 0)) {
+ if ((v.tint_symbol_1 < 0)) {
continue_execution = false;
}
if (!(continue_execution)) {
diff --git a/test/tint/statements/discard/non_uniform.wgsl.expected.ir.glsl b/test/tint/statements/discard/non_uniform.wgsl.expected.ir.glsl
index c878a3e..134d826 100644
--- a/test/tint/statements/discard/non_uniform.wgsl.expected.ir.glsl
+++ b/test/tint/statements/discard/non_uniform.wgsl.expected.ir.glsl
@@ -3,16 +3,22 @@
precision highp int;
-int non_uniform_global;
-float tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2;
+} v;
+layout(binding = 1, std430)
+buffer tint_symbol_5_1_ssbo {
+ float tint_symbol_4;
+} v_1;
bool continue_execution = true;
void main() {
- if ((non_uniform_global < 0)) {
+ if ((v.tint_symbol_2 < 0)) {
continue_execution = false;
}
- float v = dFdx(1.0f);
+ float v_2 = dFdx(1.0f);
if (continue_execution) {
- tint_symbol = v;
+ v_1.tint_symbol_4 = v_2;
}
if (!(continue_execution)) {
discard;
diff --git a/test/tint/statements/increment/array_element.wgsl.expected.ir.glsl b/test/tint/statements/increment/array_element.wgsl.expected.ir.glsl
index 1023a2d..c4bcd7f 100644
--- a/test/tint/statements/increment/array_element.wgsl.expected.ir.glsl
+++ b/test/tint/statements/increment/array_element.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-uint a[];
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ uint tint_symbol_1[];
+} v;
void tint_symbol() {
- a[1] = (a[1] + 1u);
+ v.tint_symbol_1[1] = (v.tint_symbol_1[1] + 1u);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.glsl b/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.glsl
index 88f49a7..9f99510 100644
--- a/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.glsl
+++ b/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.glsl
@@ -1,15 +1,18 @@
#version 310 es
-uint i;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ uint tint_symbol_1;
+} v;
void tint_symbol() {
{
while(true) {
- if ((i < 10u)) {
+ if ((v.tint_symbol_1 < 10u)) {
} else {
break;
}
{
- i = (i + 1u);
+ v.tint_symbol_1 = (v.tint_symbol_1 + 1u);
}
continue;
}
diff --git a/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.glsl b/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.glsl
index fc74e64..af362f5 100644
--- a/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.glsl
+++ b/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.glsl
@@ -1,11 +1,14 @@
#version 310 es
-uint i;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ uint tint_symbol_1;
+} v;
void tint_symbol() {
{
- i = (i + 1u);
+ v.tint_symbol_1 = (v.tint_symbol_1 + 1u);
while(true) {
- if ((i < 10u)) {
+ if ((v.tint_symbol_1 < 10u)) {
} else {
break;
}
diff --git a/test/tint/statements/increment/storage.wgsl.expected.ir.glsl b/test/tint/statements/increment/storage.wgsl.expected.ir.glsl
index 35d42c3..e0a2f2a 100644
--- a/test/tint/statements/increment/storage.wgsl.expected.ir.glsl
+++ b/test/tint/statements/increment/storage.wgsl.expected.ir.glsl
@@ -1,8 +1,11 @@
#version 310 es
-uint i;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ uint tint_symbol_1;
+} v;
void tint_symbol() {
- i = (i + 1u);
+ v.tint_symbol_1 = (v.tint_symbol_1 + 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 3353f78..7c654d8 100644
--- a/test/tint/statements/increment/vector_component.wgsl.expected.ir.glsl
+++ b/test/tint/statements/increment/vector_component.wgsl.expected.ir.glsl
@@ -1,9 +1,12 @@
#version 310 es
-uvec4 a;
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ uvec4 tint_symbol_1;
+} v;
void tint_symbol() {
- a[1] = (a.y + 1u);
- a[2u] = (a.z + 1u);
+ v.tint_symbol_1[1] = (v.tint_symbol_1.y + 1u);
+ v.tint_symbol_1[2u] = (v.tint_symbol_1.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/workgroup.wgsl.expected.ir.glsl b/test/tint/statements/increment/workgroup.wgsl.expected.ir.glsl
index b466682..6bcdf51 100644
--- a/test/tint/statements/increment/workgroup.wgsl.expected.ir.glsl
+++ b/test/tint/statements/increment/workgroup.wgsl.expected.ir.glsl
@@ -1,6 +1,6 @@
#version 310 es
-int i;
+shared int i;
void tint_symbol() {
i = (i + 1);
}
diff --git a/test/tint/types/buffers/storage.wgsl.expected.ir.glsl b/test/tint/types/buffers/storage.wgsl.expected.ir.glsl
index 332e24e..c3e3b13 100644
--- a/test/tint/types/buffers/storage.wgsl.expected.ir.glsl
+++ b/test/tint/types/buffers/storage.wgsl.expected.ir.glsl
@@ -1,19 +1,12 @@
-SKIP: FAILED
-
#version 310 es
precision highp float;
precision highp int;
-float weights[];
+layout(binding = 0, std430)
+buffer tint_symbol_2_1_ssbo {
+ float tint_symbol_1[];
+} v;
void main() {
- float a = weights[0];
+ float a = v.tint_symbol_1[0];
}
-error: Error parsing GLSL shader:
-ERROR: 0:6: '' : array size required
-ERROR: 1 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/types/buffers/uniform.wgsl.expected.ir.glsl b/test/tint/types/buffers/uniform.wgsl.expected.ir.glsl
index 41973ec..a435e46 100644
--- a/test/tint/types/buffers/uniform.wgsl.expected.ir.glsl
+++ b/test/tint/types/buffers/uniform.wgsl.expected.ir.glsl
@@ -3,7 +3,10 @@
precision highp int;
-uniform vec2 weights;
+layout(binding = 0, std140)
+uniform tint_symbol_2_1_ubo {
+ vec2 tint_symbol_1;
+} v;
void main() {
- float a = weights.x;
+ float a = v.tint_symbol_1.x;
}
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct_RuntimeArray.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct_RuntimeArray.spvasm.expected.ir.glsl
deleted file mode 100644
index e7dee5a..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_EmitStatement_AccessChain_Struct_RuntimeArray.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,28 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-struct S {
- float field0;
- float age[];
-};
-precision highp float;
-precision highp int;
-
-
-S myvar;
-void main_1() {
- myvar.age[2u] = 42.0f;
-}
-void main() {
- main_1();
-}
-error: Error parsing GLSL shader:
-ERROR: 0:4: 'float' : type requires declaration of default precision qualifier
-ERROR: 0:4: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_Cascaded.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_Cascaded.spvasm.expected.ir.glsl
deleted file mode 100644
index a2a58c4..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_Cascaded.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,28 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-struct S {
- uint field0;
- uint field1[];
-};
-precision highp float;
-precision highp int;
-
-
-S myvar;
-void main_1() {
- myvar.field1[1u] = 0u;
-}
-void main() {
- main_1();
-}
-error: Error parsing GLSL shader:
-ERROR: 0:5: '' : array size required
-ERROR: 0:6: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded.spvasm.expected.ir.glsl
deleted file mode 100644
index d23b472..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,29 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-struct S {
- uint field0;
- uint field1[];
-};
-precision highp float;
-precision highp int;
-
-
-S myvar;
-void main_1() {
- myvar.field0 = 0u;
- myvar.field1[1u] = 0u;
-}
-void main() {
- main_1();
-}
-error: Error parsing GLSL shader:
-ERROR: 0:5: '' : array size required
-ERROR: 0:6: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded_InBoundsAccessChain.spvasm.expected.ir.glsl b/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded_InBoundsAccessChain.spvasm.expected.ir.glsl
deleted file mode 100644
index d23b472..0000000
--- a/test/tint/unittest/reader/spirv/SpvParserMemoryTest_RemapStorageBuffer_ThroughAccessChain_NonCascaded_InBoundsAccessChain.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,29 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-struct S {
- uint field0;
- uint field1[];
-};
-precision highp float;
-precision highp int;
-
-
-S myvar;
-void main_1() {
- myvar.field0 = 0u;
- myvar.field1[1u] = 0u;
-}
-void main() {
- main_1();
-}
-error: Error parsing GLSL shader:
-ERROR: 0:5: '' : array size required
-ERROR: 0:6: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.glsl b/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.glsl
index c0da6c7..ba094bb 100644
--- a/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.glsl
+++ b/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.glsl
@@ -12,11 +12,14 @@
S2 s2;
};
-int tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2;
+} v;
int f(S3 s3) {
return s3.s2.s1.i;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = f(S3(S2(S1(42))));
+ v.tint_symbol_2 = f(S3(S2(S1(42))));
}
diff --git a/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.glsl b/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.glsl
index c0a5ad0..b2e8d04 100644
--- a/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.glsl
+++ b/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.glsl
@@ -13,8 +13,11 @@
};
S3 P = S3(S2(S1(42)));
-int tint_symbol;
+layout(binding = 0, std430)
+buffer tint_symbol_3_1_ssbo {
+ int tint_symbol_2;
+} v;
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
- tint_symbol = P.s2.s1.i;
+ v.tint_symbol_2 = P.s2.s1.i;
}
diff --git a/test/tint/var/uses/push_constant.wgsl.expected.ir.glsl b/test/tint/var/uses/push_constant.wgsl.expected.ir.glsl
index 8257cee..057aec6 100644
--- a/test/tint/var/uses/push_constant.wgsl.expected.ir.glsl
+++ b/test/tint/var/uses/push_constant.wgsl.expected.ir.glsl
@@ -1,8 +1,12 @@
#version 310 es
-uniform int a;
+struct tint_symbol_1 {
+ int tint_symbol;
+};
+
+layout(location = 0) uniform tint_symbol_1 v;
void uses_a() {
- int foo = a;
+ int foo = v.tint_symbol;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
@@ -10,9 +14,13 @@
}
#version 310 es
-uniform int a;
+struct tint_symbol_1 {
+ int tint_symbol;
+};
+
+layout(location = 0) uniform tint_symbol_1 v;
void uses_a() {
- int foo = a;
+ int foo = v.tint_symbol;
}
void uses_uses_a() {
uses_a();
@@ -23,9 +31,13 @@
}
#version 310 es
-uniform int b;
+struct tint_symbol_1 {
+ int tint_symbol;
+};
+
+layout(location = 0) uniform tint_symbol_1 v;
void uses_b() {
- int foo = b;
+ int foo = v.tint_symbol;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.spvasm.expected.ir.glsl b/test/tint/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.spvasm.expected.ir.glsl
deleted file mode 100644
index 981619a..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,69 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-struct doesNotMatter {
- float x_compute_data[];
-};
-
-doesNotMatter x_9;
-float nb_mod_() {
- float s = 0.0f;
- int i = 0;
- int GLF_live1i = 0;
- int GLF_live1_looplimiter2 = 0;
- float x_51 = 0.0f;
- float x_56 = 0.0f;
- s = 0.0f;
- i = 5;
- {
- while(true) {
- float x_50 = 0.0f;
- x_56 = 0.0f;
- if (true) {
- } else {
- break;
- }
- GLF_live1i = 0;
- {
- while(true) {
- x_51 = 0.0f;
- if (true) {
- } else {
- break;
- }
- if (false) {
- x_50 = 1.0f;
- s = x_50;
- x_51 = x_50;
- break;
- }
- return 42.0f;
- }
- }
- if ((5.0f <= x_51)) {
- x_56 = x_51;
- break;
- }
- return 42.0f;
- }
- }
- return x_56;
-}
-void main_1() {
- float x_32 = nb_mod_();
- x_9.x_compute_data[0] = x_32;
-}
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
- main_1();
-}
-error: Error parsing GLSL shader:
-ERROR: 0:4: '' : array size required
-ERROR: 0:5: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.wgsl.expected.ir.glsl b/test/tint/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.wgsl.expected.ir.glsl
deleted file mode 100644
index 3ed382e..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/two-nested-for-loops-with-returns/0-opt.wgsl.expected.ir.glsl
+++ /dev/null
@@ -1,72 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-struct doesNotMatter {
- float x_compute_data[];
-};
-
-doesNotMatter x_9;
-float nb_mod_() {
- float s = 0.0f;
- int i = 0;
- int GLF_live1i = 0;
- int GLF_live1_looplimiter2 = 0;
- float x_51 = 0.0f;
- float x_56_phi = 0.0f;
- s = 0.0f;
- i = 5;
- {
- while(true) {
- float x_50 = 0.0f;
- float x_51_phi = 0.0f;
- x_56_phi = 0.0f;
- if (true) {
- } else {
- break;
- }
- GLF_live1i = 0;
- {
- while(true) {
- x_51_phi = 0.0f;
- if (true) {
- } else {
- break;
- }
- if (false) {
- x_50 = 1.0f;
- s = x_50;
- x_51_phi = x_50;
- break;
- }
- return 42.0f;
- }
- }
- x_51 = x_51_phi;
- if ((5.0f <= x_51)) {
- x_56_phi = x_51;
- break;
- }
- return 42.0f;
- }
- }
- float x_56 = x_56_phi;
- return x_56;
-}
-void main_1() {
- float x_32 = nb_mod_();
- x_9.x_compute_data[0] = x_32;
-}
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
- main_1();
-}
-error: Error parsing GLSL shader:
-ERROR: 0:4: '' : array size required
-ERROR: 0:5: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.spvasm.expected.ir.glsl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.spvasm.expected.ir.glsl
deleted file mode 100644
index 38c14cf..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.spvasm.expected.ir.glsl
+++ /dev/null
@@ -1,47 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-struct Buf1 {
- int result;
-};
-
-struct Buf0 {
- uint values[];
-};
-
-Buf1 x_4;
-Buf0 x_7;
-void main_1() {
- uint i = 0u;
- x_4.result = 1;
- i = 0u;
- {
- while(true) {
- if ((i < 512u)) {
- } else {
- break;
- }
- if ((x_7.values[(i * 2u)] != i)) {
- x_4.result = 0;
- }
- {
- i = (i + 1u);
- }
- continue;
- }
- }
-}
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
- main_1();
-}
-error: Error parsing GLSL shader:
-ERROR: 0:8: '' : array size required
-ERROR: 0:9: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1
diff --git a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl.expected.ir.glsl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl.expected.ir.glsl
deleted file mode 100644
index 94c496f8..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/arraylength/array-stride-larger-than-element-size/1.wgsl.expected.ir.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-struct Buf1 {
- int result;
-};
-
-struct Buf0 {
- uint values[];
-};
-
-Buf1 x_4;
-Buf0 x_7;
-void main_1() {
- uint i = 0u;
- x_4.result = 1;
- i = 0u;
- {
- while(true) {
- uint x_33 = i;
- if ((x_33 < 512u)) {
- } else {
- break;
- }
- uint x_36 = i;
- uint x_39 = x_7.values[(x_36 * 2u)];
- uint x_40 = i;
- if ((x_39 != x_40)) {
- x_4.result = 0;
- }
- {
- uint x_45 = i;
- i = (x_45 + 1u);
- }
- continue;
- }
- }
-}
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
- main_1();
-}
-error: Error parsing GLSL shader:
-ERROR: 0:8: '' : array size required
-ERROR: 0:9: '' : compilation terminated
-ERROR: 2 compilation errors. No code generated.
-
-
-
-
-tint executable returned error: exit status 1