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

@@ -21,7 +21,7 @@ gl_FragCoord origin is upper left
0:11 1.000000
0:12 Sequence
0:12 move second child to first child (temp structure{noContraction temp 4-component vector of float color})
0:? '@entryPointOutput' (out structure{noContraction temp 4-component vector of float color})
0:? '@entryPointOutput' (layout(location=0 ) out structure{noContraction temp 4-component vector of float color})
0:12 'ps_output' (temp structure{noContraction temp 4-component vector of float color})
0:12 Branch: Return
0:? Linker Objects
@@ -53,7 +53,7 @@ gl_FragCoord origin is upper left
0:11 1.000000
0:12 Sequence
0:12 move second child to first child (temp structure{noContraction temp 4-component vector of float color})
0:? '@entryPointOutput' (out structure{noContraction temp 4-component vector of float color})
0:? '@entryPointOutput' (layout(location=0 ) out structure{noContraction temp 4-component vector of float color})
0:12 'ps_output' (temp structure{noContraction temp 4-component vector of float color})
0:12 Branch: Return
0:? Linker Objects
@@ -61,12 +61,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 31
// Id's are bound by 32
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 26
EntryPoint Fragment 4 "main" 27
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 13 "MyFunction(f1;vf3;"
@@ -75,8 +75,11 @@ gl_FragCoord origin is upper left
Name 16 "PS_OUTPUT"
MemberName 16(PS_OUTPUT) 0 "color"
Name 18 "ps_output"
Name 26 "@entryPointOutput"
Name 30 "precisefloat"
Name 25 "PS_OUTPUT"
MemberName 25(PS_OUTPUT) 0 "color"
Name 27 "@entryPointOutput"
Name 31 "precisefloat"
Decorate 27(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -92,17 +95,18 @@ gl_FragCoord origin is upper left
21: 6(float) Constant 1065353216
22: 15(fvec4) ConstantComposite 21 21 21 21
23: TypePointer Function 15(fvec4)
25: TypePointer Output 16(PS_OUTPUT)
26(@entryPointOutput): 25(ptr) Variable Output
29: TypePointer Private 6(float)
30(precisefloat): 29(ptr) Variable Private
25(PS_OUTPUT): TypeStruct 15(fvec4)
26: TypePointer Output 25(PS_OUTPUT)
27(@entryPointOutput): 26(ptr) Variable Output
30: TypePointer Private 6(float)
31(precisefloat): 30(ptr) Variable Private
4(main): 2 Function None 3
5: Label
18(ps_output): 17(ptr) Variable Function
24: 23(ptr) AccessChain 18(ps_output) 20
Store 24 22
27:16(PS_OUTPUT) Load 18(ps_output)
Store 26(@entryPointOutput) 27
28:16(PS_OUTPUT) Load 18(ps_output)
Store 27(@entryPointOutput) 28
Return
FunctionEnd
13(MyFunction(f1;vf3;): 2 Function None 10