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