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

@ -36,7 +36,7 @@ gl_FragCoord origin is upper left
0:15 1.000000
0:16 Sequence
0:16 move second child to first child (temp structure{temp 4-component vector of float color})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float color})
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float color})
0:16 'ps_output' (temp structure{temp 4-component vector of float color})
0:16 Branch: Return
0:? Linker Objects
@ -82,25 +82,28 @@ gl_FragCoord origin is upper left
0:15 1.000000
0:16 Sequence
0:16 move second child to first child (temp structure{temp 4-component vector of float color})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float color})
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float color})
0:16 'ps_output' (temp structure{temp 4-component vector of float color})
0:16 Branch: Return
0:? Linker Objects
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 34
// Id's are bound by 35
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 31
EntryPoint Fragment 4 "main" 32
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 22 "PS_OUTPUT"
MemberName 22(PS_OUTPUT) 0 "color"
Name 24 "ps_output"
Name 31 "@entryPointOutput"
Name 30 "PS_OUTPUT"
MemberName 30(PS_OUTPUT) 0 "color"
Name 32 "@entryPointOutput"
Decorate 32(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
@ -125,14 +128,15 @@ gl_FragCoord origin is upper left
26: 13(float) Constant 1065353216
27: 21(fvec4) ConstantComposite 26 26 26 26
28: TypePointer Function 21(fvec4)
30: TypePointer Output 22(PS_OUTPUT)
31(@entryPointOutput): 30(ptr) Variable Output
30(PS_OUTPUT): TypeStruct 21(fvec4)
31: TypePointer Output 30(PS_OUTPUT)
32(@entryPointOutput): 31(ptr) Variable Output
4(main): 2 Function None 3
5: Label
24(ps_output): 23(ptr) Variable Function
29: 28(ptr) AccessChain 24(ps_output) 25
Store 29 27
32:22(PS_OUTPUT) Load 24(ps_output)
Store 31(@entryPointOutput) 32
33:22(PS_OUTPUT) Load 24(ps_output)
Store 32(@entryPointOutput) 33
Return
FunctionEnd