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

@ -33,7 +33,7 @@ gl_FragCoord origin is upper left
0:127 1.000000
0:129 Sequence
0:129 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:129 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:129 Branch: Return
0:? Linker Objects
@ -76,19 +76,19 @@ gl_FragCoord origin is upper left
0:127 1.000000
0:129 Sequence
0:129 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:129 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
0:129 Branch: Return
0:? Linker Objects
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 30
// Id's are bound by 31
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 27
EntryPoint Fragment 4 "main" 28
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 8 "thisLineIs"
@ -96,8 +96,13 @@ gl_FragCoord origin is upper left
MemberName 12(PS_OUTPUT) 0 "Color"
MemberName 12(PS_OUTPUT) 1 "Depth"
Name 14 "psout"
Name 27 "@entryPointOutput"
Name 26 "PS_OUTPUT"
MemberName 26(PS_OUTPUT) 0 "Color"
MemberName 26(PS_OUTPUT) 1 "Depth"
Name 28 "@entryPointOutput"
MemberDecorate 12(PS_OUTPUT) 1 BuiltIn FragDepth
MemberDecorate 26(PS_OUTPUT) 1 BuiltIn FragDepth
Decorate 28(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
@ -113,8 +118,9 @@ gl_FragCoord origin is upper left
21: TypePointer Function 11(fvec4)
23: 6(int) Constant 1
24: TypePointer Function 10(float)
26: TypePointer Output 12(PS_OUTPUT)
27(@entryPointOutput): 26(ptr) Variable Output
26(PS_OUTPUT): TypeStruct 11(fvec4) 10(float)
27: TypePointer Output 26(PS_OUTPUT)
28(@entryPointOutput): 27(ptr) Variable Output
4(main): 2 Function None 3
5: Label
8(thisLineIs): 7(ptr) Variable Function
@ -127,7 +133,7 @@ gl_FragCoord origin is upper left
Store 22 20
25: 24(ptr) AccessChain 14(psout) 23
Store 25 19
28:12(PS_OUTPUT) Load 14(psout)
Store 27(@entryPointOutput) 28
29:12(PS_OUTPUT) Load 14(psout)
Store 28(@entryPointOutput) 29
Return
FunctionEnd