HLSL: Flatten a return struct from an entry point and assign locations after flattening.

Locations now get assigned in order, but skipping built-ins, which can be
done post flattening.
This commit is contained in:
John Kessenich
2016-09-16 01:44:43 -06:00
parent 7f702124ec
commit 7dc630f3da
93 changed files with 951 additions and 495 deletions

View File

@@ -498,7 +498,7 @@ gl_FragCoord origin is upper left
0:199 'outval' (temp 4-component vector of float)
0:200 Sequence
0:200 move second child to first child (temp structure{temp 4-component vector of float Color})
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Color})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color})
0:200 'psout' (temp structure{temp 4-component vector of float Color})
0:200 Branch: Return
0:? Linker Objects
@@ -512,7 +512,7 @@ gl_FragCoord origin is upper left
0:? 'fs' (uniform float)
0:? 'us' (uniform uint)
0:? 'ds' (uniform double)
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color})
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
Linked fragment stage:
@@ -1017,7 +1017,7 @@ gl_FragCoord origin is upper left
0:199 'outval' (temp 4-component vector of float)
0:200 Sequence
0:200 move second child to first child (temp structure{temp 4-component vector of float Color})
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Color})
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color})
0:200 'psout' (temp structure{temp 4-component vector of float Color})
0:200 Branch: Return
0:? Linker Objects
@@ -1031,17 +1031,17 @@ gl_FragCoord origin is upper left
0:? 'fs' (uniform float)
0:? 'us' (uniform uint)
0:? 'ds' (uniform double)
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color})
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 480
// Id's are bound by 482
Capability Shader
Capability Float64
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 477
EntryPoint Fragment 4 "main" 477 481
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 11 "Fn_F3(vf3;"
@@ -1131,7 +1131,8 @@ gl_FragCoord origin is upper left
MemberName 471(PS_OUTPUT) 0 "Color"
Name 473 "psout"
Name 477 "@entryPointOutput"
Decorate 477(@entryPointOutput) Location 0
Name 481 "Color"
Decorate 481(Color) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -1204,6 +1205,8 @@ gl_FragCoord origin is upper left
472: TypePointer Function 471(PS_OUTPUT)
476: TypePointer Output 471(PS_OUTPUT)
477(@entryPointOutput): 476(ptr) Variable Output
480: TypePointer Output 462(fvec4)
481(Color): 480(ptr) Variable Output
4(main): 2 Function None 3
5: Label
252(r00): 8(ptr) Variable Function