blob: 9687b3e112b57b95dadd96d22b2ba1b8267a5531 [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 34
; Schema: 0
OpCapability Shader
OpCapability ImageQuery
%17 = 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
OpDecorate %texture_load RelaxedPrecision
OpDecorate %t RelaxedPrecision
%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 %4
%uint_1 = OpConstant %uint 1
%uint_0 = OpConstant %uint 0
%v2uint = OpTypeVector %uint 2
%22 = OpConstantComposite %v2uint %uint_1 %uint_1
%24 = OpConstantNull %v2uint
%v4float = OpTypeVector %float 4
%28 = OpTypeFunction %void
%_ptr_UniformConstant_4 = OpTypePointer UniformConstant %4
%do_texture_load = OpFunction %void None %11
%t = OpFunctionParameter %4
%12 = OpLabel
%13 = OpImageQueryLevels %uint %t
%14 = OpISub %uint %13 %uint_1
%16 = OpExtInst %uint %17 UMin %uint_0 %14
%19 = OpImageQuerySizeLod %v2uint %t %16
%21 = OpISub %v2uint %19 %22
%23 = OpExtInst %v2uint %17 UMin %24 %21
%texture_load = OpImageFetch %v4float %t %23 Lod %16
OpReturn
OpFunctionEnd
%fs = OpFunction %void None %28
%29 = OpLabel
%30 = OpAccessChain %_ptr_UniformConstant_4 %sampled_textures %uint_0
%32 = OpLoad %4 %30 None
%33 = OpFunctionCall %void %do_texture_load %32
OpReturn
OpFunctionEnd