HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.
This commit is contained in:
@@ -2772,10 +2772,14 @@ gl_FragCoord origin is upper left
|
||||
0:491 1.000000
|
||||
0:491 1.000000
|
||||
0:491 1.000000
|
||||
0:492 Sequence
|
||||
0:492 move second child to first child (temp structure{temp 4-component vector of float color})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float color})
|
||||
0:492 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:492 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:492 color: direct index for structure (temp 4-component vector of float)
|
||||
0:492 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:492 Constant:
|
||||
0:492 0 (const int)
|
||||
0:492 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'gs_ua' (global uint)
|
||||
@@ -5569,10 +5573,14 @@ gl_FragCoord origin is upper left
|
||||
0:491 1.000000
|
||||
0:491 1.000000
|
||||
0:491 1.000000
|
||||
0:492 Sequence
|
||||
0:492 move second child to first child (temp structure{temp 4-component vector of float color})
|
||||
0:? '@entryPointOutput' (out structure{temp 4-component vector of float color})
|
||||
0:492 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:? Sequence
|
||||
0:? Sequence
|
||||
0:492 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:492 color: direct index for structure (temp 4-component vector of float)
|
||||
0:492 'ps_output' (temp structure{temp 4-component vector of float color})
|
||||
0:492 Constant:
|
||||
0:492 0 (const int)
|
||||
0:492 Branch: Return
|
||||
0:? Linker Objects
|
||||
0:? 'gs_ua' (global uint)
|
||||
@@ -5591,13 +5599,13 @@ gl_FragCoord origin is upper left
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 1826
|
||||
// Id's are bound by 1825
|
||||
|
||||
Capability Shader
|
||||
Capability DerivativeControl
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 1805 1825
|
||||
EntryPoint Fragment 4 "main" 1805
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 16 "PixelShaderFunctionS(f1;f1;f1;u1;u1;"
|
||||
@@ -6111,21 +6119,20 @@ gl_FragCoord origin is upper left
|
||||
Name 1798 "PS_OUTPUT"
|
||||
MemberName 1798(PS_OUTPUT) 0 "color"
|
||||
Name 1800 "ps_output"
|
||||
Name 1805 "@entryPointOutput"
|
||||
Name 1809 "gs_ua"
|
||||
Name 1810 "gs_ub"
|
||||
Name 1811 "gs_uc"
|
||||
Name 1813 "gs_ua2"
|
||||
Name 1814 "gs_ub2"
|
||||
Name 1815 "gs_uc2"
|
||||
Name 1817 "gs_ua3"
|
||||
Name 1818 "gs_ub3"
|
||||
Name 1819 "gs_uc3"
|
||||
Name 1821 "gs_ua4"
|
||||
Name 1822 "gs_ub4"
|
||||
Name 1823 "gs_uc4"
|
||||
Name 1825 "color"
|
||||
Decorate 1825(color) Location 0
|
||||
Name 1805 "color"
|
||||
Name 1810 "gs_ua"
|
||||
Name 1811 "gs_ub"
|
||||
Name 1812 "gs_uc"
|
||||
Name 1814 "gs_ua2"
|
||||
Name 1815 "gs_ub2"
|
||||
Name 1816 "gs_uc2"
|
||||
Name 1818 "gs_ua3"
|
||||
Name 1819 "gs_ub3"
|
||||
Name 1820 "gs_uc3"
|
||||
Name 1822 "gs_ua4"
|
||||
Name 1823 "gs_ub4"
|
||||
Name 1824 "gs_uc4"
|
||||
Decorate 1805(color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
@@ -6241,33 +6248,32 @@ gl_FragCoord origin is upper left
|
||||
1799: TypePointer Function 1798(PS_OUTPUT)
|
||||
1801: 148(int) Constant 0
|
||||
1802: 48(fvec4) ConstantComposite 284 284 284 284
|
||||
1804: TypePointer Output 1798(PS_OUTPUT)
|
||||
1805(@entryPointOutput): 1804(ptr) Variable Output
|
||||
1808: TypePointer Private 8(int)
|
||||
1809(gs_ua): 1808(ptr) Variable Private
|
||||
1810(gs_ub): 1808(ptr) Variable Private
|
||||
1811(gs_uc): 1808(ptr) Variable Private
|
||||
1812: TypePointer Private 26(ivec2)
|
||||
1813(gs_ua2): 1812(ptr) Variable Private
|
||||
1814(gs_ub2): 1812(ptr) Variable Private
|
||||
1815(gs_uc2): 1812(ptr) Variable Private
|
||||
1816: TypePointer Private 38(ivec3)
|
||||
1817(gs_ua3): 1816(ptr) Variable Private
|
||||
1818(gs_ub3): 1816(ptr) Variable Private
|
||||
1819(gs_uc3): 1816(ptr) Variable Private
|
||||
1820: TypePointer Private 50(ivec4)
|
||||
1821(gs_ua4): 1820(ptr) Variable Private
|
||||
1822(gs_ub4): 1820(ptr) Variable Private
|
||||
1823(gs_uc4): 1820(ptr) Variable Private
|
||||
1824: TypePointer Output 48(fvec4)
|
||||
1825(color): 1824(ptr) Variable Output
|
||||
1804: TypePointer Output 48(fvec4)
|
||||
1805(color): 1804(ptr) Variable Output
|
||||
1809: TypePointer Private 8(int)
|
||||
1810(gs_ua): 1809(ptr) Variable Private
|
||||
1811(gs_ub): 1809(ptr) Variable Private
|
||||
1812(gs_uc): 1809(ptr) Variable Private
|
||||
1813: TypePointer Private 26(ivec2)
|
||||
1814(gs_ua2): 1813(ptr) Variable Private
|
||||
1815(gs_ub2): 1813(ptr) Variable Private
|
||||
1816(gs_uc2): 1813(ptr) Variable Private
|
||||
1817: TypePointer Private 38(ivec3)
|
||||
1818(gs_ua3): 1817(ptr) Variable Private
|
||||
1819(gs_ub3): 1817(ptr) Variable Private
|
||||
1820(gs_uc3): 1817(ptr) Variable Private
|
||||
1821: TypePointer Private 50(ivec4)
|
||||
1822(gs_ua4): 1821(ptr) Variable Private
|
||||
1823(gs_ub4): 1821(ptr) Variable Private
|
||||
1824(gs_uc4): 1821(ptr) Variable Private
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
1800(ps_output): 1799(ptr) Variable Function
|
||||
1803: 49(ptr) AccessChain 1800(ps_output) 1801
|
||||
Store 1803 1802
|
||||
1806:1798(PS_OUTPUT) Load 1800(ps_output)
|
||||
Store 1805(@entryPointOutput) 1806
|
||||
1806: 49(ptr) AccessChain 1800(ps_output) 1801
|
||||
1807: 48(fvec4) Load 1806
|
||||
Store 1805(color) 1807
|
||||
Return
|
||||
FunctionEnd
|
||||
16(PixelShaderFunctionS(f1;f1;f1;u1;u1;): 6(float) Function None 10
|
||||
|
||||
Reference in New Issue
Block a user