HLSL: Flatten structs for all non-arrayed I/O interfaces.
This commit is contained in:
parent
01109546d8
commit
e29ff3cd65
15 changed files with 749 additions and 862 deletions
|
|
@ -57,10 +57,7 @@ gl_FragCoord origin is upper left
|
|||
0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
|
||||
0:13 Constant:
|
||||
0:13 0 (const int)
|
||||
0:13 v: direct index for structure ( temp 2-component vector of float)
|
||||
0:13 'i' (layout( location=0) in structure{ temp 2-component vector of float v, flat temp 2-component vector of int i2})
|
||||
0:13 Constant:
|
||||
0:13 0 (const int)
|
||||
0:? 'i.v' (layout( location=0) in 2-component vector of float)
|
||||
0:13 move second child to first child ( temp 4-component vector of float)
|
||||
0:13 fragCoord: direct index for structure ( temp 4-component vector of float)
|
||||
0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
|
||||
|
|
@ -72,10 +69,7 @@ gl_FragCoord origin is upper left
|
|||
0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
|
||||
0:13 Constant:
|
||||
0:13 2 (const int)
|
||||
0:13 i2: direct index for structure ( flat temp 2-component vector of int)
|
||||
0:13 'i' (layout( location=0) in structure{ temp 2-component vector of float v, flat temp 2-component vector of int i2})
|
||||
0:13 Constant:
|
||||
0:13 1 (const int)
|
||||
0:? 'i.i2' (layout( location=1) flat in 2-component vector of int)
|
||||
0:13 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
0:13 Function Call: @PixelShaderFunction(struct-InParam-vf2-vf4-vi21; ( temp 4-component vector of float)
|
||||
|
|
@ -83,7 +77,8 @@ gl_FragCoord origin is upper left
|
|||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
0:? 'i.fragCoord' ( in 4-component vector of float FragCoord)
|
||||
0:? 'i' (layout( location=0) in structure{ temp 2-component vector of float v, flat temp 2-component vector of int i2})
|
||||
0:? 'i.v' (layout( location=0) in 2-component vector of float)
|
||||
0:? 'i.i2' (layout( location=1) flat in 2-component vector of int)
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
|
@ -147,10 +142,7 @@ gl_FragCoord origin is upper left
|
|||
0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
|
||||
0:13 Constant:
|
||||
0:13 0 (const int)
|
||||
0:13 v: direct index for structure ( temp 2-component vector of float)
|
||||
0:13 'i' (layout( location=0) in structure{ temp 2-component vector of float v, flat temp 2-component vector of int i2})
|
||||
0:13 Constant:
|
||||
0:13 0 (const int)
|
||||
0:? 'i.v' (layout( location=0) in 2-component vector of float)
|
||||
0:13 move second child to first child ( temp 4-component vector of float)
|
||||
0:13 fragCoord: direct index for structure ( temp 4-component vector of float)
|
||||
0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
|
||||
|
|
@ -162,10 +154,7 @@ gl_FragCoord origin is upper left
|
|||
0:? 'i' ( temp structure{ temp 2-component vector of float v, temp 4-component vector of float fragCoord, temp 2-component vector of int i2})
|
||||
0:13 Constant:
|
||||
0:13 2 (const int)
|
||||
0:13 i2: direct index for structure ( flat temp 2-component vector of int)
|
||||
0:13 'i' (layout( location=0) in structure{ temp 2-component vector of float v, flat temp 2-component vector of int i2})
|
||||
0:13 Constant:
|
||||
0:13 1 (const int)
|
||||
0:? 'i.i2' (layout( location=1) flat in 2-component vector of int)
|
||||
0:13 move second child to first child ( temp 4-component vector of float)
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
0:13 Function Call: @PixelShaderFunction(struct-InParam-vf2-vf4-vi21; ( temp 4-component vector of float)
|
||||
|
|
@ -173,16 +162,17 @@ gl_FragCoord origin is upper left
|
|||
0:? Linker Objects
|
||||
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
|
||||
0:? 'i.fragCoord' ( in 4-component vector of float FragCoord)
|
||||
0:? 'i' (layout( location=0) in structure{ temp 2-component vector of float v, flat temp 2-component vector of int i2})
|
||||
0:? 'i.v' (layout( location=0) in 2-component vector of float)
|
||||
0:? 'i.i2' (layout( location=1) flat in 2-component vector of int)
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 77
|
||||
// Id's are bound by 74
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 56 63 73
|
||||
EntryPoint Fragment 4 "PixelShaderFunction" 55 60 65 70
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source HLSL 500
|
||||
Name 4 "PixelShaderFunction"
|
||||
|
|
@ -200,17 +190,16 @@ gl_FragCoord origin is upper left
|
|||
Name 40 "ret2"
|
||||
Name 41 "param"
|
||||
Name 53 "i"
|
||||
Name 54 "InParam"
|
||||
MemberName 54(InParam) 0 "v"
|
||||
MemberName 54(InParam) 1 "i2"
|
||||
Name 56 "i"
|
||||
Name 63 "i.fragCoord"
|
||||
Name 73 "@entryPointOutput"
|
||||
Name 74 "param"
|
||||
MemberDecorate 54(InParam) 1 Flat
|
||||
Decorate 56(i) Location 0
|
||||
Decorate 63(i.fragCoord) BuiltIn FragCoord
|
||||
Decorate 73(@entryPointOutput) Location 0
|
||||
Name 55 "i.v"
|
||||
Name 60 "i.fragCoord"
|
||||
Name 65 "i.i2"
|
||||
Name 70 "@entryPointOutput"
|
||||
Name 71 "param"
|
||||
Decorate 55(i.v) Location 0
|
||||
Decorate 60(i.fragCoord) BuiltIn FragCoord
|
||||
Decorate 65(i.i2) Flat
|
||||
Decorate 65(i.i2) Location 1
|
||||
Decorate 70(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
|
@ -229,37 +218,34 @@ gl_FragCoord origin is upper left
|
|||
27: 9(int) Constant 1
|
||||
28: 22(int) Constant 0
|
||||
44: TypePointer Function 8(fvec4)
|
||||
54(InParam): TypeStruct 7(fvec2) 10(ivec2)
|
||||
55: TypePointer Input 54(InParam)
|
||||
56(i): 55(ptr) Variable Input
|
||||
57: TypePointer Input 7(fvec2)
|
||||
60: TypePointer Function 7(fvec2)
|
||||
62: TypePointer Input 8(fvec4)
|
||||
63(i.fragCoord): 62(ptr) Variable Input
|
||||
66: 9(int) Constant 2
|
||||
67: TypePointer Input 10(ivec2)
|
||||
70: TypePointer Function 10(ivec2)
|
||||
72: TypePointer Output 8(fvec4)
|
||||
73(@entryPointOutput): 72(ptr) Variable Output
|
||||
54: TypePointer Input 7(fvec2)
|
||||
55(i.v): 54(ptr) Variable Input
|
||||
57: TypePointer Function 7(fvec2)
|
||||
59: TypePointer Input 8(fvec4)
|
||||
60(i.fragCoord): 59(ptr) Variable Input
|
||||
63: 9(int) Constant 2
|
||||
64: TypePointer Input 10(ivec2)
|
||||
65(i.i2): 64(ptr) Variable Input
|
||||
67: TypePointer Function 10(ivec2)
|
||||
69: TypePointer Output 8(fvec4)
|
||||
70(@entryPointOutput): 69(ptr) Variable Output
|
||||
4(PixelShaderFunction): 2 Function None 3
|
||||
5: Label
|
||||
53(i): 12(ptr) Variable Function
|
||||
74(param): 12(ptr) Variable Function
|
||||
58: 57(ptr) AccessChain 56(i) 21
|
||||
59: 7(fvec2) Load 58
|
||||
61: 60(ptr) AccessChain 53(i) 21
|
||||
Store 61 59
|
||||
64: 8(fvec4) Load 63(i.fragCoord)
|
||||
65: 44(ptr) AccessChain 53(i) 27
|
||||
Store 65 64
|
||||
68: 67(ptr) AccessChain 56(i) 27
|
||||
69: 10(ivec2) Load 68
|
||||
71: 70(ptr) AccessChain 53(i) 66
|
||||
Store 71 69
|
||||
75: 11(InParam) Load 53(i)
|
||||
Store 74(param) 75
|
||||
76: 8(fvec4) FunctionCall 19(@PixelShaderFunction(struct-InParam-vf2-vf4-vi21;) 74(param)
|
||||
Store 73(@entryPointOutput) 76
|
||||
71(param): 12(ptr) Variable Function
|
||||
56: 7(fvec2) Load 55(i.v)
|
||||
58: 57(ptr) AccessChain 53(i) 21
|
||||
Store 58 56
|
||||
61: 8(fvec4) Load 60(i.fragCoord)
|
||||
62: 44(ptr) AccessChain 53(i) 27
|
||||
Store 62 61
|
||||
66: 10(ivec2) Load 65(i.i2)
|
||||
68: 67(ptr) AccessChain 53(i) 63
|
||||
Store 68 66
|
||||
72: 11(InParam) Load 53(i)
|
||||
Store 71(param) 72
|
||||
73: 8(fvec4) FunctionCall 19(@PixelShaderFunction(struct-InParam-vf2-vf4-vi21;) 71(param)
|
||||
Store 70(@entryPointOutput) 73
|
||||
Return
|
||||
FunctionEnd
|
||||
15(fun(struct-InParam-vf2-vf4-vi21;): 6(float) Function None 13
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue