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:
@@ -45,11 +45,11 @@ gl_FragCoord origin is upper left
|
||||
0:30 1.000000
|
||||
0:31 Sequence
|
||||
0:31 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:31 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:31 Branch: Return
|
||||
0:? Linker Objects
|
||||
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:
|
||||
@@ -101,20 +101,20 @@ gl_FragCoord origin is upper left
|
||||
0:30 1.000000
|
||||
0:31 Sequence
|
||||
0:31 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:31 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:31 Branch: Return
|
||||
0:? Linker Objects
|
||||
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 46
|
||||
// Id's are bound by 48
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 43
|
||||
EntryPoint Fragment 4 "main" 43 47
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 6 "Test1("
|
||||
@@ -132,7 +132,8 @@ gl_FragCoord origin is upper left
|
||||
MemberName 34(PS_OUTPUT) 0 "color"
|
||||
Name 36 "ps_output"
|
||||
Name 43 "@entryPointOutput"
|
||||
Decorate 43(@entryPointOutput) Location 0
|
||||
Name 47 "color"
|
||||
Decorate 47(color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
8: TypeFloat 32
|
||||
@@ -164,6 +165,8 @@ gl_FragCoord origin is upper left
|
||||
40: TypePointer Function 33(fvec4)
|
||||
42: TypePointer Output 34(PS_OUTPUT)
|
||||
43(@entryPointOutput): 42(ptr) Variable Output
|
||||
46: TypePointer Output 33(fvec4)
|
||||
47(color): 46(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
36(ps_output): 35(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user