| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 6 |
| 4 |
; Bound: 63 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
%1 = OpExtInstImport "GLSL.std.450" |
| 8 |
OpMemoryModel Logical GLSL450 |
| 9 |
OpEntryPoint Fragment %main "main" %FragColor |
| 10 |
OpExecutionMode %main OriginUpperLeft |
| 11 |
OpSource GLSL 450 |
| 12 |
OpName %main "main" |
| 13 |
OpName %sample_from_func_s21_4__ "sample_from_func(s21[4];" |
| 14 |
OpName %uSampler "uSampler" |
| 15 |
OpName %sample_one_from_func_s21_ "sample_one_from_func(s21;" |
| 16 |
OpName %uSampler_0 "uSampler" |
| 17 |
OpName %Registers "Registers" |
| 18 |
OpMemberName %Registers 0 "index" |
| 19 |
OpName %registers "registers" |
| 20 |
OpName %FragColor "FragColor" |
| 21 |
OpName %uSampler_1 "uSampler" |
| 22 |
OpMemberDecorate %Registers 0 Offset 0 |
| 23 |
OpDecorate %Registers Block |
| 24 |
OpDecorate %FragColor Location 0 |
| 25 |
OpDecorate %uSampler_1 DescriptorSet 0 |
| 26 |
OpDecorate %uSampler_1 Binding 0 |
| 27 |
%void = OpTypeVoid |
| 28 |
%3 = OpTypeFunction %void |
| 29 |
%float = OpTypeFloat 32 |
| 30 |
%7 = OpTypeImage %float 2D 0 0 0 1 Unknown |
| 31 |
%uint = OpTypeInt 32 0 |
| 32 |
%uint_4 = OpConstant %uint 4 |
| 33 |
%_arr_8_uint_4 = OpTypeArray %7 %uint_4 |
| 34 |
%_ptr_UniformConstant__arr_8_uint_4 = OpTypePointer UniformConstant %_arr_8_uint_4 |
| 35 |
%v4float = OpTypeVector %float 4 |
| 36 |
%14 = OpTypeFunction %v4float %_ptr_UniformConstant__arr_8_uint_4 |
| 37 |
%_ptr_UniformConstant_8 = OpTypePointer UniformConstant %7 |
| 38 |
%19 = OpTypeFunction %v4float %_ptr_UniformConstant_8 |
| 39 |
%int = OpTypeInt 32 1 |
| 40 |
%Registers = OpTypeStruct %int |
| 41 |
%_ptr_PushConstant_Registers = OpTypePointer PushConstant %Registers |
| 42 |
%registers = OpVariable %_ptr_PushConstant_Registers PushConstant |
| 43 |
%int_0 = OpConstant %int 0 |
| 44 |
%_ptr_PushConstant_int = OpTypePointer PushConstant %int |
| 45 |
%v2int = OpTypeVector %int 2 |
| 46 |
%int_4 = OpConstant %int 4 |
| 47 |
%35 = OpConstantComposite %v2int %int_4 %int_4 |
| 48 |
%_ptr_Output_v4float = OpTypePointer Output %v4float |
| 49 |
%FragColor = OpVariable %_ptr_Output_v4float Output |
| 50 |
%uSampler_1 = OpVariable %_ptr_UniformConstant__arr_8_uint_4 UniformConstant |
| 51 |
%int_10 = OpConstant %int 10 |
| 52 |
%53 = OpConstantComposite %v2int %int_10 %int_10 |
| 53 |
%main = OpFunction %void None %3 |
| 54 |
%5 = OpLabel |
| 55 |
%48 = OpAccessChain %_ptr_PushConstant_int %registers %int_0 |
| 56 |
%49 = OpLoad %int %48 |
| 57 |
%50 = OpAccessChain %_ptr_UniformConstant_8 %uSampler_1 %49 |
| 58 |
%51 = OpLoad %7 %50 |
| 59 |
%55 = OpImageFetch %v4float %51 %53 Lod %int_0 |
| 60 |
%56 = OpFunctionCall %v4float %sample_from_func_s21_4__ %uSampler_1 |
| 61 |
%57 = OpFAdd %v4float %55 %56 |
| 62 |
%58 = OpAccessChain %_ptr_PushConstant_int %registers %int_0 |
| 63 |
%59 = OpLoad %int %58 |
| 64 |
%60 = OpAccessChain %_ptr_UniformConstant_8 %uSampler_1 %59 |
| 65 |
%61 = OpFunctionCall %v4float %sample_one_from_func_s21_ %60 |
| 66 |
%62 = OpFAdd %v4float %57 %61 |
| 67 |
OpStore %FragColor %62 |
| 68 |
OpReturn |
| 69 |
OpFunctionEnd |
| 70 |
%sample_from_func_s21_4__ = OpFunction %v4float None %14 |
| 71 |
%uSampler = OpFunctionParameter %_ptr_UniformConstant__arr_8_uint_4 |
| 72 |
%17 = OpLabel |
| 73 |
%29 = OpAccessChain %_ptr_PushConstant_int %registers %int_0 |
| 74 |
%30 = OpLoad %int %29 |
| 75 |
%31 = OpAccessChain %_ptr_UniformConstant_8 %uSampler %30 |
| 76 |
%32 = OpLoad %7 %31 |
| 77 |
%37 = OpImageFetch %v4float %32 %35 Lod %int_0 |
| 78 |
OpReturnValue %37 |
| 79 |
OpFunctionEnd |
| 80 |
%sample_one_from_func_s21_ = OpFunction %v4float None %19 |
| 81 |
%uSampler_0 = OpFunctionParameter %_ptr_UniformConstant_8 |
| 82 |
%22 = OpLabel |
| 83 |
%40 = OpLoad %7 %uSampler_0 |
| 84 |
%42 = OpImageFetch %v4float %40 %35 Lod %int_0 |
| 85 |
OpReturnValue %42 |
| 86 |
OpFunctionEnd |