mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
tint: Add PreservePadding transform
This is used to ensure that assignments to host-visible memory do not modify padding bytes in structures and arrays. We decompose assignments of whole structure and array types into member-wise or element-wise copies, using helper functions. This is used in all backends except HLSL, which already decomposes memory accesses. Bug: tint:1571 Change-Id: Id6de2f917fb80151cc654a7e1c8413ae956f0d61 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112720 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
f2b8d2b1ab
commit
8753796aac
@@ -37,13 +37,49 @@ layout(binding = 0, std430) buffer s_block_ssbo {
|
||||
S inner;
|
||||
} s;
|
||||
|
||||
void assign_and_preserve_padding_4_s_a_X_el_X_X(uint dest[3], strided_arr value) {
|
||||
s.inner.a[dest[0]].el[dest[0]][dest[0]].el = value.el;
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_3_s_a_X_el_X(uint dest[2], strided_arr value[2]) {
|
||||
{
|
||||
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
uint tint_symbol[3] = uint[3](dest[0u], dest[1u], i);
|
||||
assign_and_preserve_padding_4_s_a_X_el_X_X(tint_symbol, value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_2_s_a_X_el(uint dest[1], strided_arr value[3][2]) {
|
||||
{
|
||||
for(uint i = 0u; (i < 3u); i = (i + 1u)) {
|
||||
uint tint_symbol_1[2] = uint[2](dest[0u], i);
|
||||
assign_and_preserve_padding_3_s_a_X_el_X(tint_symbol_1, value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1_s_a_X(uint dest[1], strided_arr_1 value) {
|
||||
uint tint_symbol_2[1] = uint[1](dest[0u]);
|
||||
assign_and_preserve_padding_2_s_a_X_el(tint_symbol_2, value.el);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_s_a(strided_arr_1 value[4]) {
|
||||
{
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
uint tint_symbol_3[1] = uint[1](i);
|
||||
assign_and_preserve_padding_1_s_a_X(tint_symbol_3, value[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void f_1() {
|
||||
strided_arr_1 x_19[4] = s.inner.a;
|
||||
strided_arr x_24[3][2] = s.inner.a[3].el;
|
||||
strided_arr x_28[2] = s.inner.a[3].el[2];
|
||||
float x_32 = s.inner.a[3].el[2][1].el;
|
||||
strided_arr_1 tint_symbol[4] = strided_arr_1[4](strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u));
|
||||
s.inner.a = tint_symbol;
|
||||
strided_arr_1 tint_symbol_4[4] = strided_arr_1[4](strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u));
|
||||
assign_and_preserve_padding_s_a(tint_symbol_4);
|
||||
s.inner.a[3].el[2][1].el = 5.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -28,13 +28,39 @@ struct S {
|
||||
/* 0x0000 */ tint_array<strided_arr_1, 4> a;
|
||||
};
|
||||
|
||||
void assign_and_preserve_padding_4(device strided_arr* const dest, strided_arr value) {
|
||||
(*(dest)).el = value.el;
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_3(device tint_array<strided_arr, 2>* const dest, tint_array<strided_arr, 2> value) {
|
||||
for(uint i = 0u; (i < 2u); i = (i + 1u)) {
|
||||
assign_and_preserve_padding_4(&((*(dest))[i]), value[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_2(device tint_array<tint_array<strided_arr, 2>, 3>* const dest, tint_array<tint_array<strided_arr, 2>, 3> value) {
|
||||
for(uint i = 0u; (i < 3u); i = (i + 1u)) {
|
||||
assign_and_preserve_padding_3(&((*(dest))[i]), value[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding_1(device strided_arr_1* const dest, strided_arr_1 value) {
|
||||
assign_and_preserve_padding_2(&((*(dest)).el), value.el);
|
||||
}
|
||||
|
||||
void assign_and_preserve_padding(device tint_array<strided_arr_1, 4>* const dest, tint_array<strided_arr_1, 4> value) {
|
||||
for(uint i = 0u; (i < 4u); i = (i + 1u)) {
|
||||
assign_and_preserve_padding_1(&((*(dest))[i]), value[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void f_1(device S* const tint_symbol_1) {
|
||||
tint_array<strided_arr_1, 4> const x_19 = (*(tint_symbol_1)).a;
|
||||
tint_array<tint_array<strided_arr, 2>, 3> const x_24 = (*(tint_symbol_1)).a[3].el;
|
||||
tint_array<strided_arr, 2> const x_28 = (*(tint_symbol_1)).a[3].el[2];
|
||||
float const x_32 = (*(tint_symbol_1)).a[3].el[2][1].el;
|
||||
tint_array<strided_arr_1, 4> const tint_symbol = tint_array<strided_arr_1, 4>{};
|
||||
(*(tint_symbol_1)).a = tint_symbol;
|
||||
assign_and_preserve_padding(&((*(tint_symbol_1)).a), tint_symbol);
|
||||
(*(tint_symbol_1)).a[3].el[2][1].el = 5.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 43
|
||||
; Bound: 151
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -16,6 +16,26 @@
|
||||
OpName %strided_arr "strided_arr"
|
||||
OpMemberName %strided_arr 0 "el"
|
||||
OpName %s "s"
|
||||
OpName %assign_and_preserve_padding_4_s_a_X_el_X_X "assign_and_preserve_padding_4_s_a_X_el_X_X"
|
||||
OpName %dest "dest"
|
||||
OpName %value "value"
|
||||
OpName %assign_and_preserve_padding_3_s_a_X_el_X "assign_and_preserve_padding_3_s_a_X_el_X"
|
||||
OpName %dest_0 "dest"
|
||||
OpName %value_0 "value"
|
||||
OpName %i "i"
|
||||
OpName %var_for_index "var_for_index"
|
||||
OpName %assign_and_preserve_padding_2_s_a_X_el "assign_and_preserve_padding_2_s_a_X_el"
|
||||
OpName %dest_1 "dest"
|
||||
OpName %value_1 "value"
|
||||
OpName %i_0 "i"
|
||||
OpName %var_for_index_1 "var_for_index_1"
|
||||
OpName %assign_and_preserve_padding_1_s_a_X "assign_and_preserve_padding_1_s_a_X"
|
||||
OpName %dest_2 "dest"
|
||||
OpName %value_2 "value"
|
||||
OpName %assign_and_preserve_padding_s_a "assign_and_preserve_padding_s_a"
|
||||
OpName %value_3 "value"
|
||||
OpName %i_1 "i"
|
||||
OpName %var_for_index_2 "var_for_index_2"
|
||||
OpName %f_1 "f_1"
|
||||
OpName %f "f"
|
||||
OpDecorate %s_block Block
|
||||
@@ -28,6 +48,9 @@
|
||||
OpDecorate %_arr_strided_arr_1_uint_4 ArrayStride 128
|
||||
OpDecorate %s DescriptorSet 0
|
||||
OpDecorate %s Binding 0
|
||||
OpDecorate %_arr_uint_uint_3 ArrayStride 4
|
||||
OpDecorate %_arr_uint_uint_2 ArrayStride 4
|
||||
OpDecorate %_arr_uint_uint_1 ArrayStride 4
|
||||
%float = OpTypeFloat 32
|
||||
%strided_arr = OpTypeStruct %float
|
||||
%uint = OpTypeInt 32 0
|
||||
@@ -43,36 +66,187 @@
|
||||
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
|
||||
%s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
|
||||
%void = OpTypeVoid
|
||||
%15 = OpTypeFunction %void
|
||||
%_arr_uint_uint_3 = OpTypeArray %uint %uint_3
|
||||
%15 = OpTypeFunction %void %_arr_uint_uint_3 %strided_arr
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_StorageBuffer__arr_strided_arr_1_uint_4 = OpTypePointer StorageBuffer %_arr_strided_arr_1_uint_4
|
||||
%int = OpTypeInt 32 1
|
||||
%24 = OpConstantNull %int
|
||||
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
|
||||
%_arr_uint_uint_2 = OpTypeArray %uint %uint_2
|
||||
%31 = OpTypeFunction %void %_arr_uint_uint_2 %_arr_strided_arr_uint_2
|
||||
%37 = OpConstantNull %uint
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function__arr_strided_arr_uint_2 = OpTypePointer Function %_arr_strided_arr_uint_2
|
||||
%52 = OpConstantNull %_arr_strided_arr_uint_2
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_ptr_Function_strided_arr = OpTypePointer Function %strided_arr
|
||||
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
|
||||
%65 = OpTypeFunction %void %_arr_uint_uint_1 %_arr__arr_strided_arr_uint_2_uint_3
|
||||
%_ptr_Function__arr__arr_strided_arr_uint_2_uint_3 = OpTypePointer Function %_arr__arr_strided_arr_uint_2_uint_3
|
||||
%83 = OpConstantNull %_arr__arr_strided_arr_uint_2_uint_3
|
||||
%93 = OpTypeFunction %void %_arr_uint_uint_1 %strided_arr_1
|
||||
%102 = OpTypeFunction %void %_arr_strided_arr_1_uint_4
|
||||
%_ptr_Function__arr_strided_arr_1_uint_4 = OpTypePointer Function %_arr_strided_arr_1_uint_4
|
||||
%118 = OpConstantNull %_arr_strided_arr_1_uint_4
|
||||
%_ptr_Function_strided_arr_1 = OpTypePointer Function %strided_arr_1
|
||||
%128 = OpTypeFunction %void
|
||||
%_ptr_StorageBuffer__arr_strided_arr_1_uint_4 = OpTypePointer StorageBuffer %_arr_strided_arr_1_uint_4
|
||||
%int_3 = OpConstant %int 3
|
||||
%_ptr_StorageBuffer__arr__arr_strided_arr_uint_2_uint_3 = OpTypePointer StorageBuffer %_arr__arr_strided_arr_uint_2_uint_3
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_StorageBuffer__arr_strided_arr_uint_2 = OpTypePointer StorageBuffer %_arr_strided_arr_uint_2
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
|
||||
%37 = OpConstantNull %_arr_strided_arr_1_uint_4
|
||||
%float_5 = OpConstant %float 5
|
||||
%f_1 = OpFunction %void None %15
|
||||
%18 = OpLabel
|
||||
%21 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_1_uint_4 %s %uint_0 %uint_0
|
||||
%22 = OpLoad %_arr_strided_arr_1_uint_4 %21
|
||||
%26 = OpAccessChain %_ptr_StorageBuffer__arr__arr_strided_arr_uint_2_uint_3 %s %uint_0 %uint_0 %int_3 %uint_0
|
||||
%27 = OpLoad %_arr__arr_strided_arr_uint_2_uint_3 %26
|
||||
%30 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_uint_2 %s %uint_0 %uint_0 %int_3 %uint_0 %int_2
|
||||
%31 = OpLoad %_arr_strided_arr_uint_2 %30
|
||||
%34 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %int_3 %uint_0 %int_2 %int_1 %uint_0
|
||||
%35 = OpLoad %float %34
|
||||
%36 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_1_uint_4 %s %uint_0 %uint_0
|
||||
OpStore %36 %37
|
||||
%38 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %int_3 %uint_0 %int_2 %int_1 %uint_0
|
||||
OpStore %38 %float_5
|
||||
%assign_and_preserve_padding_4_s_a_X_el_X_X = OpFunction %void None %15
|
||||
%dest = OpFunctionParameter %_arr_uint_uint_3
|
||||
%value = OpFunctionParameter %strided_arr
|
||||
%21 = OpLabel
|
||||
%25 = OpCompositeExtract %uint %dest 0
|
||||
%26 = OpCompositeExtract %uint %dest 0
|
||||
%27 = OpCompositeExtract %uint %dest 0
|
||||
%29 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %25 %uint_0 %26 %27 %uint_0
|
||||
%30 = OpCompositeExtract %float %value 0
|
||||
OpStore %29 %30
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %15
|
||||
%assign_and_preserve_padding_3_s_a_X_el_X = OpFunction %void None %31
|
||||
%dest_0 = OpFunctionParameter %_arr_uint_uint_2
|
||||
%value_0 = OpFunctionParameter %_arr_strided_arr_uint_2
|
||||
%36 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_uint Function %37
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_strided_arr_uint_2 Function %52
|
||||
OpStore %i %37
|
||||
OpBranch %40
|
||||
%40 = OpLabel
|
||||
OpLoopMerge %41 %42 None
|
||||
OpBranch %43
|
||||
%43 = OpLabel
|
||||
%45 = OpLoad %uint %i
|
||||
%46 = OpULessThan %bool %45 %uint_2
|
||||
%44 = OpLogicalNot %bool %46
|
||||
OpSelectionMerge %48 None
|
||||
OpBranchConditional %44 %49 %48
|
||||
%49 = OpLabel
|
||||
OpBranch %41
|
||||
%48 = OpLabel
|
||||
OpStore %var_for_index %value_0
|
||||
%54 = OpCompositeExtract %uint %dest_0 0
|
||||
%56 = OpCompositeExtract %uint %dest_0 1
|
||||
%57 = OpLoad %uint %i
|
||||
%58 = OpCompositeConstruct %_arr_uint_uint_3 %54 %56 %57
|
||||
%59 = OpLoad %uint %i
|
||||
%61 = OpAccessChain %_ptr_Function_strided_arr %var_for_index %59
|
||||
%62 = OpLoad %strided_arr %61
|
||||
%53 = OpFunctionCall %void %assign_and_preserve_padding_4_s_a_X_el_X_X %58 %62
|
||||
OpBranch %42
|
||||
%42 = OpLabel
|
||||
%63 = OpLoad %uint %i
|
||||
%64 = OpIAdd %uint %63 %uint_1
|
||||
OpStore %i %64
|
||||
OpBranch %40
|
||||
%41 = OpLabel
|
||||
%42 = OpFunctionCall %void %f_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%assign_and_preserve_padding_2_s_a_X_el = OpFunction %void None %65
|
||||
%dest_1 = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value_1 = OpFunctionParameter %_arr__arr_strided_arr_uint_2_uint_3
|
||||
%70 = OpLabel
|
||||
%i_0 = OpVariable %_ptr_Function_uint Function %37
|
||||
%var_for_index_1 = OpVariable %_ptr_Function__arr__arr_strided_arr_uint_2_uint_3 Function %83
|
||||
OpStore %i_0 %37
|
||||
OpBranch %72
|
||||
%72 = OpLabel
|
||||
OpLoopMerge %73 %74 None
|
||||
OpBranch %75
|
||||
%75 = OpLabel
|
||||
%77 = OpLoad %uint %i_0
|
||||
%78 = OpULessThan %bool %77 %uint_3
|
||||
%76 = OpLogicalNot %bool %78
|
||||
OpSelectionMerge %79 None
|
||||
OpBranchConditional %76 %80 %79
|
||||
%80 = OpLabel
|
||||
OpBranch %73
|
||||
%79 = OpLabel
|
||||
OpStore %var_for_index_1 %value_1
|
||||
%85 = OpCompositeExtract %uint %dest_1 0
|
||||
%86 = OpLoad %uint %i_0
|
||||
%87 = OpCompositeConstruct %_arr_uint_uint_2 %85 %86
|
||||
%88 = OpLoad %uint %i_0
|
||||
%89 = OpAccessChain %_ptr_Function__arr_strided_arr_uint_2 %var_for_index_1 %88
|
||||
%90 = OpLoad %_arr_strided_arr_uint_2 %89
|
||||
%84 = OpFunctionCall %void %assign_and_preserve_padding_3_s_a_X_el_X %87 %90
|
||||
OpBranch %74
|
||||
%74 = OpLabel
|
||||
%91 = OpLoad %uint %i_0
|
||||
%92 = OpIAdd %uint %91 %uint_1
|
||||
OpStore %i_0 %92
|
||||
OpBranch %72
|
||||
%73 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%assign_and_preserve_padding_1_s_a_X = OpFunction %void None %93
|
||||
%dest_2 = OpFunctionParameter %_arr_uint_uint_1
|
||||
%value_2 = OpFunctionParameter %strided_arr_1
|
||||
%97 = OpLabel
|
||||
%99 = OpCompositeExtract %uint %dest_2 0
|
||||
%100 = OpCompositeConstruct %_arr_uint_uint_1 %99
|
||||
%101 = OpCompositeExtract %_arr__arr_strided_arr_uint_2_uint_3 %value_2 0
|
||||
%98 = OpFunctionCall %void %assign_and_preserve_padding_2_s_a_X_el %100 %101
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%assign_and_preserve_padding_s_a = OpFunction %void None %102
|
||||
%value_3 = OpFunctionParameter %_arr_strided_arr_1_uint_4
|
||||
%105 = OpLabel
|
||||
%i_1 = OpVariable %_ptr_Function_uint Function %37
|
||||
%var_for_index_2 = OpVariable %_ptr_Function__arr_strided_arr_1_uint_4 Function %118
|
||||
OpStore %i_1 %37
|
||||
OpBranch %107
|
||||
%107 = OpLabel
|
||||
OpLoopMerge %108 %109 None
|
||||
OpBranch %110
|
||||
%110 = OpLabel
|
||||
%112 = OpLoad %uint %i_1
|
||||
%113 = OpULessThan %bool %112 %uint_4
|
||||
%111 = OpLogicalNot %bool %113
|
||||
OpSelectionMerge %114 None
|
||||
OpBranchConditional %111 %115 %114
|
||||
%115 = OpLabel
|
||||
OpBranch %108
|
||||
%114 = OpLabel
|
||||
OpStore %var_for_index_2 %value_3
|
||||
%120 = OpLoad %uint %i_1
|
||||
%121 = OpCompositeConstruct %_arr_uint_uint_1 %120
|
||||
%122 = OpLoad %uint %i_1
|
||||
%124 = OpAccessChain %_ptr_Function_strided_arr_1 %var_for_index_2 %122
|
||||
%125 = OpLoad %strided_arr_1 %124
|
||||
%119 = OpFunctionCall %void %assign_and_preserve_padding_1_s_a_X %121 %125
|
||||
OpBranch %109
|
||||
%109 = OpLabel
|
||||
%126 = OpLoad %uint %i_1
|
||||
%127 = OpIAdd %uint %126 %uint_1
|
||||
OpStore %i_1 %127
|
||||
OpBranch %107
|
||||
%108 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f_1 = OpFunction %void None %128
|
||||
%130 = OpLabel
|
||||
%132 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_1_uint_4 %s %uint_0 %uint_0
|
||||
%133 = OpLoad %_arr_strided_arr_1_uint_4 %132
|
||||
%136 = OpAccessChain %_ptr_StorageBuffer__arr__arr_strided_arr_uint_2_uint_3 %s %uint_0 %uint_0 %int_3 %uint_0
|
||||
%137 = OpLoad %_arr__arr_strided_arr_uint_2_uint_3 %136
|
||||
%140 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_uint_2 %s %uint_0 %uint_0 %int_3 %uint_0 %int_2
|
||||
%141 = OpLoad %_arr_strided_arr_uint_2 %140
|
||||
%143 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %int_3 %uint_0 %int_2 %int_1 %uint_0
|
||||
%144 = OpLoad %float %143
|
||||
%145 = OpFunctionCall %void %assign_and_preserve_padding_s_a %118
|
||||
%146 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %int_3 %uint_0 %int_2 %int_1 %uint_0
|
||||
OpStore %146 %float_5
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %128
|
||||
%149 = OpLabel
|
||||
%150 = OpFunctionCall %void %f_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user