HLSL: Flatten whole-struct assigns and returns when targeting flattened I/O structs.

This commit is contained in:
John Kessenich
2016-09-16 03:05:12 -06:00
parent f8e494c18c
commit d21baed6bc
67 changed files with 4024 additions and 2886 deletions

View File

@@ -496,10 +496,14 @@ gl_FragCoord origin is upper left
0:199 Constant:
0:199 0 (const int)
0:199 'outval' (temp 4-component vector of float)
0:200 Sequence
0:200 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:200 'psout' (temp structure{temp 4-component vector of float Color})
0:? Sequence
0:? Sequence
0:200 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:200 Color: direct index for structure (temp 4-component vector of float)
0:200 'psout' (temp structure{temp 4-component vector of float Color})
0:200 Constant:
0:200 0 (const int)
0:200 Branch: Return
0:? Linker Objects
0:? 'i3' (uniform 3-component vector of int)
@@ -1015,10 +1019,14 @@ gl_FragCoord origin is upper left
0:199 Constant:
0:199 0 (const int)
0:199 'outval' (temp 4-component vector of float)
0:200 Sequence
0:200 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:200 'psout' (temp structure{temp 4-component vector of float Color})
0:? Sequence
0:? Sequence
0:200 move second child to first child (temp 4-component vector of float)
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
0:200 Color: direct index for structure (temp 4-component vector of float)
0:200 'psout' (temp structure{temp 4-component vector of float Color})
0:200 Constant:
0:200 0 (const int)
0:200 Branch: Return
0:? Linker Objects
0:? 'i3' (uniform 3-component vector of int)
@@ -1035,13 +1043,13 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 482
// Id's are bound by 481
Capability Shader
Capability Float64
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 477 481
EntryPoint Fragment 4 "main" 477
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 11 "Fn_F3(vf3;"
@@ -1130,9 +1138,8 @@ gl_FragCoord origin is upper left
Name 471 "PS_OUTPUT"
MemberName 471(PS_OUTPUT) 0 "Color"
Name 473 "psout"
Name 477 "@entryPointOutput"
Name 481 "Color"
Decorate 481(Color) Location 0
Name 477 "Color"
Decorate 477(Color) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
@@ -1203,10 +1210,8 @@ gl_FragCoord origin is upper left
465: 6(float) Constant 1080452710
471(PS_OUTPUT): TypeStruct 462(fvec4)
472: TypePointer Function 471(PS_OUTPUT)
476: TypePointer Output 471(PS_OUTPUT)
477(@entryPointOutput): 476(ptr) Variable Output
480: TypePointer Output 462(fvec4)
481(Color): 480(ptr) Variable Output
476: TypePointer Output 462(fvec4)
477(Color): 476(ptr) Variable Output
4(main): 2 Function None 3
5: Label
252(r00): 8(ptr) Variable Function
@@ -1472,8 +1477,9 @@ gl_FragCoord origin is upper left
474: 462(fvec4) Load 464(outval)
475: 463(ptr) AccessChain 473(psout) 149
Store 475 474
478:471(PS_OUTPUT) Load 473(psout)
Store 477(@entryPointOutput) 478
478: 463(ptr) AccessChain 473(psout) 149
479: 462(fvec4) Load 478
Store 477(Color) 479
Return
FunctionEnd
11(Fn_F3(vf3;): 2 Function None 9