HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
@@ -130,10 +130,20 @@ gl_FragCoord origin is upper left
|
||||
0:36 1 (const int)
|
||||
0:36 Constant:
|
||||
0:36 1.000000
|
||||
0:38 Sequence
|
||||
0:38 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:38 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:38 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:38 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:38 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:38 Constant:
|
||||
0:38 0 (const int)
|
||||
0:38 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:38 Depth: direct index for structure (temp float FragDepth)
|
||||
0:38 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:38 Constant:
|
||||
0:38 1 (const int)
|
||||
0:38 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -285,10 +295,20 @@ gl_FragCoord origin is upper left
|
||||
0:36 1 (const int)
|
||||
0:36 Constant:
|
||||
0:36 1.000000
|
||||
0:38 Sequence
|
||||
0:38 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:38 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:38 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:38 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:38 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:38 Constant:
|
||||
0:38 0 (const int)
|
||||
0:38 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:38 Depth: direct index for structure (temp float FragDepth)
|
||||
0:38 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:38 Constant:
|
||||
0:38 1 (const int)
|
||||
0:38 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -307,14 +327,14 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 112
|
||||
// Id's are bound by 113
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 95 109 111
|
||||
EntryPoint Fragment 4 "main" 95 99
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval10"
|
||||
@@ -334,13 +354,12 @@ gl_FragCoord origin is upper left
|
||||
MemberName 86(PS_OUTPUT) 0 "Color"
|
||||
MemberName 86(PS_OUTPUT) 1 "Depth"
|
||||
Name 88 "psout"
|
||||
Name 95 "@entryPointOutput"
|
||||
Name 98 "g_tTex1df4a"
|
||||
Name 101 "g_tTexcdf4"
|
||||
Name 104 "g_tTexcdi4"
|
||||
Name 107 "g_tTexcdu4"
|
||||
Name 109 "Color"
|
||||
Name 111 "Depth"
|
||||
Name 95 "Color"
|
||||
Name 99 "Depth"
|
||||
Name 103 "g_tTex1df4a"
|
||||
Name 106 "g_tTexcdf4"
|
||||
Name 109 "g_tTexcdi4"
|
||||
Name 112 "g_tTexcdu4"
|
||||
Decorate 12(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 12(g_tTex1df4) Binding 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
@@ -351,13 +370,13 @@ gl_FragCoord origin is upper left
|
||||
Decorate 71(g_tTex2di4) DescriptorSet 0
|
||||
Decorate 80(g_tTex2du4) DescriptorSet 0
|
||||
MemberDecorate 86(PS_OUTPUT) 1 BuiltIn FragDepth
|
||||
Decorate 98(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 98(g_tTex1df4a) Binding 1
|
||||
Decorate 101(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 104(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 107(g_tTexcdu4) DescriptorSet 0
|
||||
Decorate 109(Color) Location 0
|
||||
Decorate 111(Depth) BuiltIn FragDepth
|
||||
Decorate 95(Color) Location 0
|
||||
Decorate 99(Depth) BuiltIn FragDepth
|
||||
Decorate 103(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 103(g_tTex1df4a) Binding 1
|
||||
Decorate 106(g_tTexcdf4) DescriptorSet 0
|
||||
Decorate 109(g_tTexcdi4) DescriptorSet 0
|
||||
Decorate 112(g_tTexcdu4) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -415,22 +434,20 @@ gl_FragCoord origin is upper left
|
||||
89: 6(float) Constant 1065353216
|
||||
90: 7(fvec4) ConstantComposite 89 89 89 89
|
||||
92: TypePointer Function 6(float)
|
||||
94: TypePointer Output 86(PS_OUTPUT)
|
||||
95(@entryPointOutput): 94(ptr) Variable Output
|
||||
98(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
99: TypeImage 6(float) Cube array sampled format:Unknown
|
||||
100: TypePointer UniformConstant 99
|
||||
101(g_tTexcdf4): 100(ptr) Variable UniformConstant
|
||||
102: TypeImage 26(int) Cube array sampled format:Unknown
|
||||
103: TypePointer UniformConstant 102
|
||||
104(g_tTexcdi4): 103(ptr) Variable UniformConstant
|
||||
105: TypeImage 40(int) Cube array sampled format:Unknown
|
||||
106: TypePointer UniformConstant 105
|
||||
107(g_tTexcdu4): 106(ptr) Variable UniformConstant
|
||||
108: TypePointer Output 7(fvec4)
|
||||
109(Color): 108(ptr) Variable Output
|
||||
110: TypePointer Output 6(float)
|
||||
111(Depth): 110(ptr) Variable Output
|
||||
94: TypePointer Output 7(fvec4)
|
||||
95(Color): 94(ptr) Variable Output
|
||||
98: TypePointer Output 6(float)
|
||||
99(Depth): 98(ptr) Variable Output
|
||||
103(g_tTex1df4a): 11(ptr) Variable UniformConstant
|
||||
104: TypeImage 6(float) Cube array sampled format:Unknown
|
||||
105: TypePointer UniformConstant 104
|
||||
106(g_tTexcdf4): 105(ptr) Variable UniformConstant
|
||||
107: TypeImage 26(int) Cube array sampled format:Unknown
|
||||
108: TypePointer UniformConstant 107
|
||||
109(g_tTexcdi4): 108(ptr) Variable UniformConstant
|
||||
110: TypeImage 40(int) Cube array sampled format:Unknown
|
||||
111: TypePointer UniformConstant 110
|
||||
112(g_tTexcdu4): 111(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval10): 8(ptr) Variable Function
|
||||
@@ -474,7 +491,11 @@ gl_FragCoord origin is upper left
|
||||
Store 91 90
|
||||
93: 92(ptr) AccessChain 88(psout) 27
|
||||
Store 93 89
|
||||
96:86(PS_OUTPUT) Load 88(psout)
|
||||
Store 95(@entryPointOutput) 96
|
||||
96: 8(ptr) AccessChain 88(psout) 65
|
||||
97: 7(fvec4) Load 96
|
||||
Store 95(Color) 97
|
||||
100: 92(ptr) AccessChain 88(psout) 27
|
||||
101: 6(float) Load 100
|
||||
Store 99(Depth) 101
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user