glslang-zig/Test/baseResults/hlsl.pp.line2.frag.out
Sajjad Mirza f69d2768e5
Use line and column from node on DebugLexicalBlock.
* Fix bug in TestFixture.h, debug info gets enabled when nonsemantic debug info is requested.
2024-10-04 14:11:27 -04:00

187 lines
7.9 KiB
Text

hlsl.pp.line2.frag
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 80
Capability Shader
2: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 5 "MainPs" 71 75
ExecutionMode 5 OriginUpperLeft
1: String "hlsl.pp.line2.frag"
7: String "foo.frag"
36: String "foo.h"
44: String "foo2.h"
Source HLSL 500 1 "// OpModuleProcessed auto-map-locations
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed entry-point MainPs
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed keep-uncalled
// OpModuleProcessed hlsl-offsets
#line 1
#line 1 "foo.frag"
Texture2D g_tColor[ 128 ] ;
layout (push_constant) cbuffer PerViewConstantBuffer_t
{
uint g_nDataIdx;
uint g_nDataIdx2;
bool g_B;
} ;
SamplerState g_sAniso;
struct PS_INPUT
{
float2 vTextureCoords : TEXCOORD2 ;
} ;
struct PS_OUTPUT
{
float4 vColor : SV_Target0 ;
} ;
PS_OUTPUT MainPs ( PS_INPUT i )
{
PS_OUTPUT ps_output ;
uint u;
#line 47
if (g_B)
#line 3 "foo.h"
u = g_nDataIdx;
else
#line 67
u = g_nDataIdx2;
#line 7 "foo2.h"
ps_output . vColor = g_tColor [ u ] . Sample ( g_sAniso , i . vTextureCoords . xy );
#line 105
return ps_output ;
}
"
Name 5 "MainPs"
Name 10 "PS_INPUT"
MemberName 10(PS_INPUT) 0 "vTextureCoords"
Name 13 "PS_OUTPUT"
MemberName 13(PS_OUTPUT) 0 "vColor"
Name 16 "@MainPs(struct-PS_INPUT-vf21;"
Name 15 "i"
Name 19 "ps_output"
Name 22 "u"
Name 23 "PerViewConstantBuffer_t"
MemberName 23(PerViewConstantBuffer_t) 0 "g_nDataIdx"
MemberName 23(PerViewConstantBuffer_t) 1 "g_nDataIdx2"
MemberName 23(PerViewConstantBuffer_t) 2 "g_B"
Name 25 ""
Name 49 "g_tColor"
Name 56 "g_sAniso"
Name 69 "i"
Name 71 "i.vTextureCoords"
Name 75 "@entryPointOutput.vColor"
Name 76 "param"
Decorate 23(PerViewConstantBuffer_t) Block
MemberDecorate 23(PerViewConstantBuffer_t) 0 Offset 0
MemberDecorate 23(PerViewConstantBuffer_t) 1 Offset 4
MemberDecorate 23(PerViewConstantBuffer_t) 2 Offset 8
Decorate 49(g_tColor) Binding 0
Decorate 49(g_tColor) DescriptorSet 0
Decorate 56(g_sAniso) Binding 1
Decorate 56(g_sAniso) DescriptorSet 0
Decorate 71(i.vTextureCoords) Location 0
Decorate 75(@entryPointOutput.vColor) Location 0
3: TypeVoid
4: TypeFunction 3
8: TypeFloat 32
9: TypeVector 8(float) 2
10(PS_INPUT): TypeStruct 9(fvec2)
11: TypePointer Function 10(PS_INPUT)
12: TypeVector 8(float) 4
13(PS_OUTPUT): TypeStruct 12(fvec4)
14: TypeFunction 13(PS_OUTPUT) 11(ptr)
18: TypePointer Function 13(PS_OUTPUT)
20: TypeInt 32 0
21: TypePointer Function 20(int)
23(PerViewConstantBuffer_t): TypeStruct 20(int) 20(int) 20(int)
24: TypePointer PushConstant 23(PerViewConstantBuffer_t)
25: 24(ptr) Variable PushConstant
26: TypeInt 32 1
27: 26(int) Constant 2
28: TypePointer PushConstant 20(int)
31: TypeBool
32: 20(int) Constant 0
37: 26(int) Constant 0
41: 26(int) Constant 1
45: TypeImage 8(float) 2D sampled format:Unknown
46: 20(int) Constant 128
47: TypeArray 45 46
48: TypePointer UniformConstant 47
49(g_tColor): 48(ptr) Variable UniformConstant
51: TypePointer UniformConstant 45
54: TypeSampler
55: TypePointer UniformConstant 54
56(g_sAniso): 55(ptr) Variable UniformConstant
58: TypeSampledImage 45
60: TypePointer Function 9(fvec2)
64: TypePointer Function 12(fvec4)
70: TypePointer Input 9(fvec2)
71(i.vTextureCoords): 70(ptr) Variable Input
74: TypePointer Output 12(fvec4)
75(@entryPointOutput.vColor): 74(ptr) Variable Output
Line 7 23 1
5(MainPs): 3 Function None 4
6: Label
69(i): 11(ptr) Variable Function
76(param): 11(ptr) Variable Function
Line 7 23 0
72: 9(fvec2) Load 71(i.vTextureCoords)
73: 60(ptr) AccessChain 69(i) 37
Store 73 72
77:10(PS_INPUT) Load 69(i)
Store 76(param) 77
78:13(PS_OUTPUT) FunctionCall 16(@MainPs(struct-PS_INPUT-vf21;) 76(param)
79: 12(fvec4) CompositeExtract 78 0
Store 75(@entryPointOutput.vColor) 79
Return
FunctionEnd
Line 7 23 1
16(@MainPs(struct-PS_INPUT-vf21;):13(PS_OUTPUT) Function None 14
15(i): 11(ptr) FunctionParameter
17: Label
19(ps_output): 18(ptr) Variable Function
22(u): 21(ptr) Variable Function
Line 7 47 0
29: 28(ptr) AccessChain 25 27
30: 20(int) Load 29
33: 31(bool) INotEqual 30 32
SelectionMerge 35 None
BranchConditional 33 34 40
34: Label
Line 36 3 0
38: 28(ptr) AccessChain 25 37
39: 20(int) Load 38
Store 22(u) 39
Branch 35
40: Label
Line 36 67 0
42: 28(ptr) AccessChain 25 41
43: 20(int) Load 42
Store 22(u) 43
Branch 35
35: Label
Line 44 7 0
50: 20(int) Load 22(u)
52: 51(ptr) AccessChain 49(g_tColor) 50
53: 45 Load 52
57: 54 Load 56(g_sAniso)
59: 58 SampledImage 53 57
61: 60(ptr) AccessChain 15(i) 37
62: 9(fvec2) Load 61
63: 12(fvec4) ImageSampleImplicitLod 59 62
65: 64(ptr) AccessChain 19(ps_output) 37
Store 65 63
Line 44 105 0
66:13(PS_OUTPUT) Load 19(ps_output)
ReturnValue 66
FunctionEnd