blob: c0f36465f083117ad44283b59dce91932fe695f1 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 37
; Schema: 0
OpCapability Shader
OpCapability RuntimeDescriptorArray
OpCapability ImageQuery
OpExtension "SPV_EXT_descriptor_indexing"
%19 = 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 %t "t"
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
%_runtimearr_4 = OpTypeRuntimeArray %4
%_ptr_UniformConstant__runtimearr_4 = OpTypePointer UniformConstant %_runtimearr_4
%sampled_textures = OpVariable %_ptr_UniformConstant__runtimearr_4 UniformConstant
%void = OpTypeVoid
%9 = OpTypeFunction %void %4
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%v2uint = OpTypeVector %uint 2
%23 = OpConstantComposite %v2uint %uint_1 %uint_1
%v2int = OpTypeVector %int 2
%25 = OpConstantNull %v2int
%v4float = OpTypeVector %float 4
%31 = OpTypeFunction %void
%_ptr_UniformConstant_4 = OpTypePointer UniformConstant %4
%do_texture_load = OpFunction %void None %9
%t = OpFunctionParameter %4
%10 = OpLabel
%11 = OpImageQueryLevels %uint %t
%13 = OpISub %uint %11 %uint_1
%15 = OpBitcast %uint %int_0
%18 = OpExtInst %uint %19 UMin %15 %13
%20 = OpImageQuerySizeLod %v2uint %t %18
%22 = OpISub %v2uint %20 %23
%24 = OpBitcast %v2uint %25
%27 = OpExtInst %v2uint %19 UMin %24 %22
%texture_load = OpImageFetch %v4float %t %27 Lod %18
OpReturn
OpFunctionEnd
%fs = OpFunction %void None %31
%32 = OpLabel
%33 = OpAccessChain %_ptr_UniformConstant_4 %sampled_textures %int_0
%35 = OpLoad %4 %33 None
%36 = OpFunctionCall %void %do_texture_load %35
OpReturn
OpFunctionEnd