Ben Clayton | 009d129 | 2022-02-04 15:39:34 +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: 151 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +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 %s_block "s_block" |
| 11 | OpMemberName %s_block 0 "inner" |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 12 | OpName %S "S" |
| 13 | OpMemberName %S 0 "a" |
| 14 | OpName %strided_arr_1 "strided_arr_1" |
| 15 | OpMemberName %strided_arr_1 0 "el" |
| 16 | OpName %strided_arr "strided_arr" |
| 17 | OpMemberName %strided_arr 0 "el" |
| 18 | OpName %s "s" |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 19 | OpName %assign_and_preserve_padding_4_s_a_X_el_X_X "assign_and_preserve_padding_4_s_a_X_el_X_X" |
| 20 | OpName %dest "dest" |
| 21 | OpName %value "value" |
| 22 | OpName %assign_and_preserve_padding_3_s_a_X_el_X "assign_and_preserve_padding_3_s_a_X_el_X" |
| 23 | OpName %dest_0 "dest" |
| 24 | OpName %value_0 "value" |
| 25 | OpName %i "i" |
| 26 | OpName %var_for_index "var_for_index" |
| 27 | OpName %assign_and_preserve_padding_2_s_a_X_el "assign_and_preserve_padding_2_s_a_X_el" |
| 28 | OpName %dest_1 "dest" |
| 29 | OpName %value_1 "value" |
| 30 | OpName %i_0 "i" |
| 31 | OpName %var_for_index_1 "var_for_index_1" |
| 32 | OpName %assign_and_preserve_padding_1_s_a_X "assign_and_preserve_padding_1_s_a_X" |
| 33 | OpName %dest_2 "dest" |
| 34 | OpName %value_2 "value" |
| 35 | OpName %assign_and_preserve_padding_s_a "assign_and_preserve_padding_s_a" |
| 36 | OpName %value_3 "value" |
| 37 | OpName %i_1 "i" |
| 38 | OpName %var_for_index_2 "var_for_index_2" |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 39 | OpName %f_1 "f_1" |
| 40 | OpName %f "f" |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 41 | OpDecorate %s_block Block |
| 42 | OpMemberDecorate %s_block 0 Offset 0 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 43 | OpMemberDecorate %S 0 Offset 0 |
| 44 | OpMemberDecorate %strided_arr_1 0 Offset 0 |
| 45 | OpMemberDecorate %strided_arr 0 Offset 0 |
| 46 | OpDecorate %_arr_strided_arr_uint_2 ArrayStride 8 |
| 47 | OpDecorate %_arr__arr_strided_arr_uint_2_uint_3 ArrayStride 16 |
| 48 | OpDecorate %_arr_strided_arr_1_uint_4 ArrayStride 128 |
| 49 | OpDecorate %s DescriptorSet 0 |
| 50 | OpDecorate %s Binding 0 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 51 | OpDecorate %_arr_uint_uint_3 ArrayStride 4 |
| 52 | OpDecorate %_arr_uint_uint_2 ArrayStride 4 |
| 53 | OpDecorate %_arr_uint_uint_1 ArrayStride 4 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 54 | %float = OpTypeFloat 32 |
| 55 | %strided_arr = OpTypeStruct %float |
| 56 | %uint = OpTypeInt 32 0 |
| 57 | %uint_2 = OpConstant %uint 2 |
| 58 | %_arr_strided_arr_uint_2 = OpTypeArray %strided_arr %uint_2 |
| 59 | %uint_3 = OpConstant %uint 3 |
| 60 | %_arr__arr_strided_arr_uint_2_uint_3 = OpTypeArray %_arr_strided_arr_uint_2 %uint_3 |
| 61 | %strided_arr_1 = OpTypeStruct %_arr__arr_strided_arr_uint_2_uint_3 |
| 62 | %uint_4 = OpConstant %uint 4 |
| 63 | %_arr_strided_arr_1_uint_4 = OpTypeArray %strided_arr_1 %uint_4 |
| 64 | %S = OpTypeStruct %_arr_strided_arr_1_uint_4 |
Zhaoming Jiang | 6ab5d3c | 2022-11-02 02:25:38 +0000 | [diff] [blame] | 65 | %s_block = OpTypeStruct %S |
| 66 | %_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block |
| 67 | %s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 68 | %void = OpTypeVoid |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 69 | %_arr_uint_uint_3 = OpTypeArray %uint %uint_3 |
| 70 | %15 = OpTypeFunction %void %_arr_uint_uint_3 %strided_arr |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 71 | %uint_0 = OpConstant %uint 0 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 72 | %int = OpTypeInt 32 1 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 73 | %24 = OpConstantNull %int |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 74 | %int_1 = OpConstant %int 1 |
| 75 | %int_2 = OpConstant %int 2 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 76 | %_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| 77 | %_arr_uint_uint_2 = OpTypeArray %uint %uint_2 |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 78 | %33 = OpTypeFunction %void %_arr_uint_uint_2 %_arr_strided_arr_uint_2 |
| 79 | %39 = OpConstantNull %uint |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 80 | %_ptr_Function_uint = OpTypePointer Function %uint |
| 81 | %bool = OpTypeBool |
| 82 | %_ptr_Function__arr_strided_arr_uint_2 = OpTypePointer Function %_arr_strided_arr_uint_2 |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 83 | %54 = OpConstantNull %_arr_strided_arr_uint_2 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 84 | %uint_1 = OpConstant %uint 1 |
| 85 | %_ptr_Function_strided_arr = OpTypePointer Function %strided_arr |
| 86 | %_arr_uint_uint_1 = OpTypeArray %uint %uint_1 |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 87 | %67 = OpTypeFunction %void %_arr_uint_uint_1 %_arr__arr_strided_arr_uint_2_uint_3 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 88 | %_ptr_Function__arr__arr_strided_arr_uint_2_uint_3 = OpTypePointer Function %_arr__arr_strided_arr_uint_2_uint_3 |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 89 | %85 = OpConstantNull %_arr__arr_strided_arr_uint_2_uint_3 |
| 90 | %95 = OpTypeFunction %void %_arr_uint_uint_1 %strided_arr_1 |
| 91 | %104 = OpTypeFunction %void %_arr_strided_arr_1_uint_4 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 92 | %_ptr_Function__arr_strided_arr_1_uint_4 = OpTypePointer Function %_arr_strided_arr_1_uint_4 |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 93 | %120 = OpConstantNull %_arr_strided_arr_1_uint_4 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 94 | %_ptr_Function_strided_arr_1 = OpTypePointer Function %strided_arr_1 |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 95 | %130 = OpTypeFunction %void |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 96 | %_ptr_StorageBuffer__arr_strided_arr_1_uint_4 = OpTypePointer StorageBuffer %_arr_strided_arr_1_uint_4 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 97 | %int_3 = OpConstant %int 3 |
| 98 | %_ptr_StorageBuffer__arr__arr_strided_arr_uint_2_uint_3 = OpTypePointer StorageBuffer %_arr__arr_strided_arr_uint_2_uint_3 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 99 | %_ptr_StorageBuffer__arr_strided_arr_uint_2 = OpTypePointer StorageBuffer %_arr_strided_arr_uint_2 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 100 | %float_5 = OpConstant %float 5 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 101 | %assign_and_preserve_padding_4_s_a_X_el_X_X = OpFunction %void None %15 |
| 102 | %dest = OpFunctionParameter %_arr_uint_uint_3 |
| 103 | %value = OpFunctionParameter %strided_arr |
| 104 | %21 = OpLabel |
| 105 | %25 = OpCompositeExtract %uint %dest 0 |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 106 | %27 = OpCompositeExtract %uint %dest 1 |
| 107 | %29 = OpCompositeExtract %uint %dest 2 |
| 108 | %31 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %25 %uint_0 %27 %29 %uint_0 |
| 109 | %32 = OpCompositeExtract %float %value 0 |
| 110 | OpStore %31 %32 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 111 | OpReturn |
| 112 | OpFunctionEnd |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 113 | %assign_and_preserve_padding_3_s_a_X_el_X = OpFunction %void None %33 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 114 | %dest_0 = OpFunctionParameter %_arr_uint_uint_2 |
| 115 | %value_0 = OpFunctionParameter %_arr_strided_arr_uint_2 |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 116 | %38 = OpLabel |
| 117 | %i = OpVariable %_ptr_Function_uint Function %39 |
| 118 | %var_for_index = OpVariable %_ptr_Function__arr_strided_arr_uint_2 Function %54 |
| 119 | OpStore %i %39 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 120 | OpBranch %42 |
| 121 | %42 = OpLabel |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 122 | OpLoopMerge %43 %44 None |
| 123 | OpBranch %45 |
| 124 | %45 = OpLabel |
| 125 | %47 = OpLoad %uint %i |
| 126 | %48 = OpULessThan %bool %47 %uint_2 |
| 127 | %46 = OpLogicalNot %bool %48 |
| 128 | OpSelectionMerge %50 None |
| 129 | OpBranchConditional %46 %51 %50 |
| 130 | %51 = OpLabel |
| 131 | OpBranch %43 |
| 132 | %50 = OpLabel |
| 133 | OpStore %var_for_index %value_0 |
| 134 | %56 = OpCompositeExtract %uint %dest_0 0 |
| 135 | %58 = OpCompositeExtract %uint %dest_0 1 |
| 136 | %59 = OpLoad %uint %i |
| 137 | %60 = OpCompositeConstruct %_arr_uint_uint_3 %56 %58 %59 |
| 138 | %61 = OpLoad %uint %i |
| 139 | %63 = OpAccessChain %_ptr_Function_strided_arr %var_for_index %61 |
| 140 | %64 = OpLoad %strided_arr %63 |
| 141 | %55 = OpFunctionCall %void %assign_and_preserve_padding_4_s_a_X_el_X_X %60 %64 |
| 142 | OpBranch %44 |
| 143 | %44 = OpLabel |
| 144 | %65 = OpLoad %uint %i |
| 145 | %66 = OpIAdd %uint %65 %uint_1 |
| 146 | OpStore %i %66 |
| 147 | OpBranch %42 |
| 148 | %43 = OpLabel |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 149 | OpReturn |
| 150 | OpFunctionEnd |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 151 | %assign_and_preserve_padding_2_s_a_X_el = OpFunction %void None %67 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 152 | %dest_1 = OpFunctionParameter %_arr_uint_uint_1 |
| 153 | %value_1 = OpFunctionParameter %_arr__arr_strided_arr_uint_2_uint_3 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 154 | %72 = OpLabel |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 155 | %i_0 = OpVariable %_ptr_Function_uint Function %39 |
| 156 | %var_for_index_1 = OpVariable %_ptr_Function__arr__arr_strided_arr_uint_2_uint_3 Function %85 |
| 157 | OpStore %i_0 %39 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 158 | OpBranch %74 |
| 159 | %74 = OpLabel |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 160 | OpLoopMerge %75 %76 None |
| 161 | OpBranch %77 |
| 162 | %77 = OpLabel |
| 163 | %79 = OpLoad %uint %i_0 |
| 164 | %80 = OpULessThan %bool %79 %uint_3 |
| 165 | %78 = OpLogicalNot %bool %80 |
| 166 | OpSelectionMerge %81 None |
| 167 | OpBranchConditional %78 %82 %81 |
| 168 | %82 = OpLabel |
| 169 | OpBranch %75 |
| 170 | %81 = OpLabel |
| 171 | OpStore %var_for_index_1 %value_1 |
| 172 | %87 = OpCompositeExtract %uint %dest_1 0 |
| 173 | %88 = OpLoad %uint %i_0 |
| 174 | %89 = OpCompositeConstruct %_arr_uint_uint_2 %87 %88 |
| 175 | %90 = OpLoad %uint %i_0 |
| 176 | %91 = OpAccessChain %_ptr_Function__arr_strided_arr_uint_2 %var_for_index_1 %90 |
| 177 | %92 = OpLoad %_arr_strided_arr_uint_2 %91 |
| 178 | %86 = OpFunctionCall %void %assign_and_preserve_padding_3_s_a_X_el_X %89 %92 |
| 179 | OpBranch %76 |
| 180 | %76 = OpLabel |
| 181 | %93 = OpLoad %uint %i_0 |
| 182 | %94 = OpIAdd %uint %93 %uint_1 |
| 183 | OpStore %i_0 %94 |
| 184 | OpBranch %74 |
| 185 | %75 = OpLabel |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 186 | OpReturn |
| 187 | OpFunctionEnd |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 188 | %assign_and_preserve_padding_1_s_a_X = OpFunction %void None %95 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 189 | %dest_2 = OpFunctionParameter %_arr_uint_uint_1 |
| 190 | %value_2 = OpFunctionParameter %strided_arr_1 |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 191 | %99 = OpLabel |
| 192 | %101 = OpCompositeExtract %uint %dest_2 0 |
| 193 | %102 = OpCompositeConstruct %_arr_uint_uint_1 %101 |
| 194 | %103 = OpCompositeExtract %_arr__arr_strided_arr_uint_2_uint_3 %value_2 0 |
| 195 | %100 = OpFunctionCall %void %assign_and_preserve_padding_2_s_a_X_el %102 %103 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 196 | OpReturn |
| 197 | OpFunctionEnd |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 198 | %assign_and_preserve_padding_s_a = OpFunction %void None %104 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 199 | %value_3 = OpFunctionParameter %_arr_strided_arr_1_uint_4 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 200 | %107 = OpLabel |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 201 | %i_1 = OpVariable %_ptr_Function_uint Function %39 |
| 202 | %var_for_index_2 = OpVariable %_ptr_Function__arr_strided_arr_1_uint_4 Function %120 |
| 203 | OpStore %i_1 %39 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 204 | OpBranch %109 |
| 205 | %109 = OpLabel |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 206 | OpLoopMerge %110 %111 None |
| 207 | OpBranch %112 |
| 208 | %112 = OpLabel |
| 209 | %114 = OpLoad %uint %i_1 |
| 210 | %115 = OpULessThan %bool %114 %uint_4 |
| 211 | %113 = OpLogicalNot %bool %115 |
| 212 | OpSelectionMerge %116 None |
| 213 | OpBranchConditional %113 %117 %116 |
| 214 | %117 = OpLabel |
| 215 | OpBranch %110 |
| 216 | %116 = OpLabel |
| 217 | OpStore %var_for_index_2 %value_3 |
| 218 | %122 = OpLoad %uint %i_1 |
| 219 | %123 = OpCompositeConstruct %_arr_uint_uint_1 %122 |
| 220 | %124 = OpLoad %uint %i_1 |
| 221 | %126 = OpAccessChain %_ptr_Function_strided_arr_1 %var_for_index_2 %124 |
| 222 | %127 = OpLoad %strided_arr_1 %126 |
| 223 | %121 = OpFunctionCall %void %assign_and_preserve_padding_1_s_a_X %123 %127 |
| 224 | OpBranch %111 |
| 225 | %111 = OpLabel |
| 226 | %128 = OpLoad %uint %i_1 |
| 227 | %129 = OpIAdd %uint %128 %uint_1 |
| 228 | OpStore %i_1 %129 |
| 229 | OpBranch %109 |
| 230 | %110 = OpLabel |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 231 | OpReturn |
| 232 | OpFunctionEnd |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 233 | %f_1 = OpFunction %void None %130 |
| 234 | %132 = OpLabel |
| 235 | %134 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_1_uint_4 %s %uint_0 %uint_0 |
| 236 | %135 = OpLoad %_arr_strided_arr_1_uint_4 %134 |
| 237 | %138 = OpAccessChain %_ptr_StorageBuffer__arr__arr_strided_arr_uint_2_uint_3 %s %uint_0 %uint_0 %int_3 %uint_0 |
| 238 | %139 = OpLoad %_arr__arr_strided_arr_uint_2_uint_3 %138 |
| 239 | %141 = OpAccessChain %_ptr_StorageBuffer__arr_strided_arr_uint_2 %s %uint_0 %uint_0 %int_3 %uint_0 %int_2 |
| 240 | %142 = OpLoad %_arr_strided_arr_uint_2 %141 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 241 | %143 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %int_3 %uint_0 %int_2 %int_1 %uint_0 |
| 242 | %144 = OpLoad %float %143 |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 243 | %145 = OpFunctionCall %void %assign_and_preserve_padding_s_a %120 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 244 | %146 = OpAccessChain %_ptr_StorageBuffer_float %s %uint_0 %uint_0 %int_3 %uint_0 %int_2 %int_1 %uint_0 |
| 245 | OpStore %146 %float_5 |
| 246 | OpReturn |
| 247 | OpFunctionEnd |
Ben Clayton | af25bec | 2024-01-15 13:35:27 +0000 | [diff] [blame] | 248 | %f = OpFunction %void None %130 |
James Price | 8753796 | 2022-12-06 18:32:19 +0000 | [diff] [blame] | 249 | %149 = OpLabel |
| 250 | %150 = OpFunctionCall %void %f_1 |
Ben Clayton | 009d129 | 2022-02-04 15:39:34 +0000 | [diff] [blame] | 251 | OpReturn |
| 252 | OpFunctionEnd |