• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1hlsl.pp.line2.frag
2// Module Version 10000
3// Generated by (magic number): 8000b
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               7:             String  "foo.frag"
13              36:             String  "foo.h"
14              44:             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 10  "PS_INPUT"
66                              MemberName 10(PS_INPUT) 0  "vTextureCoords"
67                              Name 13  "PS_OUTPUT"
68                              MemberName 13(PS_OUTPUT) 0  "vColor"
69                              Name 16  "@MainPs(struct-PS_INPUT-vf21;"
70                              Name 15  "i"
71                              Name 19  "ps_output"
72                              Name 22  "u"
73                              Name 23  "PerViewConstantBuffer_t"
74                              MemberName 23(PerViewConstantBuffer_t) 0  "g_nDataIdx"
75                              MemberName 23(PerViewConstantBuffer_t) 1  "g_nDataIdx2"
76                              MemberName 23(PerViewConstantBuffer_t) 2  "g_B"
77                              Name 25  ""
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                              Decorate 23(PerViewConstantBuffer_t) Block
85                              MemberDecorate 23(PerViewConstantBuffer_t) 0 Offset 0
86                              MemberDecorate 23(PerViewConstantBuffer_t) 1 Offset 4
87                              MemberDecorate 23(PerViewConstantBuffer_t) 2 Offset 8
88                              Decorate 49(g_tColor) Binding 0
89                              Decorate 49(g_tColor) DescriptorSet 0
90                              Decorate 56(g_sAniso) Binding 1
91                              Decorate 56(g_sAniso) DescriptorSet 0
92                              Decorate 71(i.vTextureCoords) Location 0
93                              Decorate 75(@entryPointOutput.vColor) Location 0
94               3:             TypeVoid
95               4:             TypeFunction 3
96               8:             TypeFloat 32
97               9:             TypeVector 8(float) 2
98    10(PS_INPUT):             TypeStruct 9(fvec2)
99              11:             TypePointer Function 10(PS_INPUT)
100              12:             TypeVector 8(float) 4
101   13(PS_OUTPUT):             TypeStruct 12(fvec4)
102              14:             TypeFunction 13(PS_OUTPUT) 11(ptr)
103              18:             TypePointer Function 13(PS_OUTPUT)
104              20:             TypeInt 32 0
105              21:             TypePointer Function 20(int)
10623(PerViewConstantBuffer_t):             TypeStruct 20(int) 20(int) 20(int)
107              24:             TypePointer PushConstant 23(PerViewConstantBuffer_t)
108              25:     24(ptr) Variable PushConstant
109              26:             TypeInt 32 1
110              27:     26(int) Constant 2
111              28:             TypePointer PushConstant 20(int)
112              31:             TypeBool
113              32:     20(int) Constant 0
114              37:     26(int) Constant 0
115              41:     26(int) Constant 1
116              45:             TypeImage 8(float) 2D sampled format:Unknown
117              46:     20(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 9(fvec2)
127              64:             TypePointer Function 12(fvec4)
128              70:             TypePointer Input 9(fvec2)
12971(i.vTextureCoords):     70(ptr) Variable Input
130              74:             TypePointer Output 12(fvec4)
13175(@entryPointOutput.vColor):     74(ptr) Variable Output
132                              Line 7 23 1
133       5(MainPs):           3 Function None 4
134               6:             Label
135           69(i):     11(ptr) Variable Function
136       76(param):     11(ptr) Variable Function
137                              Line 7 23 0
138              72:    9(fvec2) Load 71(i.vTextureCoords)
139              73:     60(ptr) AccessChain 69(i) 37
140                              Store 73 72
141              77:10(PS_INPUT) Load 69(i)
142                              Store 76(param) 77
143              78:13(PS_OUTPUT) FunctionCall 16(@MainPs(struct-PS_INPUT-vf21;) 76(param)
144              79:   12(fvec4) CompositeExtract 78 0
145                              Store 75(@entryPointOutput.vColor) 79
146                              Return
147                              FunctionEnd
148                              Line 7 23 1
14916(@MainPs(struct-PS_INPUT-vf21;):13(PS_OUTPUT) Function None 14
150           15(i):     11(ptr) FunctionParameter
151              17:             Label
152   19(ps_output):     18(ptr) Variable Function
153           22(u):     21(ptr) Variable Function
154                              Line 7 47 0
155              29:     28(ptr) AccessChain 25 27
156              30:     20(int) Load 29
157              33:    31(bool) INotEqual 30 32
158                              SelectionMerge 35 None
159                              BranchConditional 33 34 40
160              34:               Label
161                                Line 36 3 0
162              38:     28(ptr)   AccessChain 25 37
163              39:     20(int)   Load 38
164                                Store 22(u) 39
165                                Branch 35
166              40:               Label
167                                Line 36 67 0
168              42:     28(ptr)   AccessChain 25 41
169              43:     20(int)   Load 42
170                                Store 22(u) 43
171                                Branch 35
172              35:             Label
173                              Line 44 7 0
174              50:     20(int) Load 22(u)
175              52:     51(ptr) AccessChain 49(g_tColor) 50
176              53:          45 Load 52
177              57:          54 Load 56(g_sAniso)
178              59:          58 SampledImage 53 57
179              61:     60(ptr) AccessChain 15(i) 37
180              62:    9(fvec2) Load 61
181              63:   12(fvec4) ImageSampleImplicitLod 59 62
182              65:     64(ptr) AccessChain 19(ps_output) 37
183                              Store 65 63
184                              Line 44 105 0
185              66:13(PS_OUTPUT) Load 19(ps_output)
186                              ReturnValue 66
187                              FunctionEnd
188