Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 1 | ; SPIR-V |
| 2 | ; Version: 1.3 |
| 3 | ; Generator: Google Tint Compiler; 0 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 4 | ; Bound: 86 |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 5 | ; Schema: 0 |
| 6 | OpCapability Shader |
| 7 | OpMemoryModel Logical GLSL450 |
| 8 | OpEntryPoint GLCompute %f "f" |
| 9 | OpExecutionMode %f LocalSize 1 1 1 |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 10 | OpName %ssbo_block "ssbo_block" |
| 11 | OpMemberName %ssbo_block 0 "inner" |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 12 | OpName %SSBO "SSBO" |
| 13 | OpMemberName %SSBO 0 "m" |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 14 | OpName %strided_arr "strided_arr" |
| 15 | OpMemberName %strided_arr 0 "el" |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 16 | OpName %ssbo "ssbo" |
| 17 | OpName %arr_to_mat2x2_stride_16 "arr_to_mat2x2_stride_16" |
| 18 | OpName %arr "arr" |
| 19 | OpName %mat2x2_stride_16_to_arr "mat2x2_stride_16_to_arr" |
James Price | 7161ae5 | 2022-02-17 20:43:19 +0000 | [diff] [blame] | 20 | OpName %m "m" |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 21 | OpName %assign_and_preserve_padding_1_ssbo_m_X "assign_and_preserve_padding_1_ssbo_m_X" |
| 22 | OpName %dest "dest" |
| 23 | OpName %value "value" |
| 24 | OpName %assign_and_preserve_padding_ssbo_m "assign_and_preserve_padding_ssbo_m" |
| 25 | OpName %value_0 "value" |
| 26 | OpName %i "i" |
| 27 | OpName %var_for_index "var_for_index" |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 28 | OpName %f_1 "f_1" |
| 29 | OpName %f "f" |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 30 | OpDecorate %ssbo_block Block |
| 31 | OpMemberDecorate %ssbo_block 0 Offset 0 |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 32 | OpMemberDecorate %SSBO 0 Offset 0 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 33 | OpMemberDecorate %strided_arr 0 Offset 0 |
| 34 | OpDecorate %_arr_strided_arr_uint_2 ArrayStride 16 |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 35 | OpDecorate %ssbo DescriptorSet 0 |
| 36 | OpDecorate %ssbo Binding 0 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 37 | OpDecorate %_arr_uint_uint_1 ArrayStride 4 |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 38 | %float = OpTypeFloat 32 |
| 39 | %v2float = OpTypeVector %float 2 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 40 | %strided_arr = OpTypeStruct %v2float |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 41 | %uint = OpTypeInt 32 0 |
| 42 | %uint_2 = OpConstant %uint 2 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 43 | %_arr_strided_arr_uint_2 = OpTypeArray %strided_arr %uint_2 |
| 44 | %SSBO = OpTypeStruct %_arr_strided_arr_uint_2 |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 45 | %ssbo_block = OpTypeStruct %SSBO |
| 46 | %_ptr_StorageBuffer_ssbo_block = OpTypePointer StorageBuffer %ssbo_block |
| 47 | %ssbo = OpVariable %_ptr_StorageBuffer_ssbo_block StorageBuffer |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 48 | %mat2v2float = OpTypeMatrix %v2float 2 |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 49 | %11 = OpTypeFunction %mat2v2float %_arr_strided_arr_uint_2 |
| 50 | %16 = OpConstantNull %uint |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 51 | %uint_1 = OpConstant %uint 1 |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 52 | %23 = OpTypeFunction %_arr_strided_arr_uint_2 %mat2v2float |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 53 | %void = OpTypeVoid |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 54 | %_arr_uint_uint_1 = OpTypeArray %uint %uint_1 |
| 55 | %32 = OpTypeFunction %void %_arr_uint_uint_1 %strided_arr |
Ben Clayton | 8e34852 | 2022-06-01 15:57:22 +0000 | [diff] [blame] | 56 | %uint_0 = OpConstant %uint 0 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 57 | %int = OpTypeInt 32 1 |
| 58 | %41 = OpConstantNull %int |
| 59 | %_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float |
| 60 | %46 = OpTypeFunction %void %_arr_strided_arr_uint_2 |
| 61 | %_ptr_Function_uint = OpTypePointer Function %uint |
| 62 | %bool = OpTypeBool |
| 63 | %_ptr_Function__arr_strided_arr_uint_2 = OpTypePointer Function %_arr_strided_arr_uint_2 |
| 64 | %64 = OpConstantNull %_arr_strided_arr_uint_2 |
| 65 | %_ptr_Function_strided_arr = OpTypePointer Function %strided_arr |
| 66 | %74 = OpTypeFunction %void |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 67 | %_ptr_StorageBuffer__arr_strided_arr_uint_2 = OpTypePointer StorageBuffer %_arr_strided_arr_uint_2 |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 68 | %arr_to_mat2x2_stride_16 = OpFunction %mat2v2float None %11 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 69 | %arr = OpFunctionParameter %_arr_strided_arr_uint_2 |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 70 | %15 = OpLabel |
| 71 | %17 = OpCompositeExtract %strided_arr %arr 0 |
| 72 | %18 = OpCompositeExtract %v2float %17 0 |
| 73 | %20 = OpCompositeExtract %strided_arr %arr 1 |
| 74 | %21 = OpCompositeExtract %v2float %20 0 |
| 75 | %22 = OpCompositeConstruct %mat2v2float %18 %21 |
| 76 | OpReturnValue %22 |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 77 | OpFunctionEnd |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 78 | %mat2x2_stride_16_to_arr = OpFunction %_arr_strided_arr_uint_2 None %23 |
James Price | 7161ae5 | 2022-02-17 20:43:19 +0000 | [diff] [blame] | 79 | %m = OpFunctionParameter %mat2v2float |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 80 | %26 = OpLabel |
| 81 | %27 = OpCompositeExtract %v2float %m 0 |
| 82 | %28 = OpCompositeConstruct %strided_arr %27 |
| 83 | %29 = OpCompositeExtract %v2float %m 1 |
| 84 | %30 = OpCompositeConstruct %strided_arr %29 |
| 85 | %31 = OpCompositeConstruct %_arr_strided_arr_uint_2 %28 %30 |
| 86 | OpReturnValue %31 |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 87 | OpFunctionEnd |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 88 | %assign_and_preserve_padding_1_ssbo_m_X = OpFunction %void None %32 |
| 89 | %dest = OpFunctionParameter %_arr_uint_uint_1 |
| 90 | %value = OpFunctionParameter %strided_arr |
| 91 | %38 = OpLabel |
| 92 | %42 = OpCompositeExtract %uint %dest 0 |
| 93 | %44 = OpAccessChain %_ptr_StorageBuffer_v2float %ssbo %uint_0 %uint_0 %42 %uint_0 |
| 94 | %45 = OpCompositeExtract %v2float %value 0 |
| 95 | OpStore %44 %45 |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 96 | OpReturn |
| 97 | OpFunctionEnd |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 98 | %assign_and_preserve_padding_ssbo_m = OpFunction %void None %46 |
| 99 | %value_0 = OpFunctionParameter %_arr_strided_arr_uint_2 |
| 100 | %49 = OpLabel |
| 101 | %i = OpVariable %_ptr_Function_uint Function %16 |
| 102 | %var_for_index = OpVariable %_ptr_Function__arr_strided_arr_uint_2 Function %64 |
| 103 | OpStore %i %16 |
| 104 | OpBranch %52 |
| 105 | %52 = OpLabel |
| 106 | OpLoopMerge %53 %54 None |
| 107 | OpBranch %55 |
| 108 | %55 = OpLabel |
| 109 | %57 = OpLoad %uint %i |
| 110 | %58 = OpULessThan %bool %57 %uint_2 |
| 111 | %56 = OpLogicalNot %bool %58 |
| 112 | OpSelectionMerge %60 None |
| 113 | OpBranchConditional %56 %61 %60 |
| 114 | %61 = OpLabel |
| 115 | OpBranch %53 |
| 116 | %60 = OpLabel |
| 117 | OpStore %var_for_index %value_0 |
| 118 | %66 = OpLoad %uint %i |
| 119 | %67 = OpCompositeConstruct %_arr_uint_uint_1 %66 |
| 120 | %68 = OpLoad %uint %i |
| 121 | %70 = OpAccessChain %_ptr_Function_strided_arr %var_for_index %68 |
| 122 | %71 = OpLoad %strided_arr %70 |
| 123 | %65 = OpFunctionCall %void %assign_and_preserve_padding_1_ssbo_m_X %67 %71 |
| 124 | OpBranch %54 |
| 125 | %54 = OpLabel |
| 126 | %72 = OpLoad %uint %i |
| 127 | %73 = OpIAdd %uint %72 %uint_1 |
| 128 | OpStore %i %73 |
| 129 | OpBranch %52 |
| 130 | %53 = OpLabel |
| 131 | OpReturn |
| 132 | OpFunctionEnd |
| 133 | %f_1 = OpFunction %void None %74 |
| 134 | %76 = OpLabel |
| 135 | %79 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_uint_2 %ssbo %uint_0 %uint_0 |
| 136 | %80 = OpLoad %_arr_strided_arr_uint_2 %79 |
| 137 | %77 = OpFunctionCall %mat2v2float %arr_to_mat2x2_stride_16 %80 |
| 138 | %81 = OpFunctionCall %_arr_strided_arr_uint_2 %mat2x2_stride_16_to_arr %77 |
| 139 | %82 = OpFunctionCall %void %assign_and_preserve_padding_ssbo_m %81 |
| 140 | OpReturn |
| 141 | OpFunctionEnd |
| 142 | %f = OpFunction %void None %74 |
| 143 | %84 = OpLabel |
| 144 | %85 = OpFunctionCall %void %f_1 |
Ben Clayton | 97668c8 | 2021-07-27 08:17:29 +0000 | [diff] [blame] | 145 | OpReturn |
| 146 | OpFunctionEnd |