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

@@ -57,7 +57,7 @@ gl_FragCoord origin is upper left
0:22 3 (const int)
0:24 Sequence
0:24 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:24 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:24 Branch: Return
0:? Linker Objects
@@ -124,19 +124,19 @@ gl_FragCoord origin is upper left
0:22 3 (const int)
0:24 Sequence
0:24 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:24 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:24 Branch: Return
0:? Linker Objects
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 56
// Id's are bound by 57
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 45 53
EntryPoint Fragment 4 "main" 45 54
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 12 "MyFunc(f1;f1;f1;"
@@ -154,10 +154,15 @@ gl_FragCoord origin is upper left
MemberName 31(PS_OUTPUT) 1 "Depth"
Name 33 "psout"
Name 45 "inpos"
Name 53 "@entryPointOutput"
Name 52 "PS_OUTPUT"
MemberName 52(PS_OUTPUT) 0 "Color"
MemberName 52(PS_OUTPUT) 1 "Depth"
Name 54 "@entryPointOutput"
MemberDecorate 31(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 45(inpos) NoPerspective
Decorate 45(inpos) BuiltIn FragCoord
MemberDecorate 52(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 54(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -179,8 +184,9 @@ gl_FragCoord origin is upper left
46: TypeInt 32 0
47: 46(int) Constant 3
48: TypePointer Input 6(float)
52: TypePointer Output 31(PS_OUTPUT)
53(@entryPointOutput): 52(ptr) Variable Output
52(PS_OUTPUT): TypeStruct 30(fvec4) 6(float)
53: TypePointer Output 52(PS_OUTPUT)
54(@entryPointOutput): 53(ptr) Variable Output
4(main): 2 Function None 3
5: Label
17(x): 7(ptr) Variable Function
@@ -211,8 +217,8 @@ gl_FragCoord origin is upper left
50: 6(float) Load 49
51: 7(ptr) AccessChain 33(psout) 43
Store 51 50
54:31(PS_OUTPUT) Load 33(psout)
Store 53(@entryPointOutput) 54
55:31(PS_OUTPUT) Load 33(psout)
Store 54(@entryPointOutput) 55
Return
FunctionEnd
12(MyFunc(f1;f1;f1;): 2 Function None 8