mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
tint/transform/std140: Correctly handle nested / bare matrices
Fixed tint:1673 Fixed tint:1674 Change-Id: Ifa5d2a69131cc1e4679d4d43143f857c7ba46dbd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102640 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
84b43d61fa
commit
90b29e500a
@@ -33,7 +33,7 @@ Inner conv_Inner(Inner_std140 val) {
|
||||
return Inner(mat4x2(val.m_0, val.m_1, val.m_2, val.m_3));
|
||||
}
|
||||
|
||||
Inner[4] conv_arr_4_Inner(Inner_std140 val[4]) {
|
||||
Inner[4] conv_arr4_Inner(Inner_std140 val[4]) {
|
||||
Inner arr[4] = Inner[4](Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)));
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
@@ -44,10 +44,10 @@ Inner[4] conv_arr_4_Inner(Inner_std140 val[4]) {
|
||||
}
|
||||
|
||||
Outer conv_Outer(Outer_std140 val) {
|
||||
return Outer(conv_arr_4_Inner(val.a));
|
||||
return Outer(conv_arr4_Inner(val.a));
|
||||
}
|
||||
|
||||
Outer[4] conv_arr_4_Outer(Outer_std140 val[4]) {
|
||||
Outer[4] conv_arr4_Outer(Outer_std140 val[4]) {
|
||||
Outer arr[4] = Outer[4](Outer(Inner[4](Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)))), Outer(Inner[4](Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)))), Outer(Inner[4](Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)))), Outer(Inner[4](Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)))));
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
@@ -114,18 +114,18 @@ float load_a_inner_p0_a_p1_m_p2_p3(uint p0, uint p1, uint p2, uint p3) {
|
||||
}
|
||||
|
||||
void f() {
|
||||
Outer p_a[4] = conv_arr_4_Outer(a.inner);
|
||||
Outer p_a[4] = conv_arr4_Outer(a.inner);
|
||||
int tint_symbol = i();
|
||||
Outer p_a_i = conv_Outer(a.inner[tint_symbol]);
|
||||
Inner p_a_i_a[4] = conv_arr_4_Inner(a.inner[tint_symbol].a);
|
||||
Inner p_a_i_a[4] = conv_arr4_Inner(a.inner[tint_symbol].a);
|
||||
int tint_symbol_1 = i();
|
||||
Inner p_a_i_a_i = conv_Inner(a.inner[tint_symbol].a[tint_symbol_1]);
|
||||
mat4x2 p_a_i_a_i_m = load_a_inner_p0_a_p1_m(uint(tint_symbol), uint(tint_symbol_1));
|
||||
int tint_symbol_2 = i();
|
||||
vec2 p_a_i_a_i_m_i = load_a_inner_p0_a_p1_m_p2(uint(tint_symbol), uint(tint_symbol_1), uint(tint_symbol_2));
|
||||
Outer l_a[4] = conv_arr_4_Outer(a.inner);
|
||||
Outer l_a[4] = conv_arr4_Outer(a.inner);
|
||||
Outer l_a_i = conv_Outer(a.inner[tint_symbol]);
|
||||
Inner l_a_i_a[4] = conv_arr_4_Inner(a.inner[tint_symbol].a);
|
||||
Inner l_a_i_a[4] = conv_arr4_Inner(a.inner[tint_symbol].a);
|
||||
Inner l_a_i_a_i = conv_Inner(a.inner[tint_symbol].a[tint_symbol_1]);
|
||||
mat4x2 l_a_i_a_i_m = load_a_inner_p0_a_p1_m(uint(tint_symbol), uint(tint_symbol_1));
|
||||
vec2 l_a_i_a_i_m_i = load_a_inner_p0_a_p1_m_p2(uint(tint_symbol), uint(tint_symbol_1), uint(tint_symbol_2));
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
OpMemberName %Inner 0 "m"
|
||||
OpName %conv_Inner "conv_Inner"
|
||||
OpName %val "val"
|
||||
OpName %conv_arr_4_Inner "conv_arr_4_Inner"
|
||||
OpName %conv_arr4_Inner "conv_arr4_Inner"
|
||||
OpName %val_0 "val"
|
||||
OpName %arr "arr"
|
||||
OpName %i_0 "i"
|
||||
@@ -32,7 +32,7 @@
|
||||
OpMemberName %Outer 0 "a"
|
||||
OpName %conv_Outer "conv_Outer"
|
||||
OpName %val_1 "val"
|
||||
OpName %conv_arr_4_Outer "conv_arr_4_Outer"
|
||||
OpName %conv_arr4_Outer "conv_arr4_Outer"
|
||||
OpName %val_2 "val"
|
||||
OpName %arr_0 "arr"
|
||||
OpName %i_1 "i"
|
||||
@@ -145,7 +145,7 @@
|
||||
%34 = OpCompositeConstruct %Inner %33
|
||||
OpReturnValue %34
|
||||
OpFunctionEnd
|
||||
%conv_arr_4_Inner = OpFunction %_arr_Inner_uint_4 None %35
|
||||
%conv_arr4_Inner = OpFunction %_arr_Inner_uint_4 None %35
|
||||
%val_0 = OpFunctionParameter %_arr_Inner_std140_uint_4
|
||||
%39 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %42
|
||||
@@ -186,11 +186,11 @@
|
||||
%val_1 = OpFunctionParameter %Outer_std140
|
||||
%75 = OpLabel
|
||||
%77 = OpCompositeExtract %_arr_Inner_std140_uint_4 %val_1 0
|
||||
%76 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr_4_Inner %77
|
||||
%76 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr4_Inner %77
|
||||
%78 = OpCompositeConstruct %Outer %76
|
||||
OpReturnValue %78
|
||||
OpFunctionEnd
|
||||
%conv_arr_4_Outer = OpFunction %_arr_Outer_uint_4 None %79
|
||||
%conv_arr4_Outer = OpFunction %_arr_Outer_uint_4 None %79
|
||||
%val_2 = OpFunctionParameter %_arr_Outer_std140_uint_4
|
||||
%83 = OpLabel
|
||||
%arr_0 = OpVariable %_ptr_Function__arr_Outer_uint_4 Function %86
|
||||
@@ -307,13 +307,13 @@
|
||||
%186 = OpFunctionCall %int %i
|
||||
%189 = OpAccessChain %_ptr_Uniform__arr_Outer_std140_uint_4 %a %uint_0
|
||||
%190 = OpLoad %_arr_Outer_std140_uint_4 %189
|
||||
%187 = OpFunctionCall %_arr_Outer_uint_4 %conv_arr_4_Outer %190
|
||||
%187 = OpFunctionCall %_arr_Outer_uint_4 %conv_arr4_Outer %190
|
||||
%193 = OpAccessChain %_ptr_Uniform_Outer_std140 %a %uint_0 %184
|
||||
%194 = OpLoad %Outer_std140 %193
|
||||
%191 = OpFunctionCall %Outer %conv_Outer %194
|
||||
%197 = OpAccessChain %_ptr_Uniform__arr_Inner_std140_uint_4 %a %uint_0 %184 %uint_0
|
||||
%198 = OpLoad %_arr_Inner_std140_uint_4 %197
|
||||
%195 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr_4_Inner %198
|
||||
%195 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr4_Inner %198
|
||||
%200 = OpAccessChain %_ptr_Uniform_Inner_std140 %a %uint_0 %184 %uint_0 %185
|
||||
%201 = OpLoad %Inner_std140 %200
|
||||
%199 = OpFunctionCall %Inner %conv_Inner %201
|
||||
|
||||
@@ -27,7 +27,7 @@ Inner conv_Inner(Inner_std140 val) {
|
||||
return Inner(mat4x2(val.m_0, val.m_1, val.m_2, val.m_3));
|
||||
}
|
||||
|
||||
Inner[4] conv_arr_4_Inner(Inner_std140 val[4]) {
|
||||
Inner[4] conv_arr4_Inner(Inner_std140 val[4]) {
|
||||
Inner arr[4] = Inner[4](Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)));
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
@@ -38,10 +38,10 @@ Inner[4] conv_arr_4_Inner(Inner_std140 val[4]) {
|
||||
}
|
||||
|
||||
Outer conv_Outer(Outer_std140 val) {
|
||||
return Outer(conv_arr_4_Inner(val.a));
|
||||
return Outer(conv_arr4_Inner(val.a));
|
||||
}
|
||||
|
||||
Outer[4] conv_arr_4_Outer(Outer_std140 val[4]) {
|
||||
Outer[4] conv_arr4_Outer(Outer_std140 val[4]) {
|
||||
Outer arr[4] = Outer[4](Outer(Inner[4](Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)))), Outer(Inner[4](Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)))), Outer(Inner[4](Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)))), Outer(Inner[4](Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)), Inner(mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)))));
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
@@ -56,15 +56,15 @@ mat4x2 load_a_inner_3_a_2_m() {
|
||||
}
|
||||
|
||||
void f() {
|
||||
Outer p_a[4] = conv_arr_4_Outer(a.inner);
|
||||
Outer p_a[4] = conv_arr4_Outer(a.inner);
|
||||
Outer p_a_3 = conv_Outer(a.inner[3u]);
|
||||
Inner p_a_3_a[4] = conv_arr_4_Inner(a.inner[3u].a);
|
||||
Inner p_a_3_a[4] = conv_arr4_Inner(a.inner[3u].a);
|
||||
Inner p_a_3_a_2 = conv_Inner(a.inner[3u].a[2u]);
|
||||
mat4x2 p_a_3_a_2_m = load_a_inner_3_a_2_m();
|
||||
vec2 p_a_3_a_2_m_1 = a.inner[3u].a[2u].m_1;
|
||||
Outer l_a[4] = conv_arr_4_Outer(a.inner);
|
||||
Outer l_a[4] = conv_arr4_Outer(a.inner);
|
||||
Outer l_a_3 = conv_Outer(a.inner[3u]);
|
||||
Inner l_a_3_a[4] = conv_arr_4_Inner(a.inner[3u].a);
|
||||
Inner l_a_3_a[4] = conv_arr4_Inner(a.inner[3u].a);
|
||||
Inner l_a_3_a_2 = conv_Inner(a.inner[3u].a[2u]);
|
||||
mat4x2 l_a_3_a_2_m = load_a_inner_3_a_2_m();
|
||||
vec2 l_a_3_a_2_m_1 = a.inner[3u].a[2u].m_1;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
OpMemberName %Inner 0 "m"
|
||||
OpName %conv_Inner "conv_Inner"
|
||||
OpName %val "val"
|
||||
OpName %conv_arr_4_Inner "conv_arr_4_Inner"
|
||||
OpName %conv_arr4_Inner "conv_arr4_Inner"
|
||||
OpName %val_0 "val"
|
||||
OpName %arr "arr"
|
||||
OpName %i "i"
|
||||
@@ -30,7 +30,7 @@
|
||||
OpMemberName %Outer 0 "a"
|
||||
OpName %conv_Outer "conv_Outer"
|
||||
OpName %val_1 "val"
|
||||
OpName %conv_arr_4_Outer "conv_arr_4_Outer"
|
||||
OpName %conv_arr4_Outer "conv_arr4_Outer"
|
||||
OpName %val_2 "val"
|
||||
OpName %arr_0 "arr"
|
||||
OpName %i_0 "i"
|
||||
@@ -114,7 +114,7 @@
|
||||
%23 = OpCompositeConstruct %Inner %22
|
||||
OpReturnValue %23
|
||||
OpFunctionEnd
|
||||
%conv_arr_4_Inner = OpFunction %_arr_Inner_uint_4 None %24
|
||||
%conv_arr4_Inner = OpFunction %_arr_Inner_uint_4 None %24
|
||||
%val_0 = OpFunctionParameter %_arr_Inner_std140_uint_4
|
||||
%28 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_Inner_uint_4 Function %31
|
||||
@@ -155,11 +155,11 @@
|
||||
%val_1 = OpFunctionParameter %Outer_std140
|
||||
%64 = OpLabel
|
||||
%66 = OpCompositeExtract %_arr_Inner_std140_uint_4 %val_1 0
|
||||
%65 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr_4_Inner %66
|
||||
%65 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr4_Inner %66
|
||||
%67 = OpCompositeConstruct %Outer %65
|
||||
OpReturnValue %67
|
||||
OpFunctionEnd
|
||||
%conv_arr_4_Outer = OpFunction %_arr_Outer_uint_4 None %68
|
||||
%conv_arr4_Outer = OpFunction %_arr_Outer_uint_4 None %68
|
||||
%val_2 = OpFunctionParameter %_arr_Outer_std140_uint_4
|
||||
%72 = OpLabel
|
||||
%arr_0 = OpVariable %_ptr_Function__arr_Outer_uint_4 Function %75
|
||||
@@ -214,13 +214,13 @@
|
||||
%126 = OpLabel
|
||||
%129 = OpAccessChain %_ptr_Uniform__arr_Outer_std140_uint_4 %a %uint_0
|
||||
%130 = OpLoad %_arr_Outer_std140_uint_4 %129
|
||||
%127 = OpFunctionCall %_arr_Outer_uint_4 %conv_arr_4_Outer %130
|
||||
%127 = OpFunctionCall %_arr_Outer_uint_4 %conv_arr4_Outer %130
|
||||
%133 = OpAccessChain %_ptr_Uniform_Outer_std140 %a %uint_0 %uint_3
|
||||
%134 = OpLoad %Outer_std140 %133
|
||||
%131 = OpFunctionCall %Outer %conv_Outer %134
|
||||
%137 = OpAccessChain %_ptr_Uniform__arr_Inner_std140_uint_4 %a %uint_0 %uint_3 %uint_0
|
||||
%138 = OpLoad %_arr_Inner_std140_uint_4 %137
|
||||
%135 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr_4_Inner %138
|
||||
%135 = OpFunctionCall %_arr_Inner_uint_4 %conv_arr4_Inner %138
|
||||
%140 = OpAccessChain %_ptr_Uniform_Inner_std140 %a %uint_0 %uint_3 %uint_0 %uint_2
|
||||
%141 = OpLoad %Inner_std140 %140
|
||||
%139 = OpFunctionCall %Inner %conv_Inner %141
|
||||
|
||||
@@ -42,7 +42,7 @@ S conv_S(S_std140 val) {
|
||||
return S(val.before, val.pad, mat4x2(val.m_0, val.m_1, val.m_2, val.m_3), val.after, val.pad_1);
|
||||
}
|
||||
|
||||
S[4] conv_arr_4_S(S_std140 val[4]) {
|
||||
S[4] conv_arr4_S(S_std140 val[4]) {
|
||||
S arr[4] = S[4](S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u));
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
@@ -57,7 +57,7 @@ mat4x2 load_u_inner_2_m() {
|
||||
}
|
||||
|
||||
void f() {
|
||||
a(conv_arr_4_S(u.inner));
|
||||
a(conv_arr4_S(u.inner));
|
||||
b(conv_S(u.inner[2u]));
|
||||
c(load_u_inner_2_m());
|
||||
d(u.inner[0u].m_1.yx);
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
OpName %f_1 "f_1"
|
||||
OpName %conv_S "conv_S"
|
||||
OpName %val "val"
|
||||
OpName %conv_arr_4_S "conv_arr_4_S"
|
||||
OpName %conv_arr4_S "conv_arr4_S"
|
||||
OpName %val_0 "val"
|
||||
OpName %arr "arr"
|
||||
OpName %i "i"
|
||||
@@ -135,7 +135,7 @@
|
||||
%46 = OpCompositeConstruct %S %39 %44 %45
|
||||
OpReturnValue %46
|
||||
OpFunctionEnd
|
||||
%conv_arr_4_S = OpFunction %_arr_S_uint_4 None %47
|
||||
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %47
|
||||
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
|
||||
%50 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %53
|
||||
@@ -190,7 +190,7 @@
|
||||
%107 = OpLabel
|
||||
%111 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
|
||||
%112 = OpLoad %_arr_S_std140_uint_4 %111
|
||||
%109 = OpFunctionCall %_arr_S_uint_4 %conv_arr_4_S %112
|
||||
%109 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %112
|
||||
%108 = OpFunctionCall %void %a %109
|
||||
%115 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%116 = OpLoad %S_std140 %115
|
||||
|
||||
@@ -28,7 +28,7 @@ S conv_S(S_std140 val) {
|
||||
return S(val.before, val.pad, mat4x2(val.m_0, val.m_1, val.m_2, val.m_3), val.after, val.pad_1);
|
||||
}
|
||||
|
||||
S[4] conv_arr_4_S(S_std140 val[4]) {
|
||||
S[4] conv_arr4_S(S_std140 val[4]) {
|
||||
S arr[4] = S[4](S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u));
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
@@ -43,7 +43,7 @@ mat4x2 load_u_inner_2_m() {
|
||||
}
|
||||
|
||||
void f() {
|
||||
p = conv_arr_4_S(u.inner);
|
||||
p = conv_arr4_S(u.inner);
|
||||
p[1] = conv_S(u.inner[2u]);
|
||||
p[3].m = load_u_inner_2_m();
|
||||
p[1].m[0] = u.inner[0u].m_1.yx;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
OpName %p "p"
|
||||
OpName %conv_S "conv_S"
|
||||
OpName %val "val"
|
||||
OpName %conv_arr_4_S "conv_arr_4_S"
|
||||
OpName %conv_arr4_S "conv_arr4_S"
|
||||
OpName %val_0 "val"
|
||||
OpName %arr "arr"
|
||||
OpName %i "i"
|
||||
@@ -104,7 +104,7 @@
|
||||
%28 = OpCompositeConstruct %S %21 %26 %27
|
||||
OpReturnValue %28
|
||||
OpFunctionEnd
|
||||
%conv_arr_4_S = OpFunction %_arr_S_uint_4 None %29
|
||||
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %29
|
||||
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
|
||||
%32 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %16
|
||||
@@ -159,7 +159,7 @@
|
||||
%89 = OpLabel
|
||||
%92 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
|
||||
%93 = OpLoad %_arr_S_std140_uint_4 %92
|
||||
%90 = OpFunctionCall %_arr_S_uint_4 %conv_arr_4_S %93
|
||||
%90 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %93
|
||||
OpStore %p %90
|
||||
%96 = OpAccessChain %_ptr_Private_S %p %int_1
|
||||
%98 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
|
||||
@@ -31,7 +31,7 @@ S conv_S(S_std140 val) {
|
||||
return S(val.before, val.pad, mat4x2(val.m_0, val.m_1, val.m_2, val.m_3), val.after, val.pad_1);
|
||||
}
|
||||
|
||||
S[4] conv_arr_4_S(S_std140 val[4]) {
|
||||
S[4] conv_arr4_S(S_std140 val[4]) {
|
||||
S arr[4] = S[4](S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u));
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
@@ -46,7 +46,7 @@ mat4x2 load_u_inner_2_m() {
|
||||
}
|
||||
|
||||
void f() {
|
||||
s.inner = conv_arr_4_S(u.inner);
|
||||
s.inner = conv_arr4_S(u.inner);
|
||||
s.inner[1] = conv_S(u.inner[2u]);
|
||||
s.inner[3].m = load_u_inner_2_m();
|
||||
s.inner[1].m[0] = u.inner[0u].m_1.yx;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
OpName %s "s"
|
||||
OpName %conv_S "conv_S"
|
||||
OpName %val "val"
|
||||
OpName %conv_arr_4_S "conv_arr_4_S"
|
||||
OpName %conv_arr4_S "conv_arr4_S"
|
||||
OpName %val_0 "val"
|
||||
OpName %arr "arr"
|
||||
OpName %i "i"
|
||||
@@ -112,7 +112,7 @@
|
||||
%28 = OpCompositeConstruct %S %21 %26 %27
|
||||
OpReturnValue %28
|
||||
OpFunctionEnd
|
||||
%conv_arr_4_S = OpFunction %_arr_S_uint_4 None %29
|
||||
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %29
|
||||
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
|
||||
%32 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %35
|
||||
@@ -168,7 +168,7 @@
|
||||
%92 = OpAccessChain %_ptr_StorageBuffer__arr_S_uint_4 %s %uint_0
|
||||
%95 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
|
||||
%96 = OpLoad %_arr_S_std140_uint_4 %95
|
||||
%93 = OpFunctionCall %_arr_S_uint_4 %conv_arr_4_S %96
|
||||
%93 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %96
|
||||
OpStore %92 %93
|
||||
%99 = OpAccessChain %_ptr_StorageBuffer_S %s %uint_0 %int_1
|
||||
%101 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
|
||||
@@ -28,7 +28,7 @@ S conv_S(S_std140 val) {
|
||||
return S(val.before, val.pad, mat4x2(val.m_0, val.m_1, val.m_2, val.m_3), val.after, val.pad_1);
|
||||
}
|
||||
|
||||
S[4] conv_arr_4_S(S_std140 val[4]) {
|
||||
S[4] conv_arr4_S(S_std140 val[4]) {
|
||||
S arr[4] = S[4](S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u), S(0, 0u, mat4x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), 0, 0u));
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
@@ -51,7 +51,7 @@ void f(uint local_invocation_index) {
|
||||
}
|
||||
}
|
||||
barrier();
|
||||
w = conv_arr_4_S(u.inner);
|
||||
w = conv_arr4_S(u.inner);
|
||||
w[1] = conv_S(u.inner[2u]);
|
||||
w[3].m = load_u_inner_2_m();
|
||||
w[1].m[0] = u.inner[0u].m_1.yx;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
OpName %w "w"
|
||||
OpName %conv_S "conv_S"
|
||||
OpName %val "val"
|
||||
OpName %conv_arr_4_S "conv_arr_4_S"
|
||||
OpName %conv_arr4_S "conv_arr4_S"
|
||||
OpName %val_0 "val"
|
||||
OpName %arr "arr"
|
||||
OpName %i "i"
|
||||
@@ -114,7 +114,7 @@
|
||||
%29 = OpCompositeConstruct %S %22 %27 %28
|
||||
OpReturnValue %29
|
||||
OpFunctionEnd
|
||||
%conv_arr_4_S = OpFunction %_arr_S_uint_4 None %30
|
||||
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %30
|
||||
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
|
||||
%33 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %36
|
||||
@@ -196,7 +196,7 @@
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
%113 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
|
||||
%114 = OpLoad %_arr_S_std140_uint_4 %113
|
||||
%111 = OpFunctionCall %_arr_S_uint_4 %conv_arr_4_S %114
|
||||
%111 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %114
|
||||
OpStore %w %111
|
||||
%116 = OpAccessChain %_ptr_Workgroup_S %w %int_1
|
||||
%118 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
|
||||
Reference in New Issue
Block a user