blob: e2c4aeb2d4fdbdd59ee31a947b34407c960ab0d7 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 34
; Schema: 0
OpCapability Shader
OpCapability ImageQuery
%23 = 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
%27 = OpConstantComposite %v2uint %uint_1 %uint_1
%v2int = OpTypeVector %int 2
%29 = OpConstantNull %v2int
%v4float = OpTypeVector %float 4
%fs = OpFunction %void None %10
%11 = OpLabel
%14 = OpBitcast %uint %int_0
%12 = OpAccessChain %_ptr_UniformConstant_4 %sampled_textures %14
%17 = OpLoad %4 %12 None
%18 = OpImageQueryLevels %uint %17
%19 = OpISub %uint %18 %uint_1
%21 = OpBitcast %uint %int_0
%22 = OpExtInst %uint %23 UMin %21 %19
%24 = OpImageQuerySizeLod %v2uint %17 %22
%26 = OpISub %v2uint %24 %27
%28 = OpBitcast %v2uint %29
%31 = OpExtInst %v2uint %23 UMin %28 %26
%texture_load = OpImageFetch %v4float %17 %31 Lod %22
OpReturn
OpFunctionEnd