| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 137 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability RuntimeDescriptorArray |
| OpCapability Sampled1D |
| OpCapability ImageQuery |
| OpExtension "SPV_EXT_descriptor_indexing" |
| %52 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fs "fs" |
| OpExecutionMode %fs OriginUpperLeft |
| 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 %t1d "t1d" |
| OpName %t2d "t2d" |
| OpName %tcube "tcube" |
| OpDecorate %1 DescriptorSet 0 |
| OpDecorate %1 Binding 0 |
| OpDecorate %6 DescriptorSet 0 |
| OpDecorate %6 Binding 0 |
| OpDecorate %11 DescriptorSet 0 |
| OpDecorate %11 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 %16 DescriptorSet 1 |
| OpDecorate %16 Binding 0 |
| OpDecorate %16 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_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 |
| %16 = OpVariable %_ptr_StorageBuffer_tint_resource_binding_buffer_tint_explicit_layout StorageBuffer |
| %void = OpTypeVoid |
| %22 = OpTypeFunction %void |
| %int_2 = OpConstant %int 2 |
| %_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 |
| %int_0 = OpConstant %int 0 |
| %v4float = OpTypeVector %float 4 |
| %int_1 = OpConstant %int 1 |
| %_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9 |
| %v2uint = OpTypeVector %uint 2 |
| %84 = OpConstantComposite %v2uint %uint_1 %uint_1 |
| %v2int = OpTypeVector %int 2 |
| %86 = OpConstantComposite %v2int %int_0 %int_1 |
| %v4int = OpTypeVector %int 4 |
| %_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14 |
| %v3uint = OpTypeVector %uint 3 |
| %115 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 |
| %v3int = OpTypeVector %int 3 |
| %117 = OpConstantComposite %v3int %int_2 %int_1 %int_0 |
| %v4uint = OpTypeVector %uint 4 |
| %uint_5 = OpConstant %uint 5 |
| %uint_12 = OpConstant %uint 12 |
| %uint_2 = OpConstant %uint 2 |
| %fs = OpFunction %void None %22 |
| %23 = OpLabel |
| %24 = OpBitcast %uint %int_2 |
| %26 = OpAccessChain %_ptr_StorageBuffer_uint %16 %uint_0 |
| %29 = OpLoad %uint %26 None |
| %30 = OpULessThan %bool %24 %29 |
| OpSelectionMerge %32 None |
| OpBranchConditional %30 %33 %34 |
| %33 = OpLabel |
| %122 = OpAccessChain %_ptr_StorageBuffer_uint %16 %uint_1 %24 |
| %123 = OpLoad %uint %122 None |
| %36 = OpIEqual %bool %123 %uint_1 |
| OpBranch %32 |
| %34 = OpLabel |
| OpBranch %32 |
| %32 = OpLabel |
| %35 = OpPhi %bool %36 %33 %false %34 |
| OpSelectionMerge %38 None |
| OpBranchConditional %35 %39 %40 |
| %39 = OpLabel |
| OpBranch %38 |
| %40 = OpLabel |
| %124 = OpAccessChain %_ptr_StorageBuffer_uint %16 %uint_0 |
| %125 = OpLoad %uint %124 None |
| %42 = OpIAdd %uint %uint_0 %125 |
| OpBranch %38 |
| %38 = OpLabel |
| %41 = OpPhi %uint %24 %39 %42 %40 |
| %43 = OpAccessChain %_ptr_UniformConstant_4 %1 %41 |
| %45 = OpLoad %4 %43 None |
| %46 = OpImageQueryLevels %uint %45 |
| %47 = OpISub %uint %46 %uint_1 |
| %49 = OpBitcast %uint %int_0 |
| %51 = OpExtInst %uint %52 UMin %49 %47 |
| %53 = OpImageQuerySizeLod %uint %45 %51 |
| %54 = OpISub %uint %53 %uint_1 |
| %55 = OpBitcast %uint %int_0 |
| %56 = OpExtInst %uint %52 UMin %55 %54 |
| %t1d = OpImageFetch %v4float %45 %56 Lod %51 |
| %59 = OpBitcast %uint %int_1 |
| %61 = OpAccessChain %_ptr_StorageBuffer_uint %16 %uint_0 |
| %62 = OpLoad %uint %61 None |
| %63 = OpULessThan %bool %59 %62 |
| OpSelectionMerge %64 None |
| OpBranchConditional %63 %65 %66 |
| %65 = OpLabel |
| %126 = OpAccessChain %_ptr_StorageBuffer_uint %16 %uint_1 %59 |
| %127 = OpLoad %uint %126 None |
| %68 = OpIEqual %bool %127 %uint_5 |
| OpBranch %64 |
| %66 = OpLabel |
| OpBranch %64 |
| %64 = OpLabel |
| %67 = OpPhi %bool %68 %65 %false %66 |
| OpSelectionMerge %69 None |
| OpBranchConditional %67 %70 %71 |
| %70 = OpLabel |
| OpBranch %69 |
| %71 = OpLabel |
| %129 = OpAccessChain %_ptr_StorageBuffer_uint %16 %uint_0 |
| %130 = OpLoad %uint %129 None |
| %73 = OpIAdd %uint %uint_1 %130 |
| OpBranch %69 |
| %69 = OpLabel |
| %72 = OpPhi %uint %59 %70 %73 %71 |
| %74 = OpAccessChain %_ptr_UniformConstant_9 %6 %72 |
| %76 = OpLoad %9 %74 None |
| %77 = OpImageQueryLevels %uint %76 |
| %78 = OpISub %uint %77 %uint_1 |
| %79 = OpBitcast %uint %int_0 |
| %80 = OpExtInst %uint %52 UMin %79 %78 |
| %81 = OpImageQuerySizeLod %v2uint %76 %80 |
| %83 = OpISub %v2uint %81 %84 |
| %85 = OpBitcast %v2uint %86 |
| %88 = OpExtInst %v2uint %52 UMin %85 %83 |
| %t2d = OpImageFetch %v4int %76 %88 Lod %80 |
| %91 = OpBitcast %uint %int_1 |
| %92 = OpAccessChain %_ptr_StorageBuffer_uint %16 %uint_0 |
| %93 = OpLoad %uint %92 None |
| %94 = OpULessThan %bool %91 %93 |
| OpSelectionMerge %95 None |
| OpBranchConditional %94 %96 %97 |
| %96 = OpLabel |
| %131 = OpAccessChain %_ptr_StorageBuffer_uint %16 %uint_1 %91 |
| %132 = OpLoad %uint %131 None |
| %99 = OpIEqual %bool %132 %uint_12 |
| OpBranch %95 |
| %97 = OpLabel |
| OpBranch %95 |
| %95 = OpLabel |
| %98 = OpPhi %bool %99 %96 %false %97 |
| OpSelectionMerge %100 None |
| OpBranchConditional %98 %101 %102 |
| %101 = OpLabel |
| OpBranch %100 |
| %102 = OpLabel |
| %134 = OpAccessChain %_ptr_StorageBuffer_uint %16 %uint_0 |
| %135 = OpLoad %uint %134 None |
| %104 = OpIAdd %uint %uint_2 %135 |
| OpBranch %100 |
| %100 = OpLabel |
| %103 = OpPhi %uint %91 %101 %104 %102 |
| %105 = OpAccessChain %_ptr_UniformConstant_14 %11 %103 |
| %107 = OpLoad %14 %105 None |
| %108 = OpImageQueryLevels %uint %107 |
| %109 = OpISub %uint %108 %uint_1 |
| %110 = OpBitcast %uint %int_0 |
| %111 = OpExtInst %uint %52 UMin %110 %109 |
| %112 = OpImageQuerySizeLod %v3uint %107 %111 |
| %114 = OpISub %v3uint %112 %115 |
| %116 = OpBitcast %v3uint %117 |
| %119 = OpExtInst %v3uint %52 UMin %116 %114 |
| %tcube = OpImageFetch %v4uint %107 %119 Lod %111 |
| OpReturn |
| OpFunctionEnd |