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