| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 33 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability ImageQuery |
| %22 = 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 |
| %uint = OpTypeInt 32 0 |
| %uint_4 = OpConstant %uint 4 |
| %_arr_4_uint_4 = OpTypeArray %4 %uint_4 |
| %_ptr_UniformConstant__arr_4_uint_4 = OpTypePointer UniformConstant %_arr_4_uint_4 |
| %sampled_textures = OpVariable %_ptr_UniformConstant__arr_4_uint_4 UniformConstant |
| %void = OpTypeVoid |
| %10 = OpTypeFunction %void |
| %_ptr_UniformConstant_4 = OpTypePointer UniformConstant %4 |
| %int = OpTypeInt 32 1 |
| %int_0 = OpConstant %int 0 |
| %uint_1 = OpConstant %uint 1 |
| %v2uint = OpTypeVector %uint 2 |
| %26 = OpConstantComposite %v2uint %uint_1 %uint_1 |
| %v2int = OpTypeVector %int 2 |
| %28 = OpConstantNull %v2int |
| %v4float = OpTypeVector %float 4 |
| %fs = OpFunction %void None %10 |
| %11 = OpLabel |
| %12 = OpAccessChain %_ptr_UniformConstant_4 %sampled_textures %int_0 |
| %16 = OpLoad %4 %12 None |
| %17 = OpImageQueryLevels %uint %16 |
| %18 = OpISub %uint %17 %uint_1 |
| %20 = OpBitcast %uint %int_0 |
| %21 = OpExtInst %uint %22 UMin %20 %18 |
| %23 = OpImageQuerySizeLod %v2uint %16 %21 |
| %25 = OpISub %v2uint %23 %26 |
| %27 = OpBitcast %v2uint %28 |
| %30 = OpExtInst %v2uint %22 UMin %27 %25 |
| %texture_load = OpImageFetch %v4float %16 %30 Lod %21 |
| OpReturn |
| OpFunctionEnd |