| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 32 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability RuntimeDescriptorArray |
| OpCapability ImageQuery |
| OpExtension "SPV_EXT_descriptor_indexing" |
| %21 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fs "fs" |
| OpExecutionMode %fs OriginUpperLeft |
| OpName %sampled_textures "sampled_textures" |
| OpName %fs "fs" |
| OpName %texture_load "texture_load" |
| OpDecorate %sampled_textures DescriptorSet 0 |
| OpDecorate %sampled_textures Binding 0 |
| %float = OpTypeFloat 32 |
| %4 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| %_runtimearr_4 = OpTypeRuntimeArray %4 |
| %_ptr_UniformConstant__runtimearr_4 = OpTypePointer UniformConstant %_runtimearr_4 |
| %sampled_textures = OpVariable %_ptr_UniformConstant__runtimearr_4 UniformConstant |
| %void = OpTypeVoid |
| %8 = OpTypeFunction %void |
| %_ptr_UniformConstant_4 = OpTypePointer UniformConstant %4 |
| %int = OpTypeInt 32 1 |
| %int_0 = OpConstant %int 0 |
| %uint = OpTypeInt 32 0 |
| %uint_1 = OpConstant %uint 1 |
| %v2uint = OpTypeVector %uint 2 |
| %25 = OpConstantComposite %v2uint %uint_1 %uint_1 |
| %v2int = OpTypeVector %int 2 |
| %27 = OpConstantNull %v2int |
| %v4float = OpTypeVector %float 4 |
| %fs = OpFunction %void None %8 |
| %9 = OpLabel |
| %10 = OpAccessChain %_ptr_UniformConstant_4 %sampled_textures %int_0 |
| %14 = OpLoad %4 %10 None |
| %15 = OpImageQueryLevels %uint %14 |
| %17 = OpISub %uint %15 %uint_1 |
| %19 = OpBitcast %uint %int_0 |
| %20 = OpExtInst %uint %21 UMin %19 %17 |
| %22 = OpImageQuerySizeLod %v2uint %14 %20 |
| %24 = OpISub %v2uint %22 %25 |
| %26 = OpBitcast %v2uint %27 |
| %29 = OpExtInst %v2uint %21 UMin %26 %24 |
| %texture_load = OpImageFetch %v4float %14 %29 Lod %20 |
| OpReturn |
| OpFunctionEnd |