HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
@@ -100,10 +100,20 @@ gl_FragCoord origin is upper left
|
||||
0:34 1 (const int)
|
||||
0:34 Constant:
|
||||
0:34 1.000000
|
||||
0:36 Sequence
|
||||
0:36 move second child to first child (temp 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:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:36 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:36 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:36 Constant:
|
||||
0:36 0 (const int)
|
||||
0:36 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:36 Depth: direct index for structure (temp float FragDepth)
|
||||
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:36 Constant:
|
||||
0:36 1 (const int)
|
||||
0:36 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -222,10 +232,20 @@ gl_FragCoord origin is upper left
|
||||
0:34 1 (const int)
|
||||
0:34 Constant:
|
||||
0:34 1.000000
|
||||
0:36 Sequence
|
||||
0:36 move second child to first child (temp 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:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:36 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:36 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:36 Constant:
|
||||
0:36 0 (const int)
|
||||
0:36 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:36 Depth: direct index for structure (temp float FragDepth)
|
||||
0:36 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:36 Constant:
|
||||
0:36 1 (const int)
|
||||
0:36 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -241,13 +261,13 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 110
|
||||
// Id's are bound by 111
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 102 107 109
|
||||
EntryPoint Fragment 4 "main" 102 106
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval10"
|
||||
@@ -267,10 +287,9 @@ gl_FragCoord origin is upper left
|
||||
MemberName 93(PS_OUTPUT) 0 "Color"
|
||||
MemberName 93(PS_OUTPUT) 1 "Depth"
|
||||
Name 95 "psout"
|
||||
Name 102 "@entryPointOutput"
|
||||
Name 105 "g_tTex1df4a"
|
||||
Name 107 "Color"
|
||||
Name 109 "Depth"
|
||||
Name 102 "Color"
|
||||
Name 106 "Depth"
|
||||
Name 110 "g_tTex1df4a"
|
||||
Decorate 12(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 12(g_tTex1df4) Binding 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
@@ -281,10 +300,10 @@ gl_FragCoord origin is upper left
|
||||
Decorate 72(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 83(g_tTex2du4) DescriptorSet 0
|
||||
MemberDecorate 93(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 105(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 105(g_tTex1df4a) Binding 1
|
||||
Decorate 107(Color) Location 0
|
||||
Decorate 109(Depth) BuiltIn FragDepth
|
||||
Decorate 102(Color) Location 0
|
||||
Decorate 106(Depth) BuiltIn FragDepth
|
||||
Decorate 110(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 110(g_tTex1df4a) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -349,13 +368,11 @@ gl_FragCoord origin is upper left
|
||||
96: 6(float) Constant 1065353216
|
||||
97: 7(fvec4) ConstantComposite 96 96 96 96
|
||||
99: TypePointer Function 6(float)
|
||||
101: TypePointer Output 93(PS_OUTPUT)
|
||||
102(@entryPointOutput): 101(ptr) Variable Output
|
||||
105(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
106: TypePointer Output 7(fvec4)
|
||||
107(Color): 106(ptr) Variable Output
|
||||
108: TypePointer Output 6(float)
|
||||
109(Depth): 108(ptr) Variable Output
|
||||
101: TypePointer Output 7(fvec4)
|
||||
102(Color): 101(ptr) Variable Output
|
||||
105: TypePointer Output 6(float)
|
||||
106(Depth): 105(ptr) Variable Output
|
||||
110(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval10): 8(ptr) Variable Function
|
||||
@@ -399,7 +416,11 @@ gl_FragCoord origin is upper left
|
||||
Store 98 97
|
||||
100: 99(ptr) AccessChain 95(psout) 39
|
||||
Store 100 96
|
||||
103:93(PS_OUTPUT) Load 95(psout)
|
||||
Store 102(@entryPointOutput) 103
|
||||
103: 8(ptr) AccessChain 95(psout) 25
|
||||
104: 7(fvec4) Load 103
|
||||
Store 102(Color) 104
|
||||
107: 99(ptr) AccessChain 95(psout) 39
|
||||
108: 6(float) Load 107
|
||||
Store 106(Depth) 108
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user