| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 33 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability ImageQuery |
| %18 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %fs "fs" |
| OpExecutionMode %fs OriginUpperLeft |
| OpName %sampled_textures "sampled_textures" |
| OpName %do_texture_load "do_texture_load" |
| OpName %ts "ts" |
| OpName %texture_load "texture_load" |
| OpName %fs "fs" |
| 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 |
| %11 = OpTypeFunction %void %_arr_4_uint_4 |
| %uint_1 = OpConstant %uint 1 |
| %uint_0 = OpConstant %uint 0 |
| %v2uint = OpTypeVector %uint 2 |
| %23 = OpConstantComposite %v2uint %uint_1 %uint_1 |
| %25 = OpConstantNull %v2uint |
| %v4float = OpTypeVector %float 4 |
| %29 = OpTypeFunction %void |
| %do_texture_load = OpFunction %void None %11 |
| %ts = OpFunctionParameter %_arr_4_uint_4 |
| %12 = OpLabel |
| %13 = OpCompositeExtract %4 %ts 0 |
| %14 = OpImageQueryLevels %uint %13 |
| %15 = OpISub %uint %14 %uint_1 |
| %17 = OpExtInst %uint %18 UMin %uint_0 %15 |
| %20 = OpImageQuerySizeLod %v2uint %13 %17 |
| %22 = OpISub %v2uint %20 %23 |
| %24 = OpExtInst %v2uint %18 UMin %25 %22 |
| %texture_load = OpImageFetch %v4float %13 %24 Lod %17 |
| OpReturn |
| OpFunctionEnd |
| %fs = OpFunction %void None %29 |
| %30 = OpLabel |
| %31 = OpLoad %_arr_4_uint_4 %sampled_textures None |
| %32 = OpFunctionCall %void %do_texture_load %31 |
| OpReturn |
| OpFunctionEnd |