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:
parent
7dc630f3da
commit
f8e494c18c
7 changed files with 53 additions and 38 deletions
|
|
@ -79,7 +79,7 @@ Shader version: 450
|
|||
0:? 0.000000
|
||||
0:45 Sequence
|
||||
0:45 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:45 'vsout' (temp structure{temp 4-component vector of float Position Pos})
|
||||
0:45 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
|
@ -98,7 +98,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:
|
||||
|
|
@ -184,7 +184,7 @@ Shader version: 450
|
|||
0:? 0.000000
|
||||
0:45 Sequence
|
||||
0:45 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:45 'vsout' (temp structure{temp 4-component vector of float Position Pos})
|
||||
0:45 Branch: Return
|
||||
0:? Linker Objects
|
||||
|
|
@ -203,17 +203,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 120
|
||||
// Id's are bound by 122
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 97
|
||||
EntryPoint Vertex 4 "main" 97 121
|
||||
Name 4 "main"
|
||||
Name 9 "txval20"
|
||||
Name 12 "g_tTex2df4"
|
||||
|
|
@ -240,6 +240,7 @@ Shader version: 450
|
|||
Name 113 "g_tTex3df4"
|
||||
Name 116 "g_tTex3di4"
|
||||
Name 119 "g_tTex3du4"
|
||||
Name 121 "Pos"
|
||||
Decorate 12(g_tTex2df4) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) Binding 0
|
||||
|
|
@ -249,7 +250,6 @@ Shader version: 450
|
|||
Decorate 70(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 80(g_tTexcdu4) DescriptorSet 0
|
||||
MemberDecorate 90(VS_OUTPUT) 0 BuiltIn Position
|
||||
Decorate 97(@entryPointOutput) Location 0
|
||||
Decorate 100(g_sSamp2d) DescriptorSet 0
|
||||
Decorate 103(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 103(g_tTex1df4a) Binding 1
|
||||
|
|
@ -260,6 +260,7 @@ Shader version: 450
|
|||
Decorate 113(g_tTex3df4) DescriptorSet 0
|
||||
Decorate 116(g_tTex3di4) DescriptorSet 0
|
||||
Decorate 119(g_tTex3du4) DescriptorSet 0
|
||||
Decorate 121(Pos) BuiltIn Position
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -342,6 +343,8 @@ Shader version: 450
|
|||
117: TypeImage 41(int) 3D sampled format:Unknown
|
||||
118: TypePointer UniformConstant 117
|
||||
119(g_tTex3du4): 118(ptr) Variable UniformConstant
|
||||
120: TypePointer Output 7(fvec4)
|
||||
121(Pos): 120(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval20): 8(ptr) Variable Function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue