HLSL: Start location numbering with the entry-point return value.

Also, increment location numbers by the size of the objects.
This commit is contained in:
John Kessenich
2016-08-29 18:10:47 -06:00
parent a05d8b5604
commit 830b0cc98b
89 changed files with 2517 additions and 2157 deletions

View File

@@ -217,7 +217,7 @@ Shader version: 450
0:? 0.000000
0:48 Sequence
0:48 move second child to first child (temp structure{temp 4-component vector of float Position Pos})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Position Pos})
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Position Pos})
0:48 'vsout' (temp structure{temp 4-component vector of float Position Pos})
0:48 Branch: Return
0:? Linker Objects
@@ -458,7 +458,7 @@ Shader version: 450
0:? 0.000000
0:48 Sequence
0:48 move second child to first child (temp structure{temp 4-component vector of float Position Pos})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Position Pos})
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Position Pos})
0:48 'vsout' (temp structure{temp 4-component vector of float Position Pos})
0:48 Branch: Return
0:? Linker Objects
@@ -479,13 +479,13 @@ Shader version: 450
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 160
// Id's are bound by 161
Capability Shader
Capability Sampled1D
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 156
EntryPoint Vertex 4 "main" 157
Name 4 "main"
Name 9 "txval10"
Name 12 "g_tTex1df4"
@@ -515,8 +515,10 @@ Shader version: 450
Name 148 "VS_OUTPUT"
MemberName 148(VS_OUTPUT) 0 "Pos"
Name 150 "vsout"
Name 156 "@entryPointOutput"
Name 159 "g_tTex1df4a"
Name 155 "VS_OUTPUT"
MemberName 155(VS_OUTPUT) 0 "Pos"
Name 157 "@entryPointOutput"
Name 160 "g_tTex1df4a"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
Decorate 16(g_sSamp) DescriptorSet 0
@@ -533,8 +535,10 @@ Shader version: 450
Decorate 133(g_tTexcdi4) DescriptorSet 0
Decorate 142(g_tTexcdu4) DescriptorSet 0
MemberDecorate 148(VS_OUTPUT) 0 BuiltIn Position
Decorate 159(g_tTex1df4a) DescriptorSet 0
Decorate 159(g_tTex1df4a) Binding 1
MemberDecorate 155(VS_OUTPUT) 0 BuiltIn Position
Decorate 157(@entryPointOutput) Location 0
Decorate 160(g_tTex1df4a) DescriptorSet 0
Decorate 160(g_tTex1df4a) Binding 1
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -624,9 +628,10 @@ Shader version: 450
151: 24(int) Constant 0
152: 6(float) Constant 0
153: 7(fvec4) ConstantComposite 152 152 152 152
155: TypePointer Output 148(VS_OUTPUT)
156(@entryPointOutput): 155(ptr) Variable Output
159(g_tTex1df4a): 11(ptr) Variable UniformConstant
155(VS_OUTPUT): TypeStruct 7(fvec4)
156: TypePointer Output 155(VS_OUTPUT)
157(@entryPointOutput): 156(ptr) Variable Output
160(g_tTex1df4a): 11(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
9(txval10): 8(ptr) Variable Function
@@ -704,7 +709,7 @@ Shader version: 450
Store 139(txval42) 147
154: 8(ptr) AccessChain 150(vsout) 151
Store 154 153
157:148(VS_OUTPUT) Load 150(vsout)
Store 156(@entryPointOutput) 157
158:148(VS_OUTPUT) Load 150(vsout)
Store 157(@entryPointOutput) 158
Return
FunctionEnd