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:
@@ -93,7 +93,7 @@ gl_FragCoord origin is upper left
|
||||
0:40 1.000000
|
||||
0:42 Sequence
|
||||
0:42 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -108,7 +108,8 @@ gl_FragCoord origin is upper left
|
||||
0:? 'g_tTexcdf4a' (uniform textureCubeArray)
|
||||
0:? 'g_tTexcdi4a' (uniform itextureCubeArray)
|
||||
0:? 'g_tTexcdu4a' (uniform utextureCubeArray)
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
@@ -208,7 +209,7 @@ gl_FragCoord origin is upper left
|
||||
0:40 1.000000
|
||||
0:42 Sequence
|
||||
0:42 move second child to first child (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (layout(location=0 ) out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Branch: Return
|
||||
0:? Linker Objects
|
||||
@@ -223,18 +224,19 @@ gl_FragCoord origin is upper left
|
||||
0:? 'g_tTexcdf4a' (uniform textureCubeArray)
|
||||
0:? 'g_tTexcdi4a' (uniform itextureCubeArray)
|
||||
0:? 'g_tTexcdu4a' (uniform utextureCubeArray)
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 112
|
||||
// Id's are bound by 116
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 99
|
||||
EntryPoint Fragment 4 "main" 99 113 115
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval20"
|
||||
@@ -259,6 +261,8 @@ gl_FragCoord origin is upper left
|
||||
Name 105 "g_tTex1df4"
|
||||
Name 108 "g_tTex1di4a"
|
||||
Name 111 "g_tTex1du4a"
|
||||
Name 113 "Color"
|
||||
Name 115 "Depth"
|
||||
Decorate 12(g_tTex2df4a) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) Binding 0
|
||||
@@ -268,13 +272,14 @@ gl_FragCoord origin is upper left
|
||||
Decorate 70(g_tTexcdi4a) DescriptorSet 0
|
||||
Decorate 80(g_tTexcdu4a) DescriptorSet 0
|
||||
MemberDecorate 90(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 99(@entryPointOutput) Location 0
|
||||
Decorate 104(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 104(g_tTex1df4a) Binding 1
|
||||
Decorate 105(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 105(g_tTex1df4) Binding 0
|
||||
Decorate 108(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 111(g_tTex1du4a) DescriptorSet 0
|
||||
Decorate 113(Color) Location 0
|
||||
Decorate 115(Depth) BuiltIn FragDepth
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -348,6 +353,10 @@ gl_FragCoord origin is upper left
|
||||
109: TypeImage 42(int) 1D array sampled format:Unknown
|
||||
110: TypePointer UniformConstant 109
|
||||
111(g_tTex1du4a): 110(ptr) Variable UniformConstant
|
||||
112: TypePointer Output 7(fvec4)
|
||||
113(Color): 112(ptr) Variable Output
|
||||
114: TypePointer Output 6(float)
|
||||
115(Depth): 114(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval20): 8(ptr) Variable Function
|
||||
|
||||
Reference in New Issue
Block a user