• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1hlsl.pp.line2.frag
2// Module Version 10000
3// Generated by (magic number): 80007
4// Id's are bound by 80
5
6                              Capability Shader
7               2:             ExtInstImport  "GLSL.std.450"
8                              MemoryModel Logical GLSL450
9                              EntryPoint Fragment 5  "MainPs" 71 75
10                              ExecutionMode 5 OriginUpperLeft
11               1:             String  "hlsl.pp.line2.frag"
12              17:             String  "foo.frag"
13              32:             String  "foo.h"
14              42:             String  "foo2.h"
15                              Source HLSL 500 1  "// OpModuleProcessed auto-map-locations
16// OpModuleProcessed auto-map-bindings
17// OpModuleProcessed entry-point MainPs
18// OpModuleProcessed client vulkan100
19// OpModuleProcessed target-env vulkan1.0
20// OpModuleProcessed keep-uncalled
21// OpModuleProcessed hlsl-offsets
22#line 1
23#line 1 "foo.frag"
24Texture2D g_tColor[ 128 ] ;
25
26layout (push_constant) cbuffer PerViewConstantBuffer_t
27{
28    uint g_nDataIdx;
29    uint g_nDataIdx2;
30    bool g_B;
31} ;
32
33SamplerState g_sAniso;
34
35struct PS_INPUT
36{
37    float2 vTextureCoords : TEXCOORD2 ;
38} ;
39
40struct PS_OUTPUT
41{
42    float4 vColor : SV_Target0 ;
43} ;
44
45PS_OUTPUT MainPs ( PS_INPUT i )
46{
47    PS_OUTPUT ps_output ;
48
49    uint u;
50#line 47
51    if (g_B)
52#line 3 "foo.h"
53        u = g_nDataIdx;
54    else
55#line 67
56        u = g_nDataIdx2;
57#line 7 "foo2.h"
58    ps_output . vColor = g_tColor [ u ] . Sample ( g_sAniso , i . vTextureCoords . xy );
59#line 105
60    return ps_output ;
61}
62
63"
64                              Name 5  "MainPs"
65                              Name 9  "PS_INPUT"
66                              MemberName 9(PS_INPUT) 0  "vTextureCoords"
67                              Name 12  "PS_OUTPUT"
68                              MemberName 12(PS_OUTPUT) 0  "vColor"
69                              Name 15  "@MainPs(struct-PS_INPUT-vf21;"
70                              Name 14  "i"
71                              Name 19  "PerViewConstantBuffer_t"
72                              MemberName 19(PerViewConstantBuffer_t) 0  "g_nDataIdx"
73                              MemberName 19(PerViewConstantBuffer_t) 1  "g_nDataIdx2"
74                              MemberName 19(PerViewConstantBuffer_t) 2  "g_B"
75                              Name 21  ""
76                              Name 34  "u"
77                              Name 44  "ps_output"
78                              Name 49  "g_tColor"
79                              Name 56  "g_sAniso"
80                              Name 69  "i"
81                              Name 71  "i.vTextureCoords"
82                              Name 75  "@entryPointOutput.vColor"
83                              Name 76  "param"
84                              MemberDecorate 19(PerViewConstantBuffer_t) 0 Offset 0
85                              MemberDecorate 19(PerViewConstantBuffer_t) 1 Offset 4
86                              MemberDecorate 19(PerViewConstantBuffer_t) 2 Offset 8
87                              Decorate 19(PerViewConstantBuffer_t) Block
88                              Decorate 49(g_tColor) DescriptorSet 0
89                              Decorate 49(g_tColor) Binding 0
90                              Decorate 56(g_sAniso) DescriptorSet 0
91                              Decorate 56(g_sAniso) Binding 0
92                              Decorate 71(i.vTextureCoords) Location 0
93                              Decorate 75(@entryPointOutput.vColor) Location 0
94               3:             TypeVoid
95               4:             TypeFunction 3
96               7:             TypeFloat 32
97               8:             TypeVector 7(float) 2
98     9(PS_INPUT):             TypeStruct 8(fvec2)
99              10:             TypePointer Function 9(PS_INPUT)
100              11:             TypeVector 7(float) 4
101   12(PS_OUTPUT):             TypeStruct 11(fvec4)
102              13:             TypeFunction 12(PS_OUTPUT) 10(ptr)
103              18:             TypeInt 32 0
10419(PerViewConstantBuffer_t):             TypeStruct 18(int) 18(int) 18(int)
105              20:             TypePointer PushConstant 19(PerViewConstantBuffer_t)
106              21:     20(ptr) Variable PushConstant
107              22:             TypeInt 32 1
108              23:     22(int) Constant 2
109              24:             TypePointer PushConstant 18(int)
110              27:             TypeBool
111              28:     18(int) Constant 0
112              33:             TypePointer Function 18(int)
113              35:     22(int) Constant 0
114              39:     22(int) Constant 1
115              43:             TypePointer Function 12(PS_OUTPUT)
116              45:             TypeImage 7(float) 2D sampled format:Unknown
117              46:     18(int) Constant 128
118              47:             TypeArray 45 46
119              48:             TypePointer UniformConstant 47
120    49(g_tColor):     48(ptr) Variable UniformConstant
121              51:             TypePointer UniformConstant 45
122              54:             TypeSampler
123              55:             TypePointer UniformConstant 54
124    56(g_sAniso):     55(ptr) Variable UniformConstant
125              58:             TypeSampledImage 45
126              60:             TypePointer Function 8(fvec2)
127              64:             TypePointer Function 11(fvec4)
128              70:             TypePointer Input 8(fvec2)
12971(i.vTextureCoords):     70(ptr) Variable Input
130              74:             TypePointer Output 11(fvec4)
13175(@entryPointOutput.vColor):     74(ptr) Variable Output
132       5(MainPs):           3 Function None 4
133               6:             Label
134           69(i):     10(ptr) Variable Function
135       76(param):     10(ptr) Variable Function
136                              Line 17 23 0
137              72:    8(fvec2) Load 71(i.vTextureCoords)
138              73:     60(ptr) AccessChain 69(i) 35
139                              Store 73 72
140              77: 9(PS_INPUT) Load 69(i)
141                              Store 76(param) 77
142              78:12(PS_OUTPUT) FunctionCall 15(@MainPs(struct-PS_INPUT-vf21;) 76(param)
143              79:   11(fvec4) CompositeExtract 78 0
144                              Store 75(@entryPointOutput.vColor) 79
145                              Return
146                              FunctionEnd
14715(@MainPs(struct-PS_INPUT-vf21;):12(PS_OUTPUT) Function None 13
148           14(i):     10(ptr) FunctionParameter
149              16:             Label
150           34(u):     33(ptr) Variable Function
151   44(ps_output):     43(ptr) Variable Function
152                              Line 17 47 0
153              25:     24(ptr) AccessChain 21 23
154              26:     18(int) Load 25
155              29:    27(bool) INotEqual 26 28
156                              SelectionMerge 31 None
157                              BranchConditional 29 30 38
158              30:               Label
159                                Line 32 3 0
160              36:     24(ptr)   AccessChain 21 35
161              37:     18(int)   Load 36
162                                Store 34(u) 37
163                                Branch 31
164              38:               Label
165                                Line 32 67 0
166              40:     24(ptr)   AccessChain 21 39
167              41:     18(int)   Load 40
168                                Store 34(u) 41
169                                Branch 31
170              31:             Label
171                              Line 42 7 0
172              50:     18(int) Load 34(u)
173              52:     51(ptr) AccessChain 49(g_tColor) 50
174              53:          45 Load 52
175              57:          54 Load 56(g_sAniso)
176              59:          58 SampledImage 53 57
177              61:     60(ptr) AccessChain 14(i) 35
178              62:    8(fvec2) Load 61
179              63:   11(fvec4) ImageSampleImplicitLod 59 62
180              65:     64(ptr) AccessChain 44(ps_output) 35
181                              Store 65 63
182                              Line 42 105 0
183              66:12(PS_OUTPUT) Load 44(ps_output)
184                              ReturnValue 66
185                              FunctionEnd
186