mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +00:00
tint: Preserve padding in matrices with three rows
The PreservePadding transform now decomposes writes to matrices with three rows into separate column vector writes, to avoid modifying padding between columns. Bug: tint:1571 Change-Id: If575f79bb87f52810783fd3338e2f3ce3228ab2e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121600 Auto-Submit: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
fe19fee3ea
commit
6176c85be8
@@ -74,17 +74,23 @@ layout(binding = 1, std430) buffer u_block_ssbo {
|
||||
S inner[4];
|
||||
} s;
|
||||
|
||||
void assign_and_preserve_padding_2_s_X_m(uint dest[1], f16mat2x3 value) {
|
||||
s.inner[dest[0]].m[0] = value[0u];
|
||||
s.inner[dest[0]].m[1] = value[1u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1_s_X(uint dest[1], S value) {
|
||||
s.inner[dest[0]].before = value.before;
|
||||
s.inner[dest[0]].m = value.m;
|
||||
uint tint_symbol[1] = uint[1](dest[0u]);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol, value.m);
|
||||
s.inner[dest[0]].after = value.after;
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_s(S value[4]) {
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
uint tint_symbol[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol, value[i]);
|
||||
uint tint_symbol_1[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,9 +115,10 @@ f16mat2x3 load_u_inner_2_m() {
|
||||
|
||||
void f() {
|
||||
assign_and_preserve_padding_s(conv_arr4_S(u.inner));
|
||||
uint tint_symbol_1[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, conv_S(u.inner[2u]));
|
||||
s.inner[3].m = load_u_inner_2_m();
|
||||
uint tint_symbol_2[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_2, conv_S(u.inner[2u]));
|
||||
uint tint_symbol_3[1] = uint[1](3u);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol_3, load_u_inner_2_m());
|
||||
s.inner[1].m[0] = u.inner[0u].m_1.zxy;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,14 @@ struct S {
|
||||
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
|
||||
};
|
||||
|
||||
void assign_and_preserve_padding_2(device half2x3* const dest, half2x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1(device S* const dest, S value) {
|
||||
(*(dest)).before = value.before;
|
||||
(*(dest)).m = value.m;
|
||||
assign_and_preserve_padding_2(&((*(dest)).m), value.m);
|
||||
(*(dest)).after = value.after;
|
||||
}
|
||||
|
||||
@@ -38,7 +43,7 @@ void assign_and_preserve_padding(device tint_array<S, 4>* const dest, tint_array
|
||||
kernel void f(device tint_array<S, 4>* tint_symbol [[buffer(1)]], const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
|
||||
assign_and_preserve_padding(tint_symbol, *(tint_symbol_1));
|
||||
assign_and_preserve_padding_1(&((*(tint_symbol))[1]), (*(tint_symbol_1))[2]);
|
||||
(*(tint_symbol))[3].m = (*(tint_symbol_1))[2].m;
|
||||
assign_and_preserve_padding_2(&((*(tint_symbol))[3].m), (*(tint_symbol_1))[2].m);
|
||||
(*(tint_symbol))[1].m[0] = half3((*(tint_symbol_1))[0].m[1]).zxy;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 142
|
||||
; Bound: 154
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability Float16
|
||||
@@ -26,11 +26,14 @@
|
||||
OpMemberName %S 1 "m"
|
||||
OpMemberName %S 2 "after"
|
||||
OpName %s "s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %assign_and_preserve_padding_2_s_X_m "assign_and_preserve_padding_2_s_X_m"
|
||||
OpName %dest "dest"
|
||||
OpName %value "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %dest_0 "dest"
|
||||
OpName %value_0 "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %value_1 "value"
|
||||
OpName %i "i"
|
||||
OpName %var_for_index "var_for_index"
|
||||
OpName %conv_S "conv_S"
|
||||
@@ -82,161 +85,175 @@
|
||||
%void = OpTypeVoid
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
|
||||
%17 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%17 = OpTypeFunction %void %_arr_uint_uint_1 %mat2v3half
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%26 = OpConstantNull %int
|
||||
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
|
||||
%30 = OpConstantNull %uint
|
||||
%int_1 = OpConstant %int 1
|
||||
%36 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||
%_ptr_StorageBuffer_mat2v3half = OpTypePointer StorageBuffer %mat2v3half
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%39 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%43 = OpConstantNull %uint
|
||||
%53 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function__arr_S_uint_4 = OpTypePointer Function %_arr_S_uint_4
|
||||
%58 = OpConstantNull %_arr_S_uint_4
|
||||
%71 = OpConstantNull %_arr_S_uint_4
|
||||
%_ptr_Function_S = OpTypePointer Function %S
|
||||
%68 = OpTypeFunction %S %S_std140
|
||||
%78 = OpTypeFunction %_arr_S_uint_4 %_arr_S_std140_uint_4
|
||||
%81 = OpTypeFunction %S %S_std140
|
||||
%91 = OpTypeFunction %_arr_S_uint_4 %_arr_S_std140_uint_4
|
||||
%_ptr_Function__arr_S_std140_uint_4 = OpTypePointer Function %_arr_S_std140_uint_4
|
||||
%95 = OpConstantNull %_arr_S_std140_uint_4
|
||||
%108 = OpConstantNull %_arr_S_std140_uint_4
|
||||
%_ptr_Function_S_std140 = OpTypePointer Function %S_std140
|
||||
%106 = OpTypeFunction %mat2v3half
|
||||
%119 = OpTypeFunction %mat2v3half
|
||||
%_ptr_Uniform_S_std140 = OpTypePointer Uniform %S_std140
|
||||
%_ptr_Uniform_v3half = OpTypePointer Uniform %v3half
|
||||
%120 = OpTypeFunction %void
|
||||
%133 = OpTypeFunction %void
|
||||
%_ptr_Uniform__arr_S_std140_uint_4 = OpTypePointer Uniform %_arr_S_std140_uint_4
|
||||
%129 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %17
|
||||
%142 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%148 = OpConstantComposite %_arr_uint_uint_1 %uint_3
|
||||
%assign_and_preserve_padding_2_s_X_m = OpFunction %void None %17
|
||||
%dest = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value = OpFunctionParameter %S
|
||||
%value = OpFunctionParameter %mat2v3half
|
||||
%24 = OpLabel
|
||||
%27 = OpCompositeExtract %uint %dest 0
|
||||
%29 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %27 %uint_0
|
||||
%30 = OpCompositeExtract %int %value 0
|
||||
OpStore %29 %30
|
||||
%31 = OpCompositeExtract %uint %dest 0
|
||||
%33 = OpAccessChain %_ptr_StorageBuffer_mat2v3half %s %uint_0 %31 %uint_1
|
||||
%34 = OpCompositeExtract %mat2v3half %value 1
|
||||
OpStore %33 %34
|
||||
%35 = OpCompositeExtract %uint %dest 0
|
||||
%37 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %35 %uint_2
|
||||
%38 = OpCompositeExtract %int %value 2
|
||||
OpStore %37 %38
|
||||
%29 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %27 %uint_1 %26
|
||||
%31 = OpCompositeExtract %v3half %value 0
|
||||
OpStore %29 %31
|
||||
%32 = OpCompositeExtract %uint %dest 0
|
||||
%34 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %32 %uint_1 %int_1
|
||||
%35 = OpCompositeExtract %v3half %value 1
|
||||
OpStore %34 %35
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %39
|
||||
%value_0 = OpFunctionParameter %_arr_S_uint_4
|
||||
%42 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %43
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %58
|
||||
OpStore %i %43
|
||||
OpBranch %46
|
||||
%46 = OpLabel
|
||||
OpLoopMerge %47 %48 None
|
||||
OpBranch %49
|
||||
%49 = OpLabel
|
||||
%51 = OpLoad %uint %i
|
||||
%52 = OpULessThan %bool %51 %uint_4
|
||||
%50 = OpLogicalNot %bool %52
|
||||
OpSelectionMerge %54 None
|
||||
OpBranchConditional %50 %55 %54
|
||||
%55 = OpLabel
|
||||
OpBranch %47
|
||||
%54 = OpLabel
|
||||
OpStore %var_for_index %value_0
|
||||
%60 = OpLoad %uint %i
|
||||
%61 = OpCompositeConstruct %_arr_uint_uint_1 %60
|
||||
%62 = OpLoad %uint %i
|
||||
%64 = OpAccessChain %_ptr_Function_S %var_for_index %62
|
||||
%65 = OpLoad %S %64
|
||||
%59 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %61 %65
|
||||
OpBranch %48
|
||||
%48 = OpLabel
|
||||
%66 = OpLoad %uint %i
|
||||
%67 = OpIAdd %uint %66 %uint_1
|
||||
OpStore %i %67
|
||||
OpBranch %46
|
||||
%47 = OpLabel
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %36
|
||||
%dest_0 = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value_0 = OpFunctionParameter %S
|
||||
%40 = OpLabel
|
||||
%41 = OpCompositeExtract %uint %dest_0 0
|
||||
%43 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %41 %uint_0
|
||||
%44 = OpCompositeExtract %int %value_0 0
|
||||
OpStore %43 %44
|
||||
%46 = OpCompositeExtract %uint %dest_0 0
|
||||
%47 = OpCompositeConstruct %_arr_uint_uint_1 %46
|
||||
%48 = OpCompositeExtract %mat2v3half %value_0 1
|
||||
%45 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %47 %48
|
||||
%49 = OpCompositeExtract %uint %dest_0 0
|
||||
%51 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %49 %uint_2
|
||||
%52 = OpCompositeExtract %int %value_0 2
|
||||
OpStore %51 %52
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%conv_S = OpFunction %S None %68
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %53
|
||||
%value_1 = OpFunctionParameter %_arr_S_uint_4
|
||||
%56 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %30
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %71
|
||||
OpStore %i %30
|
||||
OpBranch %59
|
||||
%59 = OpLabel
|
||||
OpLoopMerge %60 %61 None
|
||||
OpBranch %62
|
||||
%62 = OpLabel
|
||||
%64 = OpLoad %uint %i
|
||||
%65 = OpULessThan %bool %64 %uint_4
|
||||
%63 = OpLogicalNot %bool %65
|
||||
OpSelectionMerge %67 None
|
||||
OpBranchConditional %63 %68 %67
|
||||
%68 = OpLabel
|
||||
OpBranch %60
|
||||
%67 = OpLabel
|
||||
OpStore %var_for_index %value_1
|
||||
%73 = OpLoad %uint %i
|
||||
%74 = OpCompositeConstruct %_arr_uint_uint_1 %73
|
||||
%75 = OpLoad %uint %i
|
||||
%77 = OpAccessChain %_ptr_Function_S %var_for_index %75
|
||||
%78 = OpLoad %S %77
|
||||
%72 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %74 %78
|
||||
OpBranch %61
|
||||
%61 = OpLabel
|
||||
%79 = OpLoad %uint %i
|
||||
%80 = OpIAdd %uint %79 %uint_1
|
||||
OpStore %i %80
|
||||
OpBranch %59
|
||||
%60 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%conv_S = OpFunction %S None %81
|
||||
%val = OpFunctionParameter %S_std140
|
||||
%71 = OpLabel
|
||||
%72 = OpCompositeExtract %int %val 0
|
||||
%73 = OpCompositeExtract %v3half %val 1
|
||||
%74 = OpCompositeExtract %v3half %val 2
|
||||
%75 = OpCompositeConstruct %mat2v3half %73 %74
|
||||
%76 = OpCompositeExtract %int %val 3
|
||||
%77 = OpCompositeConstruct %S %72 %75 %76
|
||||
OpReturnValue %77
|
||||
OpFunctionEnd
|
||||
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %78
|
||||
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
|
||||
%81 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %58
|
||||
%i_0 = OpVariable %_ptr_Function_uint Function %43
|
||||
%var_for_index_1 = OpVariable %_ptr_Function__arr_S_std140_uint_4 Function %95
|
||||
OpBranch %84
|
||||
%84 = OpLabel
|
||||
OpLoopMerge %85 %86 None
|
||||
OpBranch %87
|
||||
%87 = OpLabel
|
||||
%89 = OpLoad %uint %i_0
|
||||
%90 = OpULessThan %bool %89 %uint_4
|
||||
%88 = OpLogicalNot %bool %90
|
||||
OpSelectionMerge %91 None
|
||||
OpBranchConditional %88 %92 %91
|
||||
%92 = OpLabel
|
||||
OpBranch %85
|
||||
%91 = OpLabel
|
||||
%85 = OpCompositeExtract %int %val 0
|
||||
%86 = OpCompositeExtract %v3half %val 1
|
||||
%87 = OpCompositeExtract %v3half %val 2
|
||||
%88 = OpCompositeConstruct %mat2v3half %86 %87
|
||||
%89 = OpCompositeExtract %int %val 3
|
||||
%90 = OpCompositeConstruct %S %85 %88 %89
|
||||
OpReturnValue %90
|
||||
OpFunctionEnd
|
||||
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %91
|
||||
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
|
||||
%94 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %71
|
||||
%i_0 = OpVariable %_ptr_Function_uint Function %30
|
||||
%var_for_index_1 = OpVariable %_ptr_Function__arr_S_std140_uint_4 Function %108
|
||||
OpBranch %97
|
||||
%97 = OpLabel
|
||||
OpLoopMerge %98 %99 None
|
||||
OpBranch %100
|
||||
%100 = OpLabel
|
||||
%102 = OpLoad %uint %i_0
|
||||
%103 = OpULessThan %bool %102 %uint_4
|
||||
%101 = OpLogicalNot %bool %103
|
||||
OpSelectionMerge %104 None
|
||||
OpBranchConditional %101 %105 %104
|
||||
%105 = OpLabel
|
||||
OpBranch %98
|
||||
%104 = OpLabel
|
||||
OpStore %var_for_index_1 %val_0
|
||||
%96 = OpLoad %uint %i_0
|
||||
%97 = OpAccessChain %_ptr_Function_S %arr %96
|
||||
%99 = OpLoad %uint %i_0
|
||||
%101 = OpAccessChain %_ptr_Function_S_std140 %var_for_index_1 %99
|
||||
%102 = OpLoad %S_std140 %101
|
||||
%98 = OpFunctionCall %S %conv_S %102
|
||||
OpStore %97 %98
|
||||
OpBranch %86
|
||||
%86 = OpLabel
|
||||
%103 = OpLoad %uint %i_0
|
||||
%104 = OpIAdd %uint %103 %uint_1
|
||||
OpStore %i_0 %104
|
||||
OpBranch %84
|
||||
%85 = OpLabel
|
||||
%105 = OpLoad %_arr_S_uint_4 %arr
|
||||
OpReturnValue %105
|
||||
%109 = OpLoad %uint %i_0
|
||||
%110 = OpAccessChain %_ptr_Function_S %arr %109
|
||||
%112 = OpLoad %uint %i_0
|
||||
%114 = OpAccessChain %_ptr_Function_S_std140 %var_for_index_1 %112
|
||||
%115 = OpLoad %S_std140 %114
|
||||
%111 = OpFunctionCall %S %conv_S %115
|
||||
OpStore %110 %111
|
||||
OpBranch %99
|
||||
%99 = OpLabel
|
||||
%116 = OpLoad %uint %i_0
|
||||
%117 = OpIAdd %uint %116 %uint_1
|
||||
OpStore %i_0 %117
|
||||
OpBranch %97
|
||||
%98 = OpLabel
|
||||
%118 = OpLoad %_arr_S_uint_4 %arr
|
||||
OpReturnValue %118
|
||||
OpFunctionEnd
|
||||
%load_u_inner_2_m = OpFunction %mat2v3half None %106
|
||||
%108 = OpLabel
|
||||
%111 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%114 = OpAccessChain %_ptr_Uniform_v3half %111 %uint_1
|
||||
%115 = OpLoad %v3half %114
|
||||
%117 = OpAccessChain %_ptr_Uniform_v3half %111 %uint_2
|
||||
%118 = OpLoad %v3half %117
|
||||
%119 = OpCompositeConstruct %mat2v3half %115 %118
|
||||
OpReturnValue %119
|
||||
%load_u_inner_2_m = OpFunction %mat2v3half None %119
|
||||
%121 = OpLabel
|
||||
%124 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%127 = OpAccessChain %_ptr_Uniform_v3half %124 %uint_1
|
||||
%128 = OpLoad %v3half %127
|
||||
%130 = OpAccessChain %_ptr_Uniform_v3half %124 %uint_2
|
||||
%131 = OpLoad %v3half %130
|
||||
%132 = OpCompositeConstruct %mat2v3half %128 %131
|
||||
OpReturnValue %132
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %120
|
||||
%122 = OpLabel
|
||||
%126 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
|
||||
%127 = OpLoad %_arr_S_std140_uint_4 %126
|
||||
%124 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %127
|
||||
%123 = OpFunctionCall %void %assign_and_preserve_padding_s %124
|
||||
%131 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%132 = OpLoad %S_std140 %131
|
||||
%130 = OpFunctionCall %S %conv_S %132
|
||||
%128 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %129 %130
|
||||
%134 = OpAccessChain %_ptr_StorageBuffer_mat2v3half %s %uint_0 %int_3 %uint_1
|
||||
%135 = OpFunctionCall %mat2v3half %load_u_inner_2_m
|
||||
OpStore %134 %135
|
||||
%138 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %int_1 %uint_1 %26
|
||||
%139 = OpAccessChain %_ptr_Uniform_v3half %u %uint_0 %43 %uint_2
|
||||
%140 = OpLoad %v3half %139
|
||||
%141 = OpVectorShuffle %v3half %140 %140 2 0 1
|
||||
OpStore %138 %141
|
||||
%f = OpFunction %void None %133
|
||||
%135 = OpLabel
|
||||
%139 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
|
||||
%140 = OpLoad %_arr_S_std140_uint_4 %139
|
||||
%137 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %140
|
||||
%136 = OpFunctionCall %void %assign_and_preserve_padding_s %137
|
||||
%144 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%145 = OpLoad %S_std140 %144
|
||||
%143 = OpFunctionCall %S %conv_S %145
|
||||
%141 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %142 %143
|
||||
%149 = OpFunctionCall %mat2v3half %load_u_inner_2_m
|
||||
%146 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %148 %149
|
||||
%150 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %int_1 %uint_1 %26
|
||||
%151 = OpAccessChain %_ptr_Uniform_v3half %u %uint_0 %30 %uint_2
|
||||
%152 = OpLoad %v3half %151
|
||||
%153 = OpVectorShuffle %v3half %152 %152 2 0 1
|
||||
OpStore %150 %153
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -36,26 +36,33 @@ layout(binding = 1, std430) buffer u_block_ssbo {
|
||||
S inner[4];
|
||||
} s;
|
||||
|
||||
void assign_and_preserve_padding_2_s_X_m(uint dest[1], mat2x3 value) {
|
||||
s.inner[dest[0]].m[0] = value[0u];
|
||||
s.inner[dest[0]].m[1] = value[1u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1_s_X(uint dest[1], S value) {
|
||||
s.inner[dest[0]].before = value.before;
|
||||
s.inner[dest[0]].m = value.m;
|
||||
uint tint_symbol[1] = uint[1](dest[0u]);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol, value.m);
|
||||
s.inner[dest[0]].after = value.after;
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_s(S value[4]) {
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
uint tint_symbol[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol, value[i]);
|
||||
uint tint_symbol_1[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void f() {
|
||||
assign_and_preserve_padding_s(u.inner);
|
||||
uint tint_symbol_1[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, u.inner[2]);
|
||||
s.inner[3].m = u.inner[2].m;
|
||||
uint tint_symbol_2[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_2, u.inner[2]);
|
||||
uint tint_symbol_3[1] = uint[1](3u);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol_3, u.inner[2].m);
|
||||
s.inner[1].m[0] = u.inner[0].m[1].zxy;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,14 @@ struct S {
|
||||
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
|
||||
};
|
||||
|
||||
void assign_and_preserve_padding_2(device float2x3* const dest, float2x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1(device S* const dest, S value) {
|
||||
(*(dest)).before = value.before;
|
||||
(*(dest)).m = value.m;
|
||||
assign_and_preserve_padding_2(&((*(dest)).m), value.m);
|
||||
(*(dest)).after = value.after;
|
||||
}
|
||||
|
||||
@@ -38,7 +43,7 @@ void assign_and_preserve_padding(device tint_array<S, 4>* const dest, tint_array
|
||||
kernel void f(device tint_array<S, 4>* tint_symbol [[buffer(1)]], const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
|
||||
assign_and_preserve_padding(tint_symbol, *(tint_symbol_1));
|
||||
assign_and_preserve_padding_1(&((*(tint_symbol))[1]), (*(tint_symbol_1))[2]);
|
||||
(*(tint_symbol))[3].m = (*(tint_symbol_1))[2].m;
|
||||
assign_and_preserve_padding_2(&((*(tint_symbol))[3].m), (*(tint_symbol_1))[2].m);
|
||||
(*(tint_symbol))[1].m[0] = float3((*(tint_symbol_1))[0].m[1]).zxy;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 90
|
||||
; Bound: 102
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -15,11 +15,14 @@
|
||||
OpMemberName %S 2 "after"
|
||||
OpName %u "u"
|
||||
OpName %s "s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %assign_and_preserve_padding_2_s_X_m "assign_and_preserve_padding_2_s_X_m"
|
||||
OpName %dest "dest"
|
||||
OpName %value "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %dest_0 "dest"
|
||||
OpName %value_0 "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %value_1 "value"
|
||||
OpName %i "i"
|
||||
OpName %var_for_index "var_for_index"
|
||||
OpName %f "f"
|
||||
@@ -53,98 +56,112 @@
|
||||
%void = OpTypeVoid
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
|
||||
%14 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%14 = OpTypeFunction %void %_arr_uint_uint_1 %mat2v3float
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%23 = OpConstantNull %int
|
||||
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
|
||||
%27 = OpConstantNull %uint
|
||||
%int_1 = OpConstant %int 1
|
||||
%33 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%36 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%40 = OpConstantNull %uint
|
||||
%50 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function__arr_S_uint_4 = OpTypePointer Function %_arr_S_uint_4
|
||||
%55 = OpConstantNull %_arr_S_uint_4
|
||||
%68 = OpConstantNull %_arr_S_uint_4
|
||||
%_ptr_Function_S = OpTypePointer Function %S
|
||||
%65 = OpTypeFunction %void
|
||||
%78 = OpTypeFunction %void
|
||||
%_ptr_Uniform__arr_S_uint_4 = OpTypePointer Uniform %_arr_S_uint_4
|
||||
%73 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%86 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Uniform_S = OpTypePointer Uniform %S
|
||||
%int_3 = OpConstant %int 3
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%93 = OpConstantComposite %_arr_uint_uint_1 %uint_3
|
||||
%_ptr_Uniform_mat2v3float = OpTypePointer Uniform %mat2v3float
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
|
||||
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %14
|
||||
%assign_and_preserve_padding_2_s_X_m = OpFunction %void None %14
|
||||
%dest = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value = OpFunctionParameter %S
|
||||
%value = OpFunctionParameter %mat2v3float
|
||||
%21 = OpLabel
|
||||
%24 = OpCompositeExtract %uint %dest 0
|
||||
%26 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %24 %uint_0
|
||||
%27 = OpCompositeExtract %int %value 0
|
||||
OpStore %26 %27
|
||||
%28 = OpCompositeExtract %uint %dest 0
|
||||
%30 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %s %uint_0 %28 %uint_1
|
||||
%31 = OpCompositeExtract %mat2v3float %value 1
|
||||
OpStore %30 %31
|
||||
%32 = OpCompositeExtract %uint %dest 0
|
||||
%34 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %32 %uint_2
|
||||
%35 = OpCompositeExtract %int %value 2
|
||||
OpStore %34 %35
|
||||
%26 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %24 %uint_1 %23
|
||||
%28 = OpCompositeExtract %v3float %value 0
|
||||
OpStore %26 %28
|
||||
%29 = OpCompositeExtract %uint %dest 0
|
||||
%31 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %29 %uint_1 %int_1
|
||||
%32 = OpCompositeExtract %v3float %value 1
|
||||
OpStore %31 %32
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %36
|
||||
%value_0 = OpFunctionParameter %_arr_S_uint_4
|
||||
%39 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %40
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %55
|
||||
OpStore %i %40
|
||||
OpBranch %43
|
||||
%43 = OpLabel
|
||||
OpLoopMerge %44 %45 None
|
||||
OpBranch %46
|
||||
%46 = OpLabel
|
||||
%48 = OpLoad %uint %i
|
||||
%49 = OpULessThan %bool %48 %uint_4
|
||||
%47 = OpLogicalNot %bool %49
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %47 %52 %51
|
||||
%52 = OpLabel
|
||||
OpBranch %44
|
||||
%51 = OpLabel
|
||||
OpStore %var_for_index %value_0
|
||||
%57 = OpLoad %uint %i
|
||||
%58 = OpCompositeConstruct %_arr_uint_uint_1 %57
|
||||
%59 = OpLoad %uint %i
|
||||
%61 = OpAccessChain %_ptr_Function_S %var_for_index %59
|
||||
%62 = OpLoad %S %61
|
||||
%56 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %58 %62
|
||||
OpBranch %45
|
||||
%45 = OpLabel
|
||||
%63 = OpLoad %uint %i
|
||||
%64 = OpIAdd %uint %63 %uint_1
|
||||
OpStore %i %64
|
||||
OpBranch %43
|
||||
%44 = OpLabel
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %33
|
||||
%dest_0 = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value_0 = OpFunctionParameter %S
|
||||
%37 = OpLabel
|
||||
%38 = OpCompositeExtract %uint %dest_0 0
|
||||
%40 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %38 %uint_0
|
||||
%41 = OpCompositeExtract %int %value_0 0
|
||||
OpStore %40 %41
|
||||
%43 = OpCompositeExtract %uint %dest_0 0
|
||||
%44 = OpCompositeConstruct %_arr_uint_uint_1 %43
|
||||
%45 = OpCompositeExtract %mat2v3float %value_0 1
|
||||
%42 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %44 %45
|
||||
%46 = OpCompositeExtract %uint %dest_0 0
|
||||
%48 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %46 %uint_2
|
||||
%49 = OpCompositeExtract %int %value_0 2
|
||||
OpStore %48 %49
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %65
|
||||
%67 = OpLabel
|
||||
%70 = OpAccessChain %_ptr_Uniform__arr_S_uint_4 %u %uint_0
|
||||
%71 = OpLoad %_arr_S_uint_4 %70
|
||||
%68 = OpFunctionCall %void %assign_and_preserve_padding_s %71
|
||||
%76 = OpAccessChain %_ptr_Uniform_S %u %uint_0 %int_2
|
||||
%77 = OpLoad %S %76
|
||||
%72 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %73 %77
|
||||
%79 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %s %uint_0 %int_3 %uint_1
|
||||
%81 = OpAccessChain %_ptr_Uniform_mat2v3float %u %uint_0 %int_2 %uint_1
|
||||
%82 = OpLoad %mat2v3float %81
|
||||
OpStore %79 %82
|
||||
%85 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %int_1 %uint_1 %23
|
||||
%87 = OpAccessChain %_ptr_Uniform_v3float %u %uint_0 %23 %uint_1 %int_1
|
||||
%88 = OpLoad %v3float %87
|
||||
%89 = OpVectorShuffle %v3float %88 %88 2 0 1
|
||||
OpStore %85 %89
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %50
|
||||
%value_1 = OpFunctionParameter %_arr_S_uint_4
|
||||
%53 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %27
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %68
|
||||
OpStore %i %27
|
||||
OpBranch %56
|
||||
%56 = OpLabel
|
||||
OpLoopMerge %57 %58 None
|
||||
OpBranch %59
|
||||
%59 = OpLabel
|
||||
%61 = OpLoad %uint %i
|
||||
%62 = OpULessThan %bool %61 %uint_4
|
||||
%60 = OpLogicalNot %bool %62
|
||||
OpSelectionMerge %64 None
|
||||
OpBranchConditional %60 %65 %64
|
||||
%65 = OpLabel
|
||||
OpBranch %57
|
||||
%64 = OpLabel
|
||||
OpStore %var_for_index %value_1
|
||||
%70 = OpLoad %uint %i
|
||||
%71 = OpCompositeConstruct %_arr_uint_uint_1 %70
|
||||
%72 = OpLoad %uint %i
|
||||
%74 = OpAccessChain %_ptr_Function_S %var_for_index %72
|
||||
%75 = OpLoad %S %74
|
||||
%69 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %71 %75
|
||||
OpBranch %58
|
||||
%58 = OpLabel
|
||||
%76 = OpLoad %uint %i
|
||||
%77 = OpIAdd %uint %76 %uint_1
|
||||
OpStore %i %77
|
||||
OpBranch %56
|
||||
%57 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %78
|
||||
%80 = OpLabel
|
||||
%83 = OpAccessChain %_ptr_Uniform__arr_S_uint_4 %u %uint_0
|
||||
%84 = OpLoad %_arr_S_uint_4 %83
|
||||
%81 = OpFunctionCall %void %assign_and_preserve_padding_s %84
|
||||
%89 = OpAccessChain %_ptr_Uniform_S %u %uint_0 %int_2
|
||||
%90 = OpLoad %S %89
|
||||
%85 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %86 %90
|
||||
%95 = OpAccessChain %_ptr_Uniform_mat2v3float %u %uint_0 %int_2 %uint_1
|
||||
%96 = OpLoad %mat2v3float %95
|
||||
%91 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %93 %96
|
||||
%97 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %int_1 %uint_1 %23
|
||||
%99 = OpAccessChain %_ptr_Uniform_v3float %u %uint_0 %23 %uint_1 %int_1
|
||||
%100 = OpLoad %v3float %99
|
||||
%101 = OpVectorShuffle %v3float %100 %100 2 0 1
|
||||
OpStore %97 %101
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -71,17 +71,24 @@ layout(binding = 1, std430) buffer u_block_ssbo {
|
||||
S inner[4];
|
||||
} s;
|
||||
|
||||
void assign_and_preserve_padding_2_s_X_m(uint dest[1], f16mat3 value) {
|
||||
s.inner[dest[0]].m[0] = value[0u];
|
||||
s.inner[dest[0]].m[1] = value[1u];
|
||||
s.inner[dest[0]].m[2] = value[2u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1_s_X(uint dest[1], S value) {
|
||||
s.inner[dest[0]].before = value.before;
|
||||
s.inner[dest[0]].m = value.m;
|
||||
uint tint_symbol[1] = uint[1](dest[0u]);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol, value.m);
|
||||
s.inner[dest[0]].after = value.after;
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_s(S value[4]) {
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
uint tint_symbol[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol, value[i]);
|
||||
uint tint_symbol_1[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,9 +113,10 @@ f16mat3 load_u_inner_2_m() {
|
||||
|
||||
void f() {
|
||||
assign_and_preserve_padding_s(conv_arr4_S(u.inner));
|
||||
uint tint_symbol_1[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, conv_S(u.inner[2u]));
|
||||
s.inner[3].m = load_u_inner_2_m();
|
||||
uint tint_symbol_2[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_2, conv_S(u.inner[2u]));
|
||||
uint tint_symbol_3[1] = uint[1](3u);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol_3, load_u_inner_2_m());
|
||||
s.inner[1].m[0] = u.inner[0u].m_1.zxy;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,15 @@ struct S {
|
||||
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
|
||||
};
|
||||
|
||||
void assign_and_preserve_padding_2(device half3x3* const dest, half3x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
(*(dest))[2u] = value[2u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1(device S* const dest, S value) {
|
||||
(*(dest)).before = value.before;
|
||||
(*(dest)).m = value.m;
|
||||
assign_and_preserve_padding_2(&((*(dest)).m), value.m);
|
||||
(*(dest)).after = value.after;
|
||||
}
|
||||
|
||||
@@ -38,7 +44,7 @@ void assign_and_preserve_padding(device tint_array<S, 4>* const dest, tint_array
|
||||
kernel void f(device tint_array<S, 4>* tint_symbol [[buffer(1)]], const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
|
||||
assign_and_preserve_padding(tint_symbol, *(tint_symbol_1));
|
||||
assign_and_preserve_padding_1(&((*(tint_symbol))[1]), (*(tint_symbol_1))[2]);
|
||||
(*(tint_symbol))[3].m = (*(tint_symbol_1))[2].m;
|
||||
assign_and_preserve_padding_2(&((*(tint_symbol))[3].m), (*(tint_symbol_1))[2].m);
|
||||
(*(tint_symbol))[1].m[0] = half3((*(tint_symbol_1))[0].m[1]).zxy;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 147
|
||||
; Bound: 162
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability Float16
|
||||
@@ -27,11 +27,14 @@
|
||||
OpMemberName %S 1 "m"
|
||||
OpMemberName %S 2 "after"
|
||||
OpName %s "s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %assign_and_preserve_padding_2_s_X_m "assign_and_preserve_padding_2_s_X_m"
|
||||
OpName %dest "dest"
|
||||
OpName %value "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %dest_0 "dest"
|
||||
OpName %value_0 "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %value_1 "value"
|
||||
OpName %i "i"
|
||||
OpName %var_for_index "var_for_index"
|
||||
OpName %conv_S "conv_S"
|
||||
@@ -84,165 +87,183 @@
|
||||
%void = OpTypeVoid
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
|
||||
%17 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%17 = OpTypeFunction %void %_arr_uint_uint_1 %mat3v3half
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%26 = OpConstantNull %int
|
||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||
%_ptr_StorageBuffer_mat3v3half = OpTypePointer StorageBuffer %mat3v3half
|
||||
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
|
||||
%30 = OpConstantNull %uint
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%39 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%43 = OpConstantNull %uint
|
||||
%41 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||
%57 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function__arr_S_uint_4 = OpTypePointer Function %_arr_S_uint_4
|
||||
%58 = OpConstantNull %_arr_S_uint_4
|
||||
%75 = OpConstantNull %_arr_S_uint_4
|
||||
%_ptr_Function_S = OpTypePointer Function %S
|
||||
%68 = OpTypeFunction %S %S_std140
|
||||
%79 = OpTypeFunction %_arr_S_uint_4 %_arr_S_std140_uint_4
|
||||
%85 = OpTypeFunction %S %S_std140
|
||||
%96 = OpTypeFunction %_arr_S_uint_4 %_arr_S_std140_uint_4
|
||||
%_ptr_Function__arr_S_std140_uint_4 = OpTypePointer Function %_arr_S_std140_uint_4
|
||||
%96 = OpConstantNull %_arr_S_std140_uint_4
|
||||
%113 = OpConstantNull %_arr_S_std140_uint_4
|
||||
%_ptr_Function_S_std140 = OpTypePointer Function %S_std140
|
||||
%107 = OpTypeFunction %mat3v3half
|
||||
%124 = OpTypeFunction %mat3v3half
|
||||
%_ptr_Uniform_S_std140 = OpTypePointer Uniform %S_std140
|
||||
%_ptr_Uniform_v3half = OpTypePointer Uniform %v3half
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%125 = OpTypeFunction %void
|
||||
%142 = OpTypeFunction %void
|
||||
%_ptr_Uniform__arr_S_std140_uint_4 = OpTypePointer Uniform %_arr_S_std140_uint_4
|
||||
%134 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %17
|
||||
%151 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%156 = OpConstantComposite %_arr_uint_uint_1 %uint_3
|
||||
%assign_and_preserve_padding_2_s_X_m = OpFunction %void None %17
|
||||
%dest = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value = OpFunctionParameter %S
|
||||
%value = OpFunctionParameter %mat3v3half
|
||||
%24 = OpLabel
|
||||
%27 = OpCompositeExtract %uint %dest 0
|
||||
%29 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %27 %uint_0
|
||||
%30 = OpCompositeExtract %int %value 0
|
||||
OpStore %29 %30
|
||||
%31 = OpCompositeExtract %uint %dest 0
|
||||
%33 = OpAccessChain %_ptr_StorageBuffer_mat3v3half %s %uint_0 %31 %uint_1
|
||||
%34 = OpCompositeExtract %mat3v3half %value 1
|
||||
OpStore %33 %34
|
||||
%35 = OpCompositeExtract %uint %dest 0
|
||||
%37 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %35 %uint_2
|
||||
%38 = OpCompositeExtract %int %value 2
|
||||
OpStore %37 %38
|
||||
%29 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %27 %uint_1 %26
|
||||
%31 = OpCompositeExtract %v3half %value 0
|
||||
OpStore %29 %31
|
||||
%32 = OpCompositeExtract %uint %dest 0
|
||||
%34 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %32 %uint_1 %int_1
|
||||
%35 = OpCompositeExtract %v3half %value 1
|
||||
OpStore %34 %35
|
||||
%36 = OpCompositeExtract %uint %dest 0
|
||||
%38 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %36 %uint_1 %int_2
|
||||
%40 = OpCompositeExtract %v3half %value 2
|
||||
OpStore %38 %40
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %39
|
||||
%value_0 = OpFunctionParameter %_arr_S_uint_4
|
||||
%42 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %43
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %58
|
||||
OpStore %i %43
|
||||
OpBranch %46
|
||||
%46 = OpLabel
|
||||
OpLoopMerge %47 %48 None
|
||||
OpBranch %49
|
||||
%49 = OpLabel
|
||||
%51 = OpLoad %uint %i
|
||||
%52 = OpULessThan %bool %51 %uint_4
|
||||
%50 = OpLogicalNot %bool %52
|
||||
OpSelectionMerge %54 None
|
||||
OpBranchConditional %50 %55 %54
|
||||
%55 = OpLabel
|
||||
OpBranch %47
|
||||
%54 = OpLabel
|
||||
OpStore %var_for_index %value_0
|
||||
%60 = OpLoad %uint %i
|
||||
%61 = OpCompositeConstruct %_arr_uint_uint_1 %60
|
||||
%62 = OpLoad %uint %i
|
||||
%64 = OpAccessChain %_ptr_Function_S %var_for_index %62
|
||||
%65 = OpLoad %S %64
|
||||
%59 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %61 %65
|
||||
OpBranch %48
|
||||
%48 = OpLabel
|
||||
%66 = OpLoad %uint %i
|
||||
%67 = OpIAdd %uint %66 %uint_1
|
||||
OpStore %i %67
|
||||
OpBranch %46
|
||||
%47 = OpLabel
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %41
|
||||
%dest_0 = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value_0 = OpFunctionParameter %S
|
||||
%45 = OpLabel
|
||||
%46 = OpCompositeExtract %uint %dest_0 0
|
||||
%48 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %46 %uint_0
|
||||
%49 = OpCompositeExtract %int %value_0 0
|
||||
OpStore %48 %49
|
||||
%51 = OpCompositeExtract %uint %dest_0 0
|
||||
%52 = OpCompositeConstruct %_arr_uint_uint_1 %51
|
||||
%53 = OpCompositeExtract %mat3v3half %value_0 1
|
||||
%50 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %52 %53
|
||||
%54 = OpCompositeExtract %uint %dest_0 0
|
||||
%55 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %54 %uint_2
|
||||
%56 = OpCompositeExtract %int %value_0 2
|
||||
OpStore %55 %56
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%conv_S = OpFunction %S None %68
|
||||
%val = OpFunctionParameter %S_std140
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %57
|
||||
%value_1 = OpFunctionParameter %_arr_S_uint_4
|
||||
%60 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %30
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %75
|
||||
OpStore %i %30
|
||||
OpBranch %63
|
||||
%63 = OpLabel
|
||||
OpLoopMerge %64 %65 None
|
||||
OpBranch %66
|
||||
%66 = OpLabel
|
||||
%68 = OpLoad %uint %i
|
||||
%69 = OpULessThan %bool %68 %uint_4
|
||||
%67 = OpLogicalNot %bool %69
|
||||
OpSelectionMerge %71 None
|
||||
OpBranchConditional %67 %72 %71
|
||||
%72 = OpLabel
|
||||
OpBranch %64
|
||||
%71 = OpLabel
|
||||
%72 = OpCompositeExtract %int %val 0
|
||||
%73 = OpCompositeExtract %v3half %val 1
|
||||
%74 = OpCompositeExtract %v3half %val 2
|
||||
%75 = OpCompositeExtract %v3half %val 3
|
||||
%76 = OpCompositeConstruct %mat3v3half %73 %74 %75
|
||||
%77 = OpCompositeExtract %int %val 4
|
||||
%78 = OpCompositeConstruct %S %72 %76 %77
|
||||
OpReturnValue %78
|
||||
OpFunctionEnd
|
||||
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %79
|
||||
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
|
||||
%82 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %58
|
||||
%i_0 = OpVariable %_ptr_Function_uint Function %43
|
||||
%var_for_index_1 = OpVariable %_ptr_Function__arr_S_std140_uint_4 Function %96
|
||||
OpBranch %85
|
||||
%85 = OpLabel
|
||||
OpLoopMerge %86 %87 None
|
||||
OpBranch %88
|
||||
%88 = OpLabel
|
||||
%90 = OpLoad %uint %i_0
|
||||
%91 = OpULessThan %bool %90 %uint_4
|
||||
%89 = OpLogicalNot %bool %91
|
||||
OpSelectionMerge %92 None
|
||||
OpBranchConditional %89 %93 %92
|
||||
%93 = OpLabel
|
||||
OpBranch %86
|
||||
%92 = OpLabel
|
||||
OpStore %var_for_index_1 %val_0
|
||||
%97 = OpLoad %uint %i_0
|
||||
%98 = OpAccessChain %_ptr_Function_S %arr %97
|
||||
%100 = OpLoad %uint %i_0
|
||||
%102 = OpAccessChain %_ptr_Function_S_std140 %var_for_index_1 %100
|
||||
%103 = OpLoad %S_std140 %102
|
||||
%99 = OpFunctionCall %S %conv_S %103
|
||||
OpStore %98 %99
|
||||
OpBranch %87
|
||||
%87 = OpLabel
|
||||
%104 = OpLoad %uint %i_0
|
||||
%105 = OpIAdd %uint %104 %uint_1
|
||||
OpStore %i_0 %105
|
||||
OpBranch %85
|
||||
%86 = OpLabel
|
||||
%106 = OpLoad %_arr_S_uint_4 %arr
|
||||
OpReturnValue %106
|
||||
OpFunctionEnd
|
||||
%load_u_inner_2_m = OpFunction %mat3v3half None %107
|
||||
%109 = OpLabel
|
||||
%112 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%115 = OpAccessChain %_ptr_Uniform_v3half %112 %uint_1
|
||||
%116 = OpLoad %v3half %115
|
||||
%118 = OpAccessChain %_ptr_Uniform_v3half %112 %uint_2
|
||||
%119 = OpLoad %v3half %118
|
||||
%122 = OpAccessChain %_ptr_Uniform_v3half %112 %uint_3
|
||||
%123 = OpLoad %v3half %122
|
||||
%124 = OpCompositeConstruct %mat3v3half %116 %119 %123
|
||||
OpReturnValue %124
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %125
|
||||
%127 = OpLabel
|
||||
%131 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
|
||||
%132 = OpLoad %_arr_S_std140_uint_4 %131
|
||||
%129 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %132
|
||||
%128 = OpFunctionCall %void %assign_and_preserve_padding_s %129
|
||||
%136 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%137 = OpLoad %S_std140 %136
|
||||
%135 = OpFunctionCall %S %conv_S %137
|
||||
%133 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %134 %135
|
||||
%139 = OpAccessChain %_ptr_StorageBuffer_mat3v3half %s %uint_0 %int_3 %uint_1
|
||||
%140 = OpFunctionCall %mat3v3half %load_u_inner_2_m
|
||||
OpStore %139 %140
|
||||
%143 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %int_1 %uint_1 %26
|
||||
%144 = OpAccessChain %_ptr_Uniform_v3half %u %uint_0 %43 %uint_2
|
||||
%145 = OpLoad %v3half %144
|
||||
%146 = OpVectorShuffle %v3half %145 %145 2 0 1
|
||||
OpStore %143 %146
|
||||
OpStore %var_for_index %value_1
|
||||
%77 = OpLoad %uint %i
|
||||
%78 = OpCompositeConstruct %_arr_uint_uint_1 %77
|
||||
%79 = OpLoad %uint %i
|
||||
%81 = OpAccessChain %_ptr_Function_S %var_for_index %79
|
||||
%82 = OpLoad %S %81
|
||||
%76 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %78 %82
|
||||
OpBranch %65
|
||||
%65 = OpLabel
|
||||
%83 = OpLoad %uint %i
|
||||
%84 = OpIAdd %uint %83 %uint_1
|
||||
OpStore %i %84
|
||||
OpBranch %63
|
||||
%64 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%conv_S = OpFunction %S None %85
|
||||
%val = OpFunctionParameter %S_std140
|
||||
%88 = OpLabel
|
||||
%89 = OpCompositeExtract %int %val 0
|
||||
%90 = OpCompositeExtract %v3half %val 1
|
||||
%91 = OpCompositeExtract %v3half %val 2
|
||||
%92 = OpCompositeExtract %v3half %val 3
|
||||
%93 = OpCompositeConstruct %mat3v3half %90 %91 %92
|
||||
%94 = OpCompositeExtract %int %val 4
|
||||
%95 = OpCompositeConstruct %S %89 %93 %94
|
||||
OpReturnValue %95
|
||||
OpFunctionEnd
|
||||
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %96
|
||||
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
|
||||
%99 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %75
|
||||
%i_0 = OpVariable %_ptr_Function_uint Function %30
|
||||
%var_for_index_1 = OpVariable %_ptr_Function__arr_S_std140_uint_4 Function %113
|
||||
OpBranch %102
|
||||
%102 = OpLabel
|
||||
OpLoopMerge %103 %104 None
|
||||
OpBranch %105
|
||||
%105 = OpLabel
|
||||
%107 = OpLoad %uint %i_0
|
||||
%108 = OpULessThan %bool %107 %uint_4
|
||||
%106 = OpLogicalNot %bool %108
|
||||
OpSelectionMerge %109 None
|
||||
OpBranchConditional %106 %110 %109
|
||||
%110 = OpLabel
|
||||
OpBranch %103
|
||||
%109 = OpLabel
|
||||
OpStore %var_for_index_1 %val_0
|
||||
%114 = OpLoad %uint %i_0
|
||||
%115 = OpAccessChain %_ptr_Function_S %arr %114
|
||||
%117 = OpLoad %uint %i_0
|
||||
%119 = OpAccessChain %_ptr_Function_S_std140 %var_for_index_1 %117
|
||||
%120 = OpLoad %S_std140 %119
|
||||
%116 = OpFunctionCall %S %conv_S %120
|
||||
OpStore %115 %116
|
||||
OpBranch %104
|
||||
%104 = OpLabel
|
||||
%121 = OpLoad %uint %i_0
|
||||
%122 = OpIAdd %uint %121 %uint_1
|
||||
OpStore %i_0 %122
|
||||
OpBranch %102
|
||||
%103 = OpLabel
|
||||
%123 = OpLoad %_arr_S_uint_4 %arr
|
||||
OpReturnValue %123
|
||||
OpFunctionEnd
|
||||
%load_u_inner_2_m = OpFunction %mat3v3half None %124
|
||||
%126 = OpLabel
|
||||
%129 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%132 = OpAccessChain %_ptr_Uniform_v3half %129 %uint_1
|
||||
%133 = OpLoad %v3half %132
|
||||
%135 = OpAccessChain %_ptr_Uniform_v3half %129 %uint_2
|
||||
%136 = OpLoad %v3half %135
|
||||
%139 = OpAccessChain %_ptr_Uniform_v3half %129 %uint_3
|
||||
%140 = OpLoad %v3half %139
|
||||
%141 = OpCompositeConstruct %mat3v3half %133 %136 %140
|
||||
OpReturnValue %141
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %142
|
||||
%144 = OpLabel
|
||||
%148 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
|
||||
%149 = OpLoad %_arr_S_std140_uint_4 %148
|
||||
%146 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %149
|
||||
%145 = OpFunctionCall %void %assign_and_preserve_padding_s %146
|
||||
%153 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%154 = OpLoad %S_std140 %153
|
||||
%152 = OpFunctionCall %S %conv_S %154
|
||||
%150 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %151 %152
|
||||
%157 = OpFunctionCall %mat3v3half %load_u_inner_2_m
|
||||
%155 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %156 %157
|
||||
%158 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %int_1 %uint_1 %26
|
||||
%159 = OpAccessChain %_ptr_Uniform_v3half %u %uint_0 %30 %uint_2
|
||||
%160 = OpLoad %v3half %159
|
||||
%161 = OpVectorShuffle %v3half %160 %160 2 0 1
|
||||
OpStore %158 %161
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -32,26 +32,34 @@ layout(binding = 1, std430) buffer u_block_ssbo {
|
||||
S inner[4];
|
||||
} s;
|
||||
|
||||
void assign_and_preserve_padding_2_s_X_m(uint dest[1], mat3 value) {
|
||||
s.inner[dest[0]].m[0] = value[0u];
|
||||
s.inner[dest[0]].m[1] = value[1u];
|
||||
s.inner[dest[0]].m[2] = value[2u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1_s_X(uint dest[1], S value) {
|
||||
s.inner[dest[0]].before = value.before;
|
||||
s.inner[dest[0]].m = value.m;
|
||||
uint tint_symbol[1] = uint[1](dest[0u]);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol, value.m);
|
||||
s.inner[dest[0]].after = value.after;
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_s(S value[4]) {
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
uint tint_symbol[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol, value[i]);
|
||||
uint tint_symbol_1[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void f() {
|
||||
assign_and_preserve_padding_s(u.inner);
|
||||
uint tint_symbol_1[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, u.inner[2]);
|
||||
s.inner[3].m = u.inner[2].m;
|
||||
uint tint_symbol_2[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_2, u.inner[2]);
|
||||
uint tint_symbol_3[1] = uint[1](3u);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol_3, u.inner[2].m);
|
||||
s.inner[1].m[0] = u.inner[0].m[1].zxy;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,9 +22,15 @@ struct S {
|
||||
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_1;
|
||||
};
|
||||
|
||||
void assign_and_preserve_padding_2(device float3x3* const dest, float3x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
(*(dest))[2u] = value[2u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1(device S* const dest, S value) {
|
||||
(*(dest)).before = value.before;
|
||||
(*(dest)).m = value.m;
|
||||
assign_and_preserve_padding_2(&((*(dest)).m), value.m);
|
||||
(*(dest)).after = value.after;
|
||||
}
|
||||
|
||||
@@ -37,7 +43,7 @@ void assign_and_preserve_padding(device tint_array<S, 4>* const dest, tint_array
|
||||
kernel void f(device tint_array<S, 4>* tint_symbol [[buffer(1)]], const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
|
||||
assign_and_preserve_padding(tint_symbol, *(tint_symbol_1));
|
||||
assign_and_preserve_padding_1(&((*(tint_symbol))[1]), (*(tint_symbol_1))[2]);
|
||||
(*(tint_symbol))[3].m = (*(tint_symbol_1))[2].m;
|
||||
assign_and_preserve_padding_2(&((*(tint_symbol))[3].m), (*(tint_symbol_1))[2].m);
|
||||
(*(tint_symbol))[1].m[0] = float3((*(tint_symbol_1))[0].m[1]).zxy;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 90
|
||||
; Bound: 105
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -15,11 +15,14 @@
|
||||
OpMemberName %S 2 "after"
|
||||
OpName %u "u"
|
||||
OpName %s "s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %assign_and_preserve_padding_2_s_X_m "assign_and_preserve_padding_2_s_X_m"
|
||||
OpName %dest "dest"
|
||||
OpName %value "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %dest_0 "dest"
|
||||
OpName %value_0 "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %value_1 "value"
|
||||
OpName %i "i"
|
||||
OpName %var_for_index "var_for_index"
|
||||
OpName %f "f"
|
||||
@@ -53,98 +56,116 @@
|
||||
%void = OpTypeVoid
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
|
||||
%14 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%14 = OpTypeFunction %void %_arr_uint_uint_1 %mat3v3float
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%23 = OpConstantNull %int
|
||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
|
||||
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
|
||||
%27 = OpConstantNull %uint
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%36 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%40 = OpConstantNull %uint
|
||||
%38 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||
%54 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function__arr_S_uint_4 = OpTypePointer Function %_arr_S_uint_4
|
||||
%55 = OpConstantNull %_arr_S_uint_4
|
||||
%72 = OpConstantNull %_arr_S_uint_4
|
||||
%_ptr_Function_S = OpTypePointer Function %S
|
||||
%65 = OpTypeFunction %void
|
||||
%82 = OpTypeFunction %void
|
||||
%_ptr_Uniform__arr_S_uint_4 = OpTypePointer Uniform %_arr_S_uint_4
|
||||
%73 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%int_2 = OpConstant %int 2
|
||||
%90 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%_ptr_Uniform_S = OpTypePointer Uniform %S
|
||||
%int_3 = OpConstant %int 3
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%96 = OpConstantComposite %_arr_uint_uint_1 %uint_3
|
||||
%_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
|
||||
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %14
|
||||
%assign_and_preserve_padding_2_s_X_m = OpFunction %void None %14
|
||||
%dest = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value = OpFunctionParameter %S
|
||||
%value = OpFunctionParameter %mat3v3float
|
||||
%21 = OpLabel
|
||||
%24 = OpCompositeExtract %uint %dest 0
|
||||
%26 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %24 %uint_0
|
||||
%27 = OpCompositeExtract %int %value 0
|
||||
OpStore %26 %27
|
||||
%28 = OpCompositeExtract %uint %dest 0
|
||||
%30 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %s %uint_0 %28 %uint_1
|
||||
%31 = OpCompositeExtract %mat3v3float %value 1
|
||||
OpStore %30 %31
|
||||
%32 = OpCompositeExtract %uint %dest 0
|
||||
%34 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %32 %uint_2
|
||||
%35 = OpCompositeExtract %int %value 2
|
||||
OpStore %34 %35
|
||||
%26 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %24 %uint_1 %23
|
||||
%28 = OpCompositeExtract %v3float %value 0
|
||||
OpStore %26 %28
|
||||
%29 = OpCompositeExtract %uint %dest 0
|
||||
%31 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %29 %uint_1 %int_1
|
||||
%32 = OpCompositeExtract %v3float %value 1
|
||||
OpStore %31 %32
|
||||
%33 = OpCompositeExtract %uint %dest 0
|
||||
%35 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %33 %uint_1 %int_2
|
||||
%37 = OpCompositeExtract %v3float %value 2
|
||||
OpStore %35 %37
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %36
|
||||
%value_0 = OpFunctionParameter %_arr_S_uint_4
|
||||
%39 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %40
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %55
|
||||
OpStore %i %40
|
||||
OpBranch %43
|
||||
%43 = OpLabel
|
||||
OpLoopMerge %44 %45 None
|
||||
OpBranch %46
|
||||
%46 = OpLabel
|
||||
%48 = OpLoad %uint %i
|
||||
%49 = OpULessThan %bool %48 %uint_4
|
||||
%47 = OpLogicalNot %bool %49
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %47 %52 %51
|
||||
%52 = OpLabel
|
||||
OpBranch %44
|
||||
%51 = OpLabel
|
||||
OpStore %var_for_index %value_0
|
||||
%57 = OpLoad %uint %i
|
||||
%58 = OpCompositeConstruct %_arr_uint_uint_1 %57
|
||||
%59 = OpLoad %uint %i
|
||||
%61 = OpAccessChain %_ptr_Function_S %var_for_index %59
|
||||
%62 = OpLoad %S %61
|
||||
%56 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %58 %62
|
||||
OpBranch %45
|
||||
%45 = OpLabel
|
||||
%63 = OpLoad %uint %i
|
||||
%64 = OpIAdd %uint %63 %uint_1
|
||||
OpStore %i %64
|
||||
OpBranch %43
|
||||
%44 = OpLabel
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %38
|
||||
%dest_0 = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value_0 = OpFunctionParameter %S
|
||||
%42 = OpLabel
|
||||
%43 = OpCompositeExtract %uint %dest_0 0
|
||||
%45 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %43 %uint_0
|
||||
%46 = OpCompositeExtract %int %value_0 0
|
||||
OpStore %45 %46
|
||||
%48 = OpCompositeExtract %uint %dest_0 0
|
||||
%49 = OpCompositeConstruct %_arr_uint_uint_1 %48
|
||||
%50 = OpCompositeExtract %mat3v3float %value_0 1
|
||||
%47 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %49 %50
|
||||
%51 = OpCompositeExtract %uint %dest_0 0
|
||||
%52 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %51 %uint_2
|
||||
%53 = OpCompositeExtract %int %value_0 2
|
||||
OpStore %52 %53
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %65
|
||||
%67 = OpLabel
|
||||
%70 = OpAccessChain %_ptr_Uniform__arr_S_uint_4 %u %uint_0
|
||||
%71 = OpLoad %_arr_S_uint_4 %70
|
||||
%68 = OpFunctionCall %void %assign_and_preserve_padding_s %71
|
||||
%76 = OpAccessChain %_ptr_Uniform_S %u %uint_0 %int_2
|
||||
%77 = OpLoad %S %76
|
||||
%72 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %73 %77
|
||||
%79 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %s %uint_0 %int_3 %uint_1
|
||||
%81 = OpAccessChain %_ptr_Uniform_mat3v3float %u %uint_0 %int_2 %uint_1
|
||||
%82 = OpLoad %mat3v3float %81
|
||||
OpStore %79 %82
|
||||
%85 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %int_1 %uint_1 %23
|
||||
%87 = OpAccessChain %_ptr_Uniform_v3float %u %uint_0 %23 %uint_1 %int_1
|
||||
%88 = OpLoad %v3float %87
|
||||
%89 = OpVectorShuffle %v3float %88 %88 2 0 1
|
||||
OpStore %85 %89
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %54
|
||||
%value_1 = OpFunctionParameter %_arr_S_uint_4
|
||||
%57 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %27
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %72
|
||||
OpStore %i %27
|
||||
OpBranch %60
|
||||
%60 = OpLabel
|
||||
OpLoopMerge %61 %62 None
|
||||
OpBranch %63
|
||||
%63 = OpLabel
|
||||
%65 = OpLoad %uint %i
|
||||
%66 = OpULessThan %bool %65 %uint_4
|
||||
%64 = OpLogicalNot %bool %66
|
||||
OpSelectionMerge %68 None
|
||||
OpBranchConditional %64 %69 %68
|
||||
%69 = OpLabel
|
||||
OpBranch %61
|
||||
%68 = OpLabel
|
||||
OpStore %var_for_index %value_1
|
||||
%74 = OpLoad %uint %i
|
||||
%75 = OpCompositeConstruct %_arr_uint_uint_1 %74
|
||||
%76 = OpLoad %uint %i
|
||||
%78 = OpAccessChain %_ptr_Function_S %var_for_index %76
|
||||
%79 = OpLoad %S %78
|
||||
%73 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %75 %79
|
||||
OpBranch %62
|
||||
%62 = OpLabel
|
||||
%80 = OpLoad %uint %i
|
||||
%81 = OpIAdd %uint %80 %uint_1
|
||||
OpStore %i %81
|
||||
OpBranch %60
|
||||
%61 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %82
|
||||
%84 = OpLabel
|
||||
%87 = OpAccessChain %_ptr_Uniform__arr_S_uint_4 %u %uint_0
|
||||
%88 = OpLoad %_arr_S_uint_4 %87
|
||||
%85 = OpFunctionCall %void %assign_and_preserve_padding_s %88
|
||||
%92 = OpAccessChain %_ptr_Uniform_S %u %uint_0 %int_2
|
||||
%93 = OpLoad %S %92
|
||||
%89 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %90 %93
|
||||
%98 = OpAccessChain %_ptr_Uniform_mat3v3float %u %uint_0 %int_2 %uint_1
|
||||
%99 = OpLoad %mat3v3float %98
|
||||
%94 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %96 %99
|
||||
%100 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %int_1 %uint_1 %23
|
||||
%102 = OpAccessChain %_ptr_Uniform_v3float %u %uint_0 %23 %uint_1 %int_1
|
||||
%103 = OpLoad %v3float %102
|
||||
%104 = OpVectorShuffle %v3float %103 %103 2 0 1
|
||||
OpStore %100 %104
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -68,17 +68,25 @@ layout(binding = 1, std430) buffer u_block_ssbo {
|
||||
S inner[4];
|
||||
} s;
|
||||
|
||||
void assign_and_preserve_padding_2_s_X_m(uint dest[1], f16mat4x3 value) {
|
||||
s.inner[dest[0]].m[0] = value[0u];
|
||||
s.inner[dest[0]].m[1] = value[1u];
|
||||
s.inner[dest[0]].m[2] = value[2u];
|
||||
s.inner[dest[0]].m[3] = value[3u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1_s_X(uint dest[1], S value) {
|
||||
s.inner[dest[0]].before = value.before;
|
||||
s.inner[dest[0]].m = value.m;
|
||||
uint tint_symbol[1] = uint[1](dest[0u]);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol, value.m);
|
||||
s.inner[dest[0]].after = value.after;
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_s(S value[4]) {
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
uint tint_symbol[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol, value[i]);
|
||||
uint tint_symbol_1[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,9 +111,10 @@ f16mat4x3 load_u_inner_2_m() {
|
||||
|
||||
void f() {
|
||||
assign_and_preserve_padding_s(conv_arr4_S(u.inner));
|
||||
uint tint_symbol_1[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, conv_S(u.inner[2u]));
|
||||
s.inner[3].m = load_u_inner_2_m();
|
||||
uint tint_symbol_2[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_2, conv_S(u.inner[2u]));
|
||||
uint tint_symbol_3[1] = uint[1](3u);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol_3, load_u_inner_2_m());
|
||||
s.inner[1].m[0] = u.inner[0u].m_1.zxy;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,16 @@ struct S {
|
||||
/* 0x0044 */ tint_array<int8_t, 60> tint_pad_2;
|
||||
};
|
||||
|
||||
void assign_and_preserve_padding_2(device half4x3* const dest, half4x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
(*(dest))[2u] = value[2u];
|
||||
(*(dest))[3u] = value[3u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1(device S* const dest, S value) {
|
||||
(*(dest)).before = value.before;
|
||||
(*(dest)).m = value.m;
|
||||
assign_and_preserve_padding_2(&((*(dest)).m), value.m);
|
||||
(*(dest)).after = value.after;
|
||||
}
|
||||
|
||||
@@ -38,7 +45,7 @@ void assign_and_preserve_padding(device tint_array<S, 4>* const dest, tint_array
|
||||
kernel void f(device tint_array<S, 4>* tint_symbol [[buffer(1)]], const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
|
||||
assign_and_preserve_padding(tint_symbol, *(tint_symbol_1));
|
||||
assign_and_preserve_padding_1(&((*(tint_symbol))[1]), (*(tint_symbol_1))[2]);
|
||||
(*(tint_symbol))[3].m = (*(tint_symbol_1))[2].m;
|
||||
assign_and_preserve_padding_2(&((*(tint_symbol))[3].m), (*(tint_symbol_1))[2].m);
|
||||
(*(tint_symbol))[1].m[0] = half3((*(tint_symbol_1))[0].m[1]).zxy;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 151
|
||||
; Bound: 170
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpCapability Float16
|
||||
@@ -28,11 +28,14 @@
|
||||
OpMemberName %S 1 "m"
|
||||
OpMemberName %S 2 "after"
|
||||
OpName %s "s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %assign_and_preserve_padding_2_s_X_m "assign_and_preserve_padding_2_s_X_m"
|
||||
OpName %dest "dest"
|
||||
OpName %value "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %dest_0 "dest"
|
||||
OpName %value_0 "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %value_1 "value"
|
||||
OpName %i "i"
|
||||
OpName %var_for_index "var_for_index"
|
||||
OpName %conv_S "conv_S"
|
||||
@@ -86,168 +89,191 @@
|
||||
%void = OpTypeVoid
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
|
||||
%17 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%17 = OpTypeFunction %void %_arr_uint_uint_1 %mat4v3half
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%26 = OpConstantNull %int
|
||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||
%_ptr_StorageBuffer_mat4v3half = OpTypePointer StorageBuffer %mat4v3half
|
||||
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
|
||||
%30 = OpConstantNull %uint
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%39 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%43 = OpConstantNull %uint
|
||||
%int_3 = OpConstant %int 3
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%46 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||
%62 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function__arr_S_uint_4 = OpTypePointer Function %_arr_S_uint_4
|
||||
%58 = OpConstantNull %_arr_S_uint_4
|
||||
%80 = OpConstantNull %_arr_S_uint_4
|
||||
%_ptr_Function_S = OpTypePointer Function %S
|
||||
%68 = OpTypeFunction %S %S_std140
|
||||
%80 = OpTypeFunction %_arr_S_uint_4 %_arr_S_std140_uint_4
|
||||
%90 = OpTypeFunction %S %S_std140
|
||||
%102 = OpTypeFunction %_arr_S_uint_4 %_arr_S_std140_uint_4
|
||||
%_ptr_Function__arr_S_std140_uint_4 = OpTypePointer Function %_arr_S_std140_uint_4
|
||||
%97 = OpConstantNull %_arr_S_std140_uint_4
|
||||
%119 = OpConstantNull %_arr_S_std140_uint_4
|
||||
%_ptr_Function_S_std140 = OpTypePointer Function %S_std140
|
||||
%108 = OpTypeFunction %mat4v3half
|
||||
%130 = OpTypeFunction %mat4v3half
|
||||
%_ptr_Uniform_S_std140 = OpTypePointer Uniform %S_std140
|
||||
%_ptr_Uniform_v3half = OpTypePointer Uniform %v3half
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%129 = OpTypeFunction %void
|
||||
%150 = OpTypeFunction %void
|
||||
%_ptr_Uniform__arr_S_std140_uint_4 = OpTypePointer Uniform %_arr_S_std140_uint_4
|
||||
%138 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%int_3 = OpConstant %int 3
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %17
|
||||
%159 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%164 = OpConstantComposite %_arr_uint_uint_1 %uint_3
|
||||
%assign_and_preserve_padding_2_s_X_m = OpFunction %void None %17
|
||||
%dest = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value = OpFunctionParameter %S
|
||||
%value = OpFunctionParameter %mat4v3half
|
||||
%24 = OpLabel
|
||||
%27 = OpCompositeExtract %uint %dest 0
|
||||
%29 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %27 %uint_0
|
||||
%30 = OpCompositeExtract %int %value 0
|
||||
OpStore %29 %30
|
||||
%31 = OpCompositeExtract %uint %dest 0
|
||||
%33 = OpAccessChain %_ptr_StorageBuffer_mat4v3half %s %uint_0 %31 %uint_1
|
||||
%34 = OpCompositeExtract %mat4v3half %value 1
|
||||
OpStore %33 %34
|
||||
%35 = OpCompositeExtract %uint %dest 0
|
||||
%37 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %35 %uint_2
|
||||
%38 = OpCompositeExtract %int %value 2
|
||||
OpStore %37 %38
|
||||
%29 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %27 %uint_1 %26
|
||||
%31 = OpCompositeExtract %v3half %value 0
|
||||
OpStore %29 %31
|
||||
%32 = OpCompositeExtract %uint %dest 0
|
||||
%34 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %32 %uint_1 %int_1
|
||||
%35 = OpCompositeExtract %v3half %value 1
|
||||
OpStore %34 %35
|
||||
%36 = OpCompositeExtract %uint %dest 0
|
||||
%38 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %36 %uint_1 %int_2
|
||||
%40 = OpCompositeExtract %v3half %value 2
|
||||
OpStore %38 %40
|
||||
%41 = OpCompositeExtract %uint %dest 0
|
||||
%43 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %41 %uint_1 %int_3
|
||||
%45 = OpCompositeExtract %v3half %value 3
|
||||
OpStore %43 %45
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %39
|
||||
%value_0 = OpFunctionParameter %_arr_S_uint_4
|
||||
%42 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %43
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %58
|
||||
OpStore %i %43
|
||||
OpBranch %46
|
||||
%46 = OpLabel
|
||||
OpLoopMerge %47 %48 None
|
||||
OpBranch %49
|
||||
%49 = OpLabel
|
||||
%51 = OpLoad %uint %i
|
||||
%52 = OpULessThan %bool %51 %uint_4
|
||||
%50 = OpLogicalNot %bool %52
|
||||
OpSelectionMerge %54 None
|
||||
OpBranchConditional %50 %55 %54
|
||||
%55 = OpLabel
|
||||
OpBranch %47
|
||||
%54 = OpLabel
|
||||
OpStore %var_for_index %value_0
|
||||
%60 = OpLoad %uint %i
|
||||
%61 = OpCompositeConstruct %_arr_uint_uint_1 %60
|
||||
%62 = OpLoad %uint %i
|
||||
%64 = OpAccessChain %_ptr_Function_S %var_for_index %62
|
||||
%65 = OpLoad %S %64
|
||||
%59 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %61 %65
|
||||
OpBranch %48
|
||||
%48 = OpLabel
|
||||
%66 = OpLoad %uint %i
|
||||
%67 = OpIAdd %uint %66 %uint_1
|
||||
OpStore %i %67
|
||||
OpBranch %46
|
||||
%47 = OpLabel
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %46
|
||||
%dest_0 = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value_0 = OpFunctionParameter %S
|
||||
%50 = OpLabel
|
||||
%51 = OpCompositeExtract %uint %dest_0 0
|
||||
%53 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %51 %uint_0
|
||||
%54 = OpCompositeExtract %int %value_0 0
|
||||
OpStore %53 %54
|
||||
%56 = OpCompositeExtract %uint %dest_0 0
|
||||
%57 = OpCompositeConstruct %_arr_uint_uint_1 %56
|
||||
%58 = OpCompositeExtract %mat4v3half %value_0 1
|
||||
%55 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %57 %58
|
||||
%59 = OpCompositeExtract %uint %dest_0 0
|
||||
%60 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %59 %uint_2
|
||||
%61 = OpCompositeExtract %int %value_0 2
|
||||
OpStore %60 %61
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%conv_S = OpFunction %S None %68
|
||||
%val = OpFunctionParameter %S_std140
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %62
|
||||
%value_1 = OpFunctionParameter %_arr_S_uint_4
|
||||
%65 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %30
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %80
|
||||
OpStore %i %30
|
||||
OpBranch %68
|
||||
%68 = OpLabel
|
||||
OpLoopMerge %69 %70 None
|
||||
OpBranch %71
|
||||
%71 = OpLabel
|
||||
%72 = OpCompositeExtract %int %val 0
|
||||
%73 = OpCompositeExtract %v3half %val 1
|
||||
%74 = OpCompositeExtract %v3half %val 2
|
||||
%75 = OpCompositeExtract %v3half %val 3
|
||||
%76 = OpCompositeExtract %v3half %val 4
|
||||
%77 = OpCompositeConstruct %mat4v3half %73 %74 %75 %76
|
||||
%78 = OpCompositeExtract %int %val 5
|
||||
%79 = OpCompositeConstruct %S %72 %77 %78
|
||||
OpReturnValue %79
|
||||
OpFunctionEnd
|
||||
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %80
|
||||
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
|
||||
%83 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %58
|
||||
%i_0 = OpVariable %_ptr_Function_uint Function %43
|
||||
%var_for_index_1 = OpVariable %_ptr_Function__arr_S_std140_uint_4 Function %97
|
||||
OpBranch %86
|
||||
%86 = OpLabel
|
||||
OpLoopMerge %87 %88 None
|
||||
OpBranch %89
|
||||
%89 = OpLabel
|
||||
%91 = OpLoad %uint %i_0
|
||||
%92 = OpULessThan %bool %91 %uint_4
|
||||
%90 = OpLogicalNot %bool %92
|
||||
OpSelectionMerge %93 None
|
||||
OpBranchConditional %90 %94 %93
|
||||
%94 = OpLabel
|
||||
OpBranch %87
|
||||
%93 = OpLabel
|
||||
OpStore %var_for_index_1 %val_0
|
||||
%98 = OpLoad %uint %i_0
|
||||
%99 = OpAccessChain %_ptr_Function_S %arr %98
|
||||
%101 = OpLoad %uint %i_0
|
||||
%103 = OpAccessChain %_ptr_Function_S_std140 %var_for_index_1 %101
|
||||
%104 = OpLoad %S_std140 %103
|
||||
%100 = OpFunctionCall %S %conv_S %104
|
||||
OpStore %99 %100
|
||||
OpBranch %88
|
||||
%88 = OpLabel
|
||||
%105 = OpLoad %uint %i_0
|
||||
%106 = OpIAdd %uint %105 %uint_1
|
||||
OpStore %i_0 %106
|
||||
OpBranch %86
|
||||
%87 = OpLabel
|
||||
%107 = OpLoad %_arr_S_uint_4 %arr
|
||||
OpReturnValue %107
|
||||
OpFunctionEnd
|
||||
%load_u_inner_2_m = OpFunction %mat4v3half None %108
|
||||
%110 = OpLabel
|
||||
%113 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%116 = OpAccessChain %_ptr_Uniform_v3half %113 %uint_1
|
||||
%117 = OpLoad %v3half %116
|
||||
%119 = OpAccessChain %_ptr_Uniform_v3half %113 %uint_2
|
||||
%120 = OpLoad %v3half %119
|
||||
%123 = OpAccessChain %_ptr_Uniform_v3half %113 %uint_3
|
||||
%124 = OpLoad %v3half %123
|
||||
%126 = OpAccessChain %_ptr_Uniform_v3half %113 %uint_4
|
||||
%127 = OpLoad %v3half %126
|
||||
%128 = OpCompositeConstruct %mat4v3half %117 %120 %124 %127
|
||||
OpReturnValue %128
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %129
|
||||
%131 = OpLabel
|
||||
%135 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
|
||||
%136 = OpLoad %_arr_S_std140_uint_4 %135
|
||||
%133 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %136
|
||||
%132 = OpFunctionCall %void %assign_and_preserve_padding_s %133
|
||||
%140 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%141 = OpLoad %S_std140 %140
|
||||
%139 = OpFunctionCall %S %conv_S %141
|
||||
%137 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %138 %139
|
||||
%143 = OpAccessChain %_ptr_StorageBuffer_mat4v3half %s %uint_0 %int_3 %uint_1
|
||||
%144 = OpFunctionCall %mat4v3half %load_u_inner_2_m
|
||||
OpStore %143 %144
|
||||
%147 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %int_1 %uint_1 %26
|
||||
%148 = OpAccessChain %_ptr_Uniform_v3half %u %uint_0 %43 %uint_2
|
||||
%149 = OpLoad %v3half %148
|
||||
%150 = OpVectorShuffle %v3half %149 %149 2 0 1
|
||||
OpStore %147 %150
|
||||
%73 = OpLoad %uint %i
|
||||
%74 = OpULessThan %bool %73 %uint_4
|
||||
%72 = OpLogicalNot %bool %74
|
||||
OpSelectionMerge %76 None
|
||||
OpBranchConditional %72 %77 %76
|
||||
%77 = OpLabel
|
||||
OpBranch %69
|
||||
%76 = OpLabel
|
||||
OpStore %var_for_index %value_1
|
||||
%82 = OpLoad %uint %i
|
||||
%83 = OpCompositeConstruct %_arr_uint_uint_1 %82
|
||||
%84 = OpLoad %uint %i
|
||||
%86 = OpAccessChain %_ptr_Function_S %var_for_index %84
|
||||
%87 = OpLoad %S %86
|
||||
%81 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %83 %87
|
||||
OpBranch %70
|
||||
%70 = OpLabel
|
||||
%88 = OpLoad %uint %i
|
||||
%89 = OpIAdd %uint %88 %uint_1
|
||||
OpStore %i %89
|
||||
OpBranch %68
|
||||
%69 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%conv_S = OpFunction %S None %90
|
||||
%val = OpFunctionParameter %S_std140
|
||||
%93 = OpLabel
|
||||
%94 = OpCompositeExtract %int %val 0
|
||||
%95 = OpCompositeExtract %v3half %val 1
|
||||
%96 = OpCompositeExtract %v3half %val 2
|
||||
%97 = OpCompositeExtract %v3half %val 3
|
||||
%98 = OpCompositeExtract %v3half %val 4
|
||||
%99 = OpCompositeConstruct %mat4v3half %95 %96 %97 %98
|
||||
%100 = OpCompositeExtract %int %val 5
|
||||
%101 = OpCompositeConstruct %S %94 %99 %100
|
||||
OpReturnValue %101
|
||||
OpFunctionEnd
|
||||
%conv_arr4_S = OpFunction %_arr_S_uint_4 None %102
|
||||
%val_0 = OpFunctionParameter %_arr_S_std140_uint_4
|
||||
%105 = OpLabel
|
||||
%arr = OpVariable %_ptr_Function__arr_S_uint_4 Function %80
|
||||
%i_0 = OpVariable %_ptr_Function_uint Function %30
|
||||
%var_for_index_1 = OpVariable %_ptr_Function__arr_S_std140_uint_4 Function %119
|
||||
OpBranch %108
|
||||
%108 = OpLabel
|
||||
OpLoopMerge %109 %110 None
|
||||
OpBranch %111
|
||||
%111 = OpLabel
|
||||
%113 = OpLoad %uint %i_0
|
||||
%114 = OpULessThan %bool %113 %uint_4
|
||||
%112 = OpLogicalNot %bool %114
|
||||
OpSelectionMerge %115 None
|
||||
OpBranchConditional %112 %116 %115
|
||||
%116 = OpLabel
|
||||
OpBranch %109
|
||||
%115 = OpLabel
|
||||
OpStore %var_for_index_1 %val_0
|
||||
%120 = OpLoad %uint %i_0
|
||||
%121 = OpAccessChain %_ptr_Function_S %arr %120
|
||||
%123 = OpLoad %uint %i_0
|
||||
%125 = OpAccessChain %_ptr_Function_S_std140 %var_for_index_1 %123
|
||||
%126 = OpLoad %S_std140 %125
|
||||
%122 = OpFunctionCall %S %conv_S %126
|
||||
OpStore %121 %122
|
||||
OpBranch %110
|
||||
%110 = OpLabel
|
||||
%127 = OpLoad %uint %i_0
|
||||
%128 = OpIAdd %uint %127 %uint_1
|
||||
OpStore %i_0 %128
|
||||
OpBranch %108
|
||||
%109 = OpLabel
|
||||
%129 = OpLoad %_arr_S_uint_4 %arr
|
||||
OpReturnValue %129
|
||||
OpFunctionEnd
|
||||
%load_u_inner_2_m = OpFunction %mat4v3half None %130
|
||||
%132 = OpLabel
|
||||
%135 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%138 = OpAccessChain %_ptr_Uniform_v3half %135 %uint_1
|
||||
%139 = OpLoad %v3half %138
|
||||
%141 = OpAccessChain %_ptr_Uniform_v3half %135 %uint_2
|
||||
%142 = OpLoad %v3half %141
|
||||
%144 = OpAccessChain %_ptr_Uniform_v3half %135 %uint_3
|
||||
%145 = OpLoad %v3half %144
|
||||
%147 = OpAccessChain %_ptr_Uniform_v3half %135 %uint_4
|
||||
%148 = OpLoad %v3half %147
|
||||
%149 = OpCompositeConstruct %mat4v3half %139 %142 %145 %148
|
||||
OpReturnValue %149
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %150
|
||||
%152 = OpLabel
|
||||
%156 = OpAccessChain %_ptr_Uniform__arr_S_std140_uint_4 %u %uint_0
|
||||
%157 = OpLoad %_arr_S_std140_uint_4 %156
|
||||
%154 = OpFunctionCall %_arr_S_uint_4 %conv_arr4_S %157
|
||||
%153 = OpFunctionCall %void %assign_and_preserve_padding_s %154
|
||||
%161 = OpAccessChain %_ptr_Uniform_S_std140 %u %uint_0 %uint_2
|
||||
%162 = OpLoad %S_std140 %161
|
||||
%160 = OpFunctionCall %S %conv_S %162
|
||||
%158 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %159 %160
|
||||
%165 = OpFunctionCall %mat4v3half %load_u_inner_2_m
|
||||
%163 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %164 %165
|
||||
%166 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %int_1 %uint_1 %26
|
||||
%167 = OpAccessChain %_ptr_Uniform_v3half %u %uint_0 %30 %uint_2
|
||||
%168 = OpLoad %v3half %167
|
||||
%169 = OpVectorShuffle %v3half %168 %168 2 0 1
|
||||
OpStore %166 %169
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -44,26 +44,35 @@ layout(binding = 1, std430) buffer u_block_ssbo {
|
||||
S inner[4];
|
||||
} s;
|
||||
|
||||
void assign_and_preserve_padding_2_s_X_m(uint dest[1], mat4x3 value) {
|
||||
s.inner[dest[0]].m[0] = value[0u];
|
||||
s.inner[dest[0]].m[1] = value[1u];
|
||||
s.inner[dest[0]].m[2] = value[2u];
|
||||
s.inner[dest[0]].m[3] = value[3u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1_s_X(uint dest[1], S value) {
|
||||
s.inner[dest[0]].before = value.before;
|
||||
s.inner[dest[0]].m = value.m;
|
||||
uint tint_symbol[1] = uint[1](dest[0u]);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol, value.m);
|
||||
s.inner[dest[0]].after = value.after;
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_s(S value[4]) {
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
uint tint_symbol[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol, value[i]);
|
||||
uint tint_symbol_1[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void f() {
|
||||
assign_and_preserve_padding_s(u.inner);
|
||||
uint tint_symbol_1[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_1, u.inner[2]);
|
||||
s.inner[3].m = u.inner[2].m;
|
||||
uint tint_symbol_2[1] = uint[1](1u);
|
||||
assign_and_preserve_padding_1_s_X(tint_symbol_2, u.inner[2]);
|
||||
uint tint_symbol_3[1] = uint[1](3u);
|
||||
assign_and_preserve_padding_2_s_X_m(tint_symbol_3, u.inner[2].m);
|
||||
s.inner[1].m[0] = u.inner[0].m[1].zxy;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,16 @@ struct S {
|
||||
/* 0x0084 */ tint_array<int8_t, 60> tint_pad_2;
|
||||
};
|
||||
|
||||
void assign_and_preserve_padding_2(device float4x3* const dest, float4x3 value) {
|
||||
(*(dest))[0u] = value[0u];
|
||||
(*(dest))[1u] = value[1u];
|
||||
(*(dest))[2u] = value[2u];
|
||||
(*(dest))[3u] = value[3u];
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1(device S* const dest, S value) {
|
||||
(*(dest)).before = value.before;
|
||||
(*(dest)).m = value.m;
|
||||
assign_and_preserve_padding_2(&((*(dest)).m), value.m);
|
||||
(*(dest)).after = value.after;
|
||||
}
|
||||
|
||||
@@ -38,7 +45,7 @@ void assign_and_preserve_padding(device tint_array<S, 4>* const dest, tint_array
|
||||
kernel void f(device tint_array<S, 4>* tint_symbol [[buffer(1)]], const constant tint_array<S, 4>* tint_symbol_1 [[buffer(0)]]) {
|
||||
assign_and_preserve_padding(tint_symbol, *(tint_symbol_1));
|
||||
assign_and_preserve_padding_1(&((*(tint_symbol))[1]), (*(tint_symbol_1))[2]);
|
||||
(*(tint_symbol))[3].m = (*(tint_symbol_1))[2].m;
|
||||
assign_and_preserve_padding_2(&((*(tint_symbol))[3].m), (*(tint_symbol_1))[2].m);
|
||||
(*(tint_symbol))[1].m[0] = float3((*(tint_symbol_1))[0].m[1]).zxy;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 90
|
||||
; Bound: 109
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -15,11 +15,14 @@
|
||||
OpMemberName %S 2 "after"
|
||||
OpName %u "u"
|
||||
OpName %s "s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %assign_and_preserve_padding_2_s_X_m "assign_and_preserve_padding_2_s_X_m"
|
||||
OpName %dest "dest"
|
||||
OpName %value "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %assign_and_preserve_padding_1_s_X "assign_and_preserve_padding_1_s_X"
|
||||
OpName %dest_0 "dest"
|
||||
OpName %value_0 "value"
|
||||
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
|
||||
OpName %value_1 "value"
|
||||
OpName %i "i"
|
||||
OpName %var_for_index "var_for_index"
|
||||
OpName %f "f"
|
||||
@@ -53,98 +56,121 @@
|
||||
%void = OpTypeVoid
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
|
||||
%14 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%14 = OpTypeFunction %void %_arr_uint_uint_1 %mat4v3float
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%23 = OpConstantNull %int
|
||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
|
||||
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
|
||||
%27 = OpConstantNull %uint
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%36 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%40 = OpConstantNull %uint
|
||||
%int_3 = OpConstant %int 3
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%43 = OpTypeFunction %void %_arr_uint_uint_1 %S
|
||||
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||
%59 = OpTypeFunction %void %_arr_S_uint_4
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function__arr_S_uint_4 = OpTypePointer Function %_arr_S_uint_4
|
||||
%55 = OpConstantNull %_arr_S_uint_4
|
||||
%77 = OpConstantNull %_arr_S_uint_4
|
||||
%_ptr_Function_S = OpTypePointer Function %S
|
||||
%65 = OpTypeFunction %void
|
||||
%87 = OpTypeFunction %void
|
||||
%_ptr_Uniform__arr_S_uint_4 = OpTypePointer Uniform %_arr_S_uint_4
|
||||
%73 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%int_2 = OpConstant %int 2
|
||||
%95 = OpConstantComposite %_arr_uint_uint_1 %uint_1
|
||||
%_ptr_Uniform_S = OpTypePointer Uniform %S
|
||||
%int_3 = OpConstant %int 3
|
||||
%100 = OpConstantComposite %_arr_uint_uint_1 %uint_3
|
||||
%_ptr_Uniform_mat4v3float = OpTypePointer Uniform %mat4v3float
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
|
||||
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %14
|
||||
%assign_and_preserve_padding_2_s_X_m = OpFunction %void None %14
|
||||
%dest = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value = OpFunctionParameter %S
|
||||
%value = OpFunctionParameter %mat4v3float
|
||||
%21 = OpLabel
|
||||
%24 = OpCompositeExtract %uint %dest 0
|
||||
%26 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %24 %uint_0
|
||||
%27 = OpCompositeExtract %int %value 0
|
||||
OpStore %26 %27
|
||||
%28 = OpCompositeExtract %uint %dest 0
|
||||
%30 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %s %uint_0 %28 %uint_1
|
||||
%31 = OpCompositeExtract %mat4v3float %value 1
|
||||
OpStore %30 %31
|
||||
%32 = OpCompositeExtract %uint %dest 0
|
||||
%34 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %32 %uint_2
|
||||
%35 = OpCompositeExtract %int %value 2
|
||||
OpStore %34 %35
|
||||
%26 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %24 %uint_1 %23
|
||||
%28 = OpCompositeExtract %v3float %value 0
|
||||
OpStore %26 %28
|
||||
%29 = OpCompositeExtract %uint %dest 0
|
||||
%31 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %29 %uint_1 %int_1
|
||||
%32 = OpCompositeExtract %v3float %value 1
|
||||
OpStore %31 %32
|
||||
%33 = OpCompositeExtract %uint %dest 0
|
||||
%35 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %33 %uint_1 %int_2
|
||||
%37 = OpCompositeExtract %v3float %value 2
|
||||
OpStore %35 %37
|
||||
%38 = OpCompositeExtract %uint %dest 0
|
||||
%40 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %38 %uint_1 %int_3
|
||||
%42 = OpCompositeExtract %v3float %value 3
|
||||
OpStore %40 %42
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %36
|
||||
%value_0 = OpFunctionParameter %_arr_S_uint_4
|
||||
%39 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %40
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %55
|
||||
OpStore %i %40
|
||||
OpBranch %43
|
||||
%43 = OpLabel
|
||||
OpLoopMerge %44 %45 None
|
||||
OpBranch %46
|
||||
%46 = OpLabel
|
||||
%48 = OpLoad %uint %i
|
||||
%49 = OpULessThan %bool %48 %uint_4
|
||||
%47 = OpLogicalNot %bool %49
|
||||
OpSelectionMerge %51 None
|
||||
OpBranchConditional %47 %52 %51
|
||||
%52 = OpLabel
|
||||
OpBranch %44
|
||||
%51 = OpLabel
|
||||
OpStore %var_for_index %value_0
|
||||
%57 = OpLoad %uint %i
|
||||
%58 = OpCompositeConstruct %_arr_uint_uint_1 %57
|
||||
%59 = OpLoad %uint %i
|
||||
%61 = OpAccessChain %_ptr_Function_S %var_for_index %59
|
||||
%62 = OpLoad %S %61
|
||||
%56 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %58 %62
|
||||
OpBranch %45
|
||||
%45 = OpLabel
|
||||
%63 = OpLoad %uint %i
|
||||
%64 = OpIAdd %uint %63 %uint_1
|
||||
OpStore %i %64
|
||||
OpBranch %43
|
||||
%44 = OpLabel
|
||||
%assign_and_preserve_padding_1_s_X = OpFunction %void None %43
|
||||
%dest_0 = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value_0 = OpFunctionParameter %S
|
||||
%47 = OpLabel
|
||||
%48 = OpCompositeExtract %uint %dest_0 0
|
||||
%50 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %48 %uint_0
|
||||
%51 = OpCompositeExtract %int %value_0 0
|
||||
OpStore %50 %51
|
||||
%53 = OpCompositeExtract %uint %dest_0 0
|
||||
%54 = OpCompositeConstruct %_arr_uint_uint_1 %53
|
||||
%55 = OpCompositeExtract %mat4v3float %value_0 1
|
||||
%52 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %54 %55
|
||||
%56 = OpCompositeExtract %uint %dest_0 0
|
||||
%57 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0 %56 %uint_2
|
||||
%58 = OpCompositeExtract %int %value_0 2
|
||||
OpStore %57 %58
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %65
|
||||
%assign_and_preserve_padding_s = OpFunction %void None %59
|
||||
%value_1 = OpFunctionParameter %_arr_S_uint_4
|
||||
%62 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %27
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_S_uint_4 Function %77
|
||||
OpStore %i %27
|
||||
OpBranch %65
|
||||
%65 = OpLabel
|
||||
OpLoopMerge %66 %67 None
|
||||
OpBranch %68
|
||||
%68 = OpLabel
|
||||
%70 = OpLoad %uint %i
|
||||
%71 = OpULessThan %bool %70 %uint_4
|
||||
%69 = OpLogicalNot %bool %71
|
||||
OpSelectionMerge %73 None
|
||||
OpBranchConditional %69 %74 %73
|
||||
%74 = OpLabel
|
||||
OpBranch %66
|
||||
%73 = OpLabel
|
||||
OpStore %var_for_index %value_1
|
||||
%79 = OpLoad %uint %i
|
||||
%80 = OpCompositeConstruct %_arr_uint_uint_1 %79
|
||||
%81 = OpLoad %uint %i
|
||||
%83 = OpAccessChain %_ptr_Function_S %var_for_index %81
|
||||
%84 = OpLoad %S %83
|
||||
%78 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %80 %84
|
||||
OpBranch %67
|
||||
%67 = OpLabel
|
||||
%70 = OpAccessChain %_ptr_Uniform__arr_S_uint_4 %u %uint_0
|
||||
%71 = OpLoad %_arr_S_uint_4 %70
|
||||
%68 = OpFunctionCall %void %assign_and_preserve_padding_s %71
|
||||
%76 = OpAccessChain %_ptr_Uniform_S %u %uint_0 %int_2
|
||||
%77 = OpLoad %S %76
|
||||
%72 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %73 %77
|
||||
%79 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %s %uint_0 %int_3 %uint_1
|
||||
%81 = OpAccessChain %_ptr_Uniform_mat4v3float %u %uint_0 %int_2 %uint_1
|
||||
%82 = OpLoad %mat4v3float %81
|
||||
OpStore %79 %82
|
||||
%85 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %int_1 %uint_1 %23
|
||||
%87 = OpAccessChain %_ptr_Uniform_v3float %u %uint_0 %23 %uint_1 %int_1
|
||||
%88 = OpLoad %v3float %87
|
||||
%89 = OpVectorShuffle %v3float %88 %88 2 0 1
|
||||
OpStore %85 %89
|
||||
%85 = OpLoad %uint %i
|
||||
%86 = OpIAdd %uint %85 %uint_1
|
||||
OpStore %i %86
|
||||
OpBranch %65
|
||||
%66 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %87
|
||||
%89 = OpLabel
|
||||
%92 = OpAccessChain %_ptr_Uniform__arr_S_uint_4 %u %uint_0
|
||||
%93 = OpLoad %_arr_S_uint_4 %92
|
||||
%90 = OpFunctionCall %void %assign_and_preserve_padding_s %93
|
||||
%97 = OpAccessChain %_ptr_Uniform_S %u %uint_0 %int_2
|
||||
%98 = OpLoad %S %97
|
||||
%94 = OpFunctionCall %void %assign_and_preserve_padding_1_s_X %95 %98
|
||||
%102 = OpAccessChain %_ptr_Uniform_mat4v3float %u %uint_0 %int_2 %uint_1
|
||||
%103 = OpLoad %mat4v3float %102
|
||||
%99 = OpFunctionCall %void %assign_and_preserve_padding_2_s_X_m %100 %103
|
||||
%104 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0 %int_1 %uint_1 %23
|
||||
%106 = OpAccessChain %_ptr_Uniform_v3float %u %uint_0 %23 %uint_1 %int_1
|
||||
%107 = OpLoad %v3float %106
|
||||
%108 = OpVectorShuffle %v3float %107 %107 2 0 1
|
||||
OpStore %104 %108
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user