HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
@@ -91,10 +91,20 @@ gl_FragCoord origin is upper left
|
||||
0:40 1 (const int)
|
||||
0:40 Constant:
|
||||
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' (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:? Sequence
|
||||
0:? Sequence
|
||||
0:42 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:42 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Constant:
|
||||
0:42 0 (const int)
|
||||
0:42 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:42 Depth: direct index for structure (temp float FragDepth)
|
||||
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Constant:
|
||||
0:42 1 (const int)
|
||||
0:42 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -207,10 +217,20 @@ gl_FragCoord origin is upper left
|
||||
0:40 1 (const int)
|
||||
0:40 Constant:
|
||||
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' (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:? Sequence
|
||||
0:? Sequence
|
||||
0:42 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:42 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Constant:
|
||||
0:42 0 (const int)
|
||||
0:42 move second child to first child (temp float)
|
||||
0:? 'Depth' (out float FragDepth)
|
||||
0:42 Depth: direct index for structure (temp float FragDepth)
|
||||
0:42 'psout' (temp structure{temp 4-component vector of float Color, temp float FragDepth Depth})
|
||||
0:42 Constant:
|
||||
0:42 1 (const int)
|
||||
0:42 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'g_sSamp' (layout(binding=0 ) uniform sampler)
|
||||
@@ -229,14 +249,14 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 116
|
||||
// Id's are bound by 117
|
||||
|
||||
Capability Shader
|
||||
Capability Sampled1D
|
||||
Capability SampledCubeArray
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 99 113 115
|
||||
EntryPoint Fragment 4 "main" 99 103
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "txval20"
|
||||
@@ -256,13 +276,12 @@ gl_FragCoord origin is upper left
|
||||
MemberName 90(PS_OUTPUT) 0 "Color"
|
||||
MemberName 90(PS_OUTPUT) 1 "Depth"
|
||||
Name 92 "psout"
|
||||
Name 99 "@entryPointOutput"
|
||||
Name 104 "g_tTex1df4a"
|
||||
Name 105 "g_tTex1df4"
|
||||
Name 108 "g_tTex1di4a"
|
||||
Name 111 "g_tTex1du4a"
|
||||
Name 113 "Color"
|
||||
Name 115 "Depth"
|
||||
Name 99 "Color"
|
||||
Name 103 "Depth"
|
||||
Name 109 "g_tTex1df4a"
|
||||
Name 110 "g_tTex1df4"
|
||||
Name 113 "g_tTex1di4a"
|
||||
Name 116 "g_tTex1du4a"
|
||||
Decorate 12(g_tTex2df4a) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) DescriptorSet 0
|
||||
Decorate 16(g_sSamp) Binding 0
|
||||
@@ -272,14 +291,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 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
|
||||
Decorate 99(Color) Location 0
|
||||
Decorate 103(Depth) BuiltIn FragDepth
|
||||
Decorate 109(g_tTex1df4a) DescriptorSet 0
|
||||
Decorate 109(g_tTex1df4a) Binding 1
|
||||
Decorate 110(g_tTex1df4) DescriptorSet 0
|
||||
Decorate 110(g_tTex1df4) Binding 0
|
||||
Decorate 113(g_tTex1di4a) DescriptorSet 0
|
||||
Decorate 116(g_tTex1du4a) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -341,22 +360,20 @@ gl_FragCoord origin is upper left
|
||||
93: 7(fvec4) ConstantComposite 87 87 87 87
|
||||
95: 25(int) Constant 1
|
||||
96: TypePointer Function 6(float)
|
||||
98: TypePointer Output 90(PS_OUTPUT)
|
||||
99(@entryPointOutput): 98(ptr) Variable Output
|
||||
102: TypeImage 6(float) 1D array sampled format:Unknown
|
||||
103: TypePointer UniformConstant 102
|
||||
104(g_tTex1df4a): 103(ptr) Variable UniformConstant
|
||||
105(g_tTex1df4): 103(ptr) Variable UniformConstant
|
||||
106: TypeImage 25(int) 1D array sampled format:Unknown
|
||||
107: TypePointer UniformConstant 106
|
||||
108(g_tTex1di4a): 107(ptr) Variable UniformConstant
|
||||
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
|
||||
98: TypePointer Output 7(fvec4)
|
||||
99(Color): 98(ptr) Variable Output
|
||||
102: TypePointer Output 6(float)
|
||||
103(Depth): 102(ptr) Variable Output
|
||||
107: TypeImage 6(float) 1D array sampled format:Unknown
|
||||
108: TypePointer UniformConstant 107
|
||||
109(g_tTex1df4a): 108(ptr) Variable UniformConstant
|
||||
110(g_tTex1df4): 108(ptr) Variable UniformConstant
|
||||
111: TypeImage 25(int) 1D array sampled format:Unknown
|
||||
112: TypePointer UniformConstant 111
|
||||
113(g_tTex1di4a): 112(ptr) Variable UniformConstant
|
||||
114: TypeImage 42(int) 1D array sampled format:Unknown
|
||||
115: TypePointer UniformConstant 114
|
||||
116(g_tTex1du4a): 115(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(txval20): 8(ptr) Variable Function
|
||||
@@ -400,7 +417,11 @@ gl_FragCoord origin is upper left
|
||||
Store 94 93
|
||||
97: 96(ptr) AccessChain 92(psout) 95
|
||||
Store 97 87
|
||||
100:90(PS_OUTPUT) Load 92(psout)
|
||||
Store 99(@entryPointOutput) 100
|
||||
100: 8(ptr) AccessChain 92(psout) 26
|
||||
101: 7(fvec4) Load 100
|
||||
Store 99(Color) 101
|
||||
104: 96(ptr) AccessChain 92(psout) 95
|
||||
105: 6(float) Load 104
|
||||
Store 103(Depth) 105
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user