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

@@ -38,7 +38,7 @@ Shader version: 450
0:? 0.000000
0:26 Sequence
0:26 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:26 'vsout' (temp structure{temp 4-component vector of float Position Pos})
0:26 Branch: Return
0:? Linker Objects
@@ -88,7 +88,7 @@ Shader version: 450
0:? 0.000000
0:26 Sequence
0:26 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:26 'vsout' (temp structure{temp 4-component vector of float Position Pos})
0:26 Branch: Return
0:? Linker Objects
@@ -97,14 +97,14 @@ Shader version: 450
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 42
// Id's are bound by 43
Capability Shader
Capability Sampled1D
Capability ImageQuery
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 36
EntryPoint Vertex 4 "main" 37
Name 4 "main"
Name 8 "sizeQueryTemp"
Name 12 "g_tTex1df4"
@@ -114,13 +114,17 @@ Shader version: 450
Name 27 "VS_OUTPUT"
MemberName 27(VS_OUTPUT) 0 "Pos"
Name 29 "vsout"
Name 36 "@entryPointOutput"
Name 41 "g_sSamp"
Name 35 "VS_OUTPUT"
MemberName 35(VS_OUTPUT) 0 "Pos"
Name 37 "@entryPointOutput"
Name 42 "g_sSamp"
Decorate 12(g_tTex1df4) DescriptorSet 0
Decorate 12(g_tTex1df4) Binding 0
MemberDecorate 27(VS_OUTPUT) 0 BuiltIn Position
Decorate 41(g_sSamp) DescriptorSet 0
Decorate 41(g_sSamp) Binding 0
MemberDecorate 35(VS_OUTPUT) 0 BuiltIn Position
Decorate 37(@entryPointOutput) Location 0
Decorate 42(g_sSamp) DescriptorSet 0
Decorate 42(g_sSamp) Binding 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@@ -138,11 +142,12 @@ Shader version: 450
31: 9(float) Constant 0
32: 26(fvec4) ConstantComposite 31 31 31 31
33: TypePointer Function 26(fvec4)
35: TypePointer Output 27(VS_OUTPUT)
36(@entryPointOutput): 35(ptr) Variable Output
39: TypeSampler
40: TypePointer UniformConstant 39
41(g_sSamp): 40(ptr) Variable UniformConstant
35(VS_OUTPUT): TypeStruct 26(fvec4)
36: TypePointer Output 35(VS_OUTPUT)
37(@entryPointOutput): 36(ptr) Variable Output
40: TypeSampler
41: TypePointer UniformConstant 40
42(g_sSamp): 41(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
8(sizeQueryTemp): 7(ptr) Variable Function
@@ -165,7 +170,7 @@ Shader version: 450
Store 23(NumberOfLevelsU) 25
34: 33(ptr) AccessChain 29(vsout) 30
Store 34 32
37:27(VS_OUTPUT) Load 29(vsout)
Store 36(@entryPointOutput) 37
38:27(VS_OUTPUT) Load 29(vsout)
Store 37(@entryPointOutput) 38
Return
FunctionEnd