blob: 64c392fec977dad134cc533800f62d6ab253584f [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 39
; Schema: 0
OpCapability Shader
OpCapability RuntimeDescriptorArray
OpCapability ImageQuery
OpExtension "SPV_EXT_descriptor_indexing"
%28 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %fs "fs"
OpExecutionMode %fs OriginUpperLeft
OpMemberName %index_block 0 "inner"
OpName %index_block "index_block"
OpName %sampled_textures "sampled_textures"
OpName %fs "fs"
OpName %texture_load "texture_load"
OpMemberDecorate %index_block 0 Offset 0
OpDecorate %index_block Block
OpDecorate %1 DescriptorSet 1
OpDecorate %1 Binding 0
OpDecorate %1 NonWritable
OpDecorate %sampled_textures DescriptorSet 0
OpDecorate %sampled_textures Binding 0
%uint = OpTypeInt 32 0
%index_block = OpTypeStruct %uint
%_ptr_Uniform_index_block = OpTypePointer Uniform %index_block
%1 = OpVariable %_ptr_Uniform_index_block Uniform
%float = OpTypeFloat 32
%8 = OpTypeImage %float 2D 0 0 0 1 Unknown
%_runtimearr_8 = OpTypeRuntimeArray %8
%_ptr_UniformConstant__runtimearr_8 = OpTypePointer UniformConstant %_runtimearr_8
%sampled_textures = OpVariable %_ptr_UniformConstant__runtimearr_8 UniformConstant
%void = OpTypeVoid
%12 = OpTypeFunction %void
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
%uint_0 = OpConstant %uint 0
%_ptr_UniformConstant_8 = OpTypePointer UniformConstant %8
%uint_1 = OpConstant %uint 1
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%v2uint = OpTypeVector %uint 2
%32 = OpConstantComposite %v2uint %uint_1 %uint_1
%v2int = OpTypeVector %int 2
%34 = OpConstantNull %v2int
%v4float = OpTypeVector %float 4
%fs = OpFunction %void None %12
%13 = OpLabel
%14 = OpAccessChain %_ptr_Uniform_uint %1 %uint_0
%17 = OpLoad %uint %14 None
%18 = OpAccessChain %_ptr_UniformConstant_8 %sampled_textures %17
%20 = OpLoad %8 %18 None
%21 = OpImageQueryLevels %uint %20
%22 = OpISub %uint %21 %uint_1
%24 = OpBitcast %uint %int_0
%27 = OpExtInst %uint %28 UMin %24 %22
%29 = OpImageQuerySizeLod %v2uint %20 %27
%31 = OpISub %v2uint %29 %32
%33 = OpBitcast %v2uint %34
%36 = OpExtInst %v2uint %28 UMin %33 %31
%texture_load = OpImageFetch %v4float %20 %36 Lod %27
OpReturn
OpFunctionEnd