| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 10 |
| 4 |
; Bound: 53 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
OpCapability ShaderNonUniform |
| 8 |
OpCapability RuntimeDescriptorArray |
| 9 |
OpCapability SampledImageArrayNonUniformIndexing |
| 10 |
OpExtension "SPV_EXT_descriptor_indexing" |
| 11 |
%1 = OpExtInstImport "GLSL.std.450" |
| 12 |
OpMemoryModel Logical GLSL450 |
| 13 |
OpEntryPoint Fragment %main "main" %FragColor %vUV %gl_FragCoord |
| 14 |
OpExecutionMode %main OriginUpperLeft |
| 15 |
OpSource GLSL 450 |
| 16 |
OpSourceExtension "GL_EXT_nonuniform_qualifier" |
| 17 |
OpName %main "main" |
| 18 |
OpName %FragColor "FragColor" |
| 19 |
OpName %uSamplers "uSamplers" |
| 20 |
OpName %SSBO "SSBO" |
| 21 |
OpMemberName %SSBO 0 "indices" |
| 22 |
OpName %_ "" |
| 23 |
OpName %vUV "vUV" |
| 24 |
OpName %uSampler "uSampler" |
| 25 |
OpName %gl_FragCoord "gl_FragCoord" |
| 26 |
OpDecorate %FragColor Location 0 |
| 27 |
OpDecorate %uSamplers DescriptorSet 0 |
| 28 |
OpDecorate %uSamplers Binding 0 |
| 29 |
OpDecorate %_runtimearr_uint ArrayStride 4 |
| 30 |
OpMemberDecorate %SSBO 0 NonWritable |
| 31 |
OpMemberDecorate %SSBO 0 Offset 0 |
| 32 |
OpDecorate %SSBO BufferBlock |
| 33 |
OpDecorate %_ DescriptorSet 0 |
| 34 |
OpDecorate %_ Binding 0 |
| 35 |
OpDecorate %26 NonUniform |
| 36 |
OpDecorate %28 NonUniform |
| 37 |
OpDecorate %29 NonUniform |
| 38 |
OpDecorate %vUV Location 0 |
| 39 |
OpDecorate %uSampler DescriptorSet 1 |
| 40 |
OpDecorate %uSampler Binding 0 |
| 41 |
OpDecorate %38 NonUniform |
| 42 |
OpDecorate %gl_FragCoord BuiltIn FragCoord |
| 43 |
%void = OpTypeVoid |
| 44 |
%3 = OpTypeFunction %void |
| 45 |
%float = OpTypeFloat 32 |
| 46 |
%v4float = OpTypeVector %float 4 |
| 47 |
%_ptr_Output_v4float = OpTypePointer Output %v4float |
| 48 |
%FragColor = OpVariable %_ptr_Output_v4float Output |
| 49 |
%10 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| 50 |
%11 = OpTypeSampledImage %10 |
| 51 |
%_runtimearr_11 = OpTypeRuntimeArray %11 |
| 52 |
%_ptr_UniformConstant__runtimearr_11 = OpTypePointer UniformConstant %_runtimearr_11 |
| 53 |
%uSamplers = OpVariable %_ptr_UniformConstant__runtimearr_11 UniformConstant |
| 54 |
%uint = OpTypeInt 32 0 |
| 55 |
%_runtimearr_uint = OpTypeRuntimeArray %uint |
| 56 |
%SSBO = OpTypeStruct %_runtimearr_uint |
| 57 |
%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO |
| 58 |
%_ = OpVariable %_ptr_Uniform_SSBO Uniform |
| 59 |
%int = OpTypeInt 32 1 |
| 60 |
%int_0 = OpConstant %int 0 |
| 61 |
%int_10 = OpConstant %int 10 |
| 62 |
%_ptr_Uniform_uint = OpTypePointer Uniform %uint |
| 63 |
%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11 |
| 64 |
%v2float = OpTypeVector %float 2 |
| 65 |
%_ptr_Input_v2float = OpTypePointer Input %v2float |
| 66 |
%vUV = OpVariable %_ptr_Input_v2float Input |
| 67 |
%float_0 = OpConstant %float 0 |
| 68 |
%uSampler = OpVariable %_ptr_UniformConstant_11 UniformConstant |
| 69 |
%_ptr_Input_v4float = OpTypePointer Input %v4float |
| 70 |
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input |
| 71 |
%uint_1 = OpConstant %uint 1 |
| 72 |
%_ptr_Input_float = OpTypePointer Input %float |
| 73 |
%main = OpFunction %void None %3 |
| 74 |
%5 = OpLabel |
| 75 |
%24 = OpAccessChain %_ptr_Uniform_uint %_ %int_0 %int_10 |
| 76 |
%26 = OpLoad %uint %24 |
| 77 |
%28 = OpAccessChain %_ptr_UniformConstant_11 %uSamplers %26 |
| 78 |
%29 = OpLoad %11 %28 |
| 79 |
%33 = OpLoad %v2float %vUV |
| 80 |
%35 = OpImageSampleExplicitLod %v4float %29 %33 Lod %float_0 |
| 81 |
OpStore %FragColor %35 |
| 82 |
%37 = OpLoad %11 %uSampler |
| 83 |
%38 = OpCopyObject %11 %37 |
| 84 |
%39 = OpLoad %v2float %vUV |
| 85 |
%44 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1 |
| 86 |
%45 = OpLoad %float %44 |
| 87 |
%46 = OpConvertFToS %int %45 |
| 88 |
%47 = OpAccessChain %_ptr_Uniform_uint %_ %int_0 %46 |
| 89 |
%48 = OpLoad %uint %47 |
| 90 |
%49 = OpConvertUToF %float %48 |
| 91 |
%50 = OpImageSampleExplicitLod %v4float %38 %39 Lod %49 |
| 92 |
%51 = OpLoad %v4float %FragColor |
| 93 |
%52 = OpFAdd %v4float %51 %50 |
| 94 |
OpStore %FragColor %52 |
| 95 |
OpReturn |
| 96 |
OpFunctionEnd |