| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 64 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability RuntimeDescriptorArray |
| OpCapability ImageQuery |
| OpExtension "SPV_EXT_descriptor_indexing" |
| %48 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fs "fs" |
| OpExecutionMode %fs OriginUpperLeft |
| OpMemberName %index_block 0 "inner" |
| OpName %index_block "index_block" |
| OpMemberName %tint_resource_binding_buffer_tint_explicit_layout 0 "array_length" |
| OpMemberName %tint_resource_binding_buffer_tint_explicit_layout 1 "bindings" |
| OpName %tint_resource_binding_buffer_tint_explicit_layout "tint_resource_binding_buffer_tint_explicit_layout" |
| OpName %fs "fs" |
| OpName %texture_load "texture_load" |
| OpMemberDecorate %index_block 0 Offset 0 |
| OpDecorate %index_block Block |
| OpDecorate %1 DescriptorSet 1 |
| OpDecorate %1 Binding 0 |
| OpDecorate %1 NonWritable |
| OpDecorate %5 DescriptorSet 0 |
| OpDecorate %5 Binding 0 |
| OpMemberDecorate %tint_resource_binding_buffer_tint_explicit_layout 0 Offset 0 |
| OpDecorate %_runtimearr_uint ArrayStride 4 |
| OpMemberDecorate %tint_resource_binding_buffer_tint_explicit_layout 1 Offset 4 |
| OpDecorate %tint_resource_binding_buffer_tint_explicit_layout Block |
| OpDecorate %10 DescriptorSet 1 |
| OpDecorate %10 Binding 0 |
| OpDecorate %10 NonWritable |
| %uint = OpTypeInt 32 0 |
| %index_block = OpTypeStruct %uint |
| %_ptr_Uniform_index_block = OpTypePointer Uniform %index_block |
| %1 = OpVariable %_ptr_Uniform_index_block Uniform |
| %float = OpTypeFloat 32 |
| %8 = OpTypeImage %float 3D 0 0 0 1 Unknown |
| %_runtimearr_8 = OpTypeRuntimeArray %8 |
| %_ptr_UniformConstant__runtimearr_8 = OpTypePointer UniformConstant %_runtimearr_8 |
| %5 = OpVariable %_ptr_UniformConstant__runtimearr_8 UniformConstant |
| %_runtimearr_uint = OpTypeRuntimeArray %uint |
| %tint_resource_binding_buffer_tint_explicit_layout = OpTypeStruct %uint %_runtimearr_uint |
| %_ptr_StorageBuffer_tint_resource_binding_buffer_tint_explicit_layout = OpTypePointer StorageBuffer %tint_resource_binding_buffer_tint_explicit_layout |
| %10 = OpVariable %_ptr_StorageBuffer_tint_resource_binding_buffer_tint_explicit_layout StorageBuffer |
| %void = OpTypeVoid |
| %16 = OpTypeFunction %void |
| %_ptr_Uniform_uint = OpTypePointer Uniform %uint |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint |
| %bool = OpTypeBool |
| %false = OpConstantFalse %bool |
| %_ptr_UniformConstant_8 = OpTypePointer UniformConstant %8 |
| %uint_1 = OpConstant %uint 1 |
| %int = OpTypeInt 32 1 |
| %int_0 = OpConstant %int 0 |
| %v3uint = OpTypeVector %uint 3 |
| %52 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 |
| %v3int = OpTypeVector %int 3 |
| %54 = OpConstantNull %v3int |
| %v4float = OpTypeVector %float 4 |
| %uint_10 = OpConstant %uint 10 |
| %fs = OpFunction %void None %16 |
| %17 = OpLabel |
| %18 = OpAccessChain %_ptr_Uniform_uint %1 %uint_0 |
| %21 = OpLoad %uint %18 None |
| %22 = OpAccessChain %_ptr_StorageBuffer_uint %10 %uint_0 |
| %24 = OpLoad %uint %22 None |
| %25 = OpULessThan %bool %21 %24 |
| OpSelectionMerge %27 None |
| OpBranchConditional %25 %28 %29 |
| %28 = OpLabel |
| %59 = OpAccessChain %_ptr_StorageBuffer_uint %10 %uint_1 %21 |
| %60 = OpLoad %uint %59 None |
| %31 = OpIEqual %bool %60 %uint_10 |
| OpBranch %27 |
| %29 = OpLabel |
| OpBranch %27 |
| %27 = OpLabel |
| %30 = OpPhi %bool %31 %28 %false %29 |
| OpSelectionMerge %33 None |
| OpBranchConditional %30 %34 %35 |
| %34 = OpLabel |
| OpBranch %33 |
| %35 = OpLabel |
| %62 = OpAccessChain %_ptr_StorageBuffer_uint %10 %uint_0 |
| %63 = OpLoad %uint %62 None |
| %37 = OpIAdd %uint %uint_0 %63 |
| OpBranch %33 |
| %33 = OpLabel |
| %36 = OpPhi %uint %21 %34 %37 %35 |
| %38 = OpAccessChain %_ptr_UniformConstant_8 %5 %36 |
| %40 = OpLoad %8 %38 None |
| %41 = OpImageQueryLevels %uint %40 |
| %42 = OpISub %uint %41 %uint_1 |
| %44 = OpBitcast %uint %int_0 |
| %47 = OpExtInst %uint %48 UMin %44 %42 |
| %49 = OpImageQuerySizeLod %v3uint %40 %47 |
| %51 = OpISub %v3uint %49 %52 |
| %53 = OpBitcast %v3uint %54 |
| %56 = OpExtInst %v3uint %48 UMin %53 %51 |
| %texture_load = OpImageFetch %v4float %40 %56 Lod %47 |
| OpReturn |
| OpFunctionEnd |