HLSL: Flatten all input/output structs, regardless of stage.
This is needed because an output structure can contain embedded built-ins (like SV_Position) which should not get locations assigned.
This commit is contained in:
@@ -217,7 +217,7 @@ Shader version: 450
|
||||
0:? 0.000000
|
||||
0:48 Sequence
|
||||
0:48 move second child to first child (temp structure{temp 4-component vector of float Position Pos})
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Position Pos})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Position Pos})
|
||||
0:48 'vsout' (temp structure{temp 4-component vector of float Position Pos})
|
||||
0:48 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -235,7 +235,7 @@ Shader version: 450
|
||||
0:? 'g_tTexcdf4' (uniform textureCube)
|
||||
0:? 'g_tTexcdi4' (uniform itextureCube)
|
||||
0:? 'g_tTexcdu4' (uniform utextureCube)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Position Pos})
|
||||
0:? 'Pos' (out 4-component vector of float Position)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
@@ -459,7 +459,7 @@ Shader version: 450
|
||||
0:? 0.000000
|
||||
0:48 Sequence
|
||||
0:48 move second child to first child (temp structure{temp 4-component vector of float Position Pos})
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Position Pos})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Position Pos})
|
||||
0:48 'vsout' (temp structure{temp 4-component vector of float Position Pos})
|
||||
0:48 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -477,17 +477,17 @@ Shader version: 450
|
||||
0:? 'g_tTexcdf4' (uniform textureCube)
|
||||
0:? 'g_tTexcdi4' (uniform itextureCube)
|
||||
0:? 'g_tTexcdu4' (uniform utextureCube)
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Position Pos})
|
||||
0:? 'Pos' (out 4-component vector of float Position)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 160
|
||||
// Id's are bound by 162
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 156
|
||||
EntryPoint Vertex 4 "main" 156 161
|
||||
Name 4 "main"
|
||||
Name 9 "txval10"
|
||||
Name 12 "g_tTex1df4"
|
||||
@@ -519,6 +519,7 @@ Shader version: 450
|
||||
Name 150 "vsout"
|
||||
Name 156 "@entryPointOutput"
|
||||
Name 159 "g_tTex1df4a"
|
||||
Name 161 "Pos"
|
||||
Decorate 12(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 12(g_tTex1df4) Binding 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
@@ -535,9 +536,9 @@ Shader version: 450
|
||||
Decorate 133(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 142(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 148(VS_OUTPUT) 0 BuiltIn Position
|
||||
Decorate 156(@entryPointOutput) Location 0
|
||||
Decorate 159(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 159(g_tTex1df4a) Binding 1
|
||||
Decorate 161(Pos) BuiltIn Position
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -630,6 +631,8 @@ Shader version: 450
|
||||
155: TypePointer Output 148(VS_OUTPUT)
|
||||
156(@entryPointOutput): 155(ptr) Variable Output
|
||||
159(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
160: TypePointer Output 7(fvec4)
|
||||
161(Pos): 160(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval10): 8(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user