| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 246 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability RuntimeDescriptorArray |
| OpCapability Sampled1D |
| OpCapability ImageQuery |
| OpExtension "SPV_EXT_descriptor_indexing" |
| %78 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fs "fs" |
| OpExecutionMode %fs OriginUpperLeft |
| OpMemberName %tint_resource_table_metadata_struct_tint_explicit_layout 0 "array_length" |
| OpMemberName %tint_resource_table_metadata_struct_tint_explicit_layout 1 "bindings" |
| OpName %tint_resource_table_metadata_struct_tint_explicit_layout "tint_resource_table_metadata_struct_tint_explicit_layout" |
| OpName %tint_resource_table_metadata "tint_resource_table_metadata" |
| OpName %fs "fs" |
| OpName %tint_storage_metadata_length "tint_storage_metadata_length" |
| OpName %item_idx "item_idx" |
| OpName %tint_storage_metadata_length_0 "tint_storage_metadata_length" |
| OpName %item_idx_0 "item_idx" |
| OpName %tint_storage_metadata_length_1 "tint_storage_metadata_length" |
| OpName %item_idx_1 "item_idx" |
| OpName %t1d "t1d" |
| OpName %tint_storage_metadata_length_2 "tint_storage_metadata_length" |
| OpName %item_idx_2 "item_idx" |
| OpName %tint_storage_metadata_length_3 "tint_storage_metadata_length" |
| OpName %item_idx_3 "item_idx" |
| OpName %tint_storage_metadata_length_4 "tint_storage_metadata_length" |
| OpName %item_idx_4 "item_idx" |
| OpName %t2d "t2d" |
| OpName %tint_storage_metadata_length_5 "tint_storage_metadata_length" |
| OpName %item_idx_5 "item_idx" |
| OpName %tint_storage_metadata_length_6 "tint_storage_metadata_length" |
| OpName %item_idx_6 "item_idx" |
| OpName %tint_storage_metadata_length_7 "tint_storage_metadata_length" |
| OpName %item_idx_7 "item_idx" |
| OpName %tcube "tcube" |
| OpDecorate %1 DescriptorSet 4 |
| OpDecorate %1 Binding 28 |
| OpDecorate %6 DescriptorSet 4 |
| OpDecorate %6 Binding 28 |
| OpDecorate %11 DescriptorSet 4 |
| OpDecorate %11 Binding 28 |
| OpMemberDecorate %tint_resource_table_metadata_struct_tint_explicit_layout 0 Offset 0 |
| OpDecorate %_runtimearr_uint ArrayStride 4 |
| OpMemberDecorate %tint_resource_table_metadata_struct_tint_explicit_layout 1 Offset 4 |
| OpDecorate %tint_resource_table_metadata_struct_tint_explicit_layout Block |
| OpDecorate %tint_resource_table_metadata DescriptorSet 5 |
| OpDecorate %tint_resource_table_metadata Binding 29 |
| OpDecorate %tint_resource_table_metadata NonWritable |
| %float = OpTypeFloat 32 |
| %4 = OpTypeImage %float 1D 0 0 0 1 Unknown |
| %_runtimearr_4 = OpTypeRuntimeArray %4 |
| %_ptr_UniformConstant__runtimearr_4 = OpTypePointer UniformConstant %_runtimearr_4 |
| %1 = OpVariable %_ptr_UniformConstant__runtimearr_4 UniformConstant |
| %int = OpTypeInt 32 1 |
| %9 = OpTypeImage %int 2D 0 0 0 1 Unknown |
| %_runtimearr_9 = OpTypeRuntimeArray %9 |
| %_ptr_UniformConstant__runtimearr_9 = OpTypePointer UniformConstant %_runtimearr_9 |
| %6 = OpVariable %_ptr_UniformConstant__runtimearr_9 UniformConstant |
| %uint = OpTypeInt 32 0 |
| %14 = OpTypeImage %uint 3D 0 0 0 1 Unknown |
| %_runtimearr_14 = OpTypeRuntimeArray %14 |
| %_ptr_UniformConstant__runtimearr_14 = OpTypePointer UniformConstant %_runtimearr_14 |
| %11 = OpVariable %_ptr_UniformConstant__runtimearr_14 UniformConstant |
| %_runtimearr_uint = OpTypeRuntimeArray %uint |
| %tint_resource_table_metadata_struct_tint_explicit_layout = OpTypeStruct %uint %_runtimearr_uint |
| %_ptr_StorageBuffer_tint_resource_table_metadata_struct_tint_explicit_layout = OpTypePointer StorageBuffer %tint_resource_table_metadata_struct_tint_explicit_layout |
| %tint_resource_table_metadata = OpVariable %_ptr_StorageBuffer_tint_resource_table_metadata_struct_tint_explicit_layout StorageBuffer |
| %void = OpTypeVoid |
| %22 = OpTypeFunction %void |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %uint_0 = OpConstant %uint 0 |
| %bool = OpTypeBool |
| %false = OpConstantFalse %bool |
| %_ptr_UniformConstant_4 = OpTypePointer UniformConstant %4 |
| %uint_1 = OpConstant %uint 1 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9 |
| %v2uint = OpTypeVector %uint 2 |
| %136 = OpConstantComposite %v2uint %uint_1 %uint_1 |
| %138 = OpConstantComposite %v2uint %uint_0 %uint_1 |
| %v4int = OpTypeVector %int 4 |
| %uint_2 = OpConstant %uint 2 |
| %_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14 |
| %v3uint = OpTypeVector %uint 3 |
| %194 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 |
| %196 = OpConstantComposite %v3uint %uint_2 %uint_1 %uint_0 |
| %v4uint = OpTypeVector %uint 4 |
| %203 = OpConstantComposite %v2uint %uint_1 %uint_2 |
| %v2bool = OpTypeVector %bool 2 |
| %uint_9 = OpConstant %uint 9 |
| %uint_20 = OpConstant %uint 20 |
| %uint_3 = OpConstant %uint 3 |
| %fs = OpFunction %void None %22 |
| %23 = OpLabel |
| %tint_storage_metadata_length = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %27 = OpLoad %uint %tint_storage_metadata_length None |
| %28 = OpULessThan %bool %uint_0 %27 |
| OpSelectionMerge %30 None |
| OpBranchConditional %28 %31 %32 |
| %31 = OpLabel |
| %199 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_0 |
| %200 = OpLoad %uint %199 None |
| %201 = OpCompositeConstruct %v2uint %200 %200 |
| %202 = OpIEqual %v2bool %201 %203 |
| %34 = OpAny %bool %202 |
| OpBranch %30 |
| %32 = OpLabel |
| OpBranch %30 |
| %30 = OpLabel |
| %33 = OpPhi %bool %34 %31 %false %32 |
| OpSelectionMerge %36 None |
| OpBranchConditional %33 %37 %38 |
| %37 = OpLabel |
| OpBranch %36 |
| %38 = OpLabel |
| %205 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %206 = OpLoad %uint %205 None |
| %40 = OpIAdd %uint %uint_0 %206 |
| OpBranch %36 |
| %36 = OpLabel |
| %item_idx = OpPhi %uint %uint_0 %37 %40 %38 |
| %41 = OpAccessChain %_ptr_UniformConstant_4 %1 %item_idx |
| %43 = OpLoad %4 %41 None |
| %tint_storage_metadata_length_0 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %45 = OpLoad %uint %tint_storage_metadata_length_0 None |
| %46 = OpULessThan %bool %uint_0 %45 |
| OpSelectionMerge %47 None |
| OpBranchConditional %46 %48 %49 |
| %48 = OpLabel |
| %207 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_0 |
| %208 = OpLoad %uint %207 None |
| %209 = OpCompositeConstruct %v2uint %208 %208 |
| %210 = OpIEqual %v2bool %209 %203 |
| %51 = OpAny %bool %210 |
| OpBranch %47 |
| %49 = OpLabel |
| OpBranch %47 |
| %47 = OpLabel |
| %50 = OpPhi %bool %51 %48 %false %49 |
| OpSelectionMerge %52 None |
| OpBranchConditional %50 %53 %54 |
| %53 = OpLabel |
| OpBranch %52 |
| %54 = OpLabel |
| %211 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %212 = OpLoad %uint %211 None |
| %56 = OpIAdd %uint %uint_0 %212 |
| OpBranch %52 |
| %52 = OpLabel |
| %item_idx_0 = OpPhi %uint %uint_0 %53 %56 %54 |
| %57 = OpAccessChain %_ptr_UniformConstant_4 %1 %item_idx_0 |
| %58 = OpLoad %4 %57 None |
| %tint_storage_metadata_length_1 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %60 = OpLoad %uint %tint_storage_metadata_length_1 None |
| %61 = OpULessThan %bool %uint_0 %60 |
| OpSelectionMerge %62 None |
| OpBranchConditional %61 %63 %64 |
| %63 = OpLabel |
| %213 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_0 |
| %214 = OpLoad %uint %213 None |
| %215 = OpCompositeConstruct %v2uint %214 %214 |
| %216 = OpIEqual %v2bool %215 %203 |
| %66 = OpAny %bool %216 |
| OpBranch %62 |
| %64 = OpLabel |
| OpBranch %62 |
| %62 = OpLabel |
| %65 = OpPhi %bool %66 %63 %false %64 |
| OpSelectionMerge %67 None |
| OpBranchConditional %65 %68 %69 |
| %68 = OpLabel |
| OpBranch %67 |
| %69 = OpLabel |
| %217 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %218 = OpLoad %uint %217 None |
| %71 = OpIAdd %uint %uint_0 %218 |
| OpBranch %67 |
| %67 = OpLabel |
| %item_idx_1 = OpPhi %uint %uint_0 %68 %71 %69 |
| %72 = OpAccessChain %_ptr_UniformConstant_4 %1 %item_idx_1 |
| %73 = OpLoad %4 %72 None |
| %74 = OpImageQueryLevels %uint %58 |
| %75 = OpISub %uint %74 %uint_1 |
| %77 = OpExtInst %uint %78 UMin %uint_0 %75 |
| %79 = OpImageQuerySizeLod %uint %73 %77 |
| %80 = OpISub %uint %79 %uint_1 |
| %81 = OpExtInst %uint %78 UMin %uint_0 %80 |
| %t1d = OpImageFetch %v4float %43 %81 Lod %77 |
| %tint_storage_metadata_length_2 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %85 = OpLoad %uint %tint_storage_metadata_length_2 None |
| %86 = OpULessThan %bool %uint_1 %85 |
| OpSelectionMerge %87 None |
| OpBranchConditional %86 %88 %89 |
| %88 = OpLabel |
| %219 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_1 |
| %220 = OpLoad %uint %219 None |
| %91 = OpIEqual %bool %220 %uint_9 |
| OpBranch %87 |
| %89 = OpLabel |
| OpBranch %87 |
| %87 = OpLabel |
| %90 = OpPhi %bool %91 %88 %false %89 |
| OpSelectionMerge %92 None |
| OpBranchConditional %90 %93 %94 |
| %93 = OpLabel |
| OpBranch %92 |
| %94 = OpLabel |
| %222 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %223 = OpLoad %uint %222 None |
| %96 = OpIAdd %uint %uint_2 %223 |
| OpBranch %92 |
| %92 = OpLabel |
| %item_idx_2 = OpPhi %uint %uint_1 %93 %96 %94 |
| %97 = OpAccessChain %_ptr_UniformConstant_9 %6 %item_idx_2 |
| %99 = OpLoad %9 %97 None |
| %tint_storage_metadata_length_3 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %101 = OpLoad %uint %tint_storage_metadata_length_3 None |
| %102 = OpULessThan %bool %uint_1 %101 |
| OpSelectionMerge %103 None |
| OpBranchConditional %102 %104 %105 |
| %104 = OpLabel |
| %224 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_1 |
| %225 = OpLoad %uint %224 None |
| %107 = OpIEqual %bool %225 %uint_9 |
| OpBranch %103 |
| %105 = OpLabel |
| OpBranch %103 |
| %103 = OpLabel |
| %106 = OpPhi %bool %107 %104 %false %105 |
| OpSelectionMerge %108 None |
| OpBranchConditional %106 %109 %110 |
| %109 = OpLabel |
| OpBranch %108 |
| %110 = OpLabel |
| %226 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %227 = OpLoad %uint %226 None |
| %112 = OpIAdd %uint %uint_2 %227 |
| OpBranch %108 |
| %108 = OpLabel |
| %item_idx_3 = OpPhi %uint %uint_1 %109 %112 %110 |
| %113 = OpAccessChain %_ptr_UniformConstant_9 %6 %item_idx_3 |
| %114 = OpLoad %9 %113 None |
| %tint_storage_metadata_length_4 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %116 = OpLoad %uint %tint_storage_metadata_length_4 None |
| %117 = OpULessThan %bool %uint_1 %116 |
| OpSelectionMerge %118 None |
| OpBranchConditional %117 %119 %120 |
| %119 = OpLabel |
| %228 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_1 |
| %229 = OpLoad %uint %228 None |
| %122 = OpIEqual %bool %229 %uint_9 |
| OpBranch %118 |
| %120 = OpLabel |
| OpBranch %118 |
| %118 = OpLabel |
| %121 = OpPhi %bool %122 %119 %false %120 |
| OpSelectionMerge %123 None |
| OpBranchConditional %121 %124 %125 |
| %124 = OpLabel |
| OpBranch %123 |
| %125 = OpLabel |
| %230 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %231 = OpLoad %uint %230 None |
| %127 = OpIAdd %uint %uint_2 %231 |
| OpBranch %123 |
| %123 = OpLabel |
| %item_idx_4 = OpPhi %uint %uint_1 %124 %127 %125 |
| %128 = OpAccessChain %_ptr_UniformConstant_9 %6 %item_idx_4 |
| %129 = OpLoad %9 %128 None |
| %130 = OpImageQueryLevels %uint %114 |
| %131 = OpISub %uint %130 %uint_1 |
| %132 = OpExtInst %uint %78 UMin %uint_0 %131 |
| %133 = OpImageQuerySizeLod %v2uint %129 %132 |
| %135 = OpISub %v2uint %133 %136 |
| %137 = OpExtInst %v2uint %78 UMin %138 %135 |
| %t2d = OpImageFetch %v4int %99 %137 Lod %132 |
| %tint_storage_metadata_length_5 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %142 = OpLoad %uint %tint_storage_metadata_length_5 None |
| %143 = OpULessThan %bool %uint_2 %142 |
| OpSelectionMerge %145 None |
| OpBranchConditional %143 %146 %147 |
| %146 = OpLabel |
| %232 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_2 |
| %233 = OpLoad %uint %232 None |
| %149 = OpIEqual %bool %233 %uint_20 |
| OpBranch %145 |
| %147 = OpLabel |
| OpBranch %145 |
| %145 = OpLabel |
| %148 = OpPhi %bool %149 %146 %false %147 |
| OpSelectionMerge %150 None |
| OpBranchConditional %148 %151 %152 |
| %151 = OpLabel |
| OpBranch %150 |
| %152 = OpLabel |
| %235 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %236 = OpLoad %uint %235 None |
| %154 = OpIAdd %uint %uint_3 %236 |
| OpBranch %150 |
| %150 = OpLabel |
| %item_idx_5 = OpPhi %uint %uint_2 %151 %154 %152 |
| %155 = OpAccessChain %_ptr_UniformConstant_14 %11 %item_idx_5 |
| %157 = OpLoad %14 %155 None |
| %tint_storage_metadata_length_6 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %159 = OpLoad %uint %tint_storage_metadata_length_6 None |
| %160 = OpULessThan %bool %uint_2 %159 |
| OpSelectionMerge %161 None |
| OpBranchConditional %160 %162 %163 |
| %162 = OpLabel |
| %238 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_2 |
| %239 = OpLoad %uint %238 None |
| %165 = OpIEqual %bool %239 %uint_20 |
| OpBranch %161 |
| %163 = OpLabel |
| OpBranch %161 |
| %161 = OpLabel |
| %164 = OpPhi %bool %165 %162 %false %163 |
| OpSelectionMerge %166 None |
| OpBranchConditional %164 %167 %168 |
| %167 = OpLabel |
| OpBranch %166 |
| %168 = OpLabel |
| %240 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %241 = OpLoad %uint %240 None |
| %170 = OpIAdd %uint %uint_3 %241 |
| OpBranch %166 |
| %166 = OpLabel |
| %item_idx_6 = OpPhi %uint %uint_2 %167 %170 %168 |
| %171 = OpAccessChain %_ptr_UniformConstant_14 %11 %item_idx_6 |
| %172 = OpLoad %14 %171 None |
| %tint_storage_metadata_length_7 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %174 = OpLoad %uint %tint_storage_metadata_length_7 None |
| %175 = OpULessThan %bool %uint_2 %174 |
| OpSelectionMerge %176 None |
| OpBranchConditional %175 %177 %178 |
| %177 = OpLabel |
| %242 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_1 %uint_2 |
| %243 = OpLoad %uint %242 None |
| %180 = OpIEqual %bool %243 %uint_20 |
| OpBranch %176 |
| %178 = OpLabel |
| OpBranch %176 |
| %176 = OpLabel |
| %179 = OpPhi %bool %180 %177 %false %178 |
| OpSelectionMerge %181 None |
| OpBranchConditional %179 %182 %183 |
| %182 = OpLabel |
| OpBranch %181 |
| %183 = OpLabel |
| %244 = OpAccessChain %_ptr_StorageBuffer_uint %tint_resource_table_metadata %uint_0 |
| %245 = OpLoad %uint %244 None |
| %185 = OpIAdd %uint %uint_3 %245 |
| OpBranch %181 |
| %181 = OpLabel |
| %item_idx_7 = OpPhi %uint %uint_2 %182 %185 %183 |
| %186 = OpAccessChain %_ptr_UniformConstant_14 %11 %item_idx_7 |
| %187 = OpLoad %14 %186 None |
| %188 = OpImageQueryLevels %uint %172 |
| %189 = OpISub %uint %188 %uint_1 |
| %190 = OpExtInst %uint %78 UMin %uint_0 %189 |
| %191 = OpImageQuerySizeLod %v3uint %187 %190 |
| %193 = OpISub %v3uint %191 %194 |
| %195 = OpExtInst %v3uint %78 UMin %196 %193 |
| %tcube = OpImageFetch %v4uint %157 %195 Lod %190 |
| OpReturn |
| OpFunctionEnd |