HLSL: Allow use of $Global members in between function calls.

This allows global initializers to use $Global members.
This commit is contained in:
John Kessenich 2017-03-22 23:21:34 -06:00
parent 7a41f96d10
commit 000c818efb
53 changed files with 4566 additions and 4558 deletions

View file

@ -45,13 +45,13 @@ using depth_greater
0:15 Constant:
0:15 3 (const int)
0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal} t})
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform structure{layout( offset=68) temp float f, temp float g, temp float d, temp 4-component vector of float normal} s})
0:? 'anon@1' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal} t})
0:? 'f' (layout( location=0) out float)
0:? 'g' (layout( location=1) out float)
0:? 'd' ( out float FragDepth)
0:? 'normal' (layout( location=2) out 4-component vector of float)
0:? 't' (layout( location=0) in structure{ temp float f, centroid temp float g, temp float d, temp 4-component vector of float normal})
0:? 'anon@1' (layout( row_major std140) uniform block{layout( offset=0) uniform structure{layout( offset=68) temp float f, temp float g, temp float d, temp 4-component vector of float normal} s})
Linked fragment stage:
@ -103,13 +103,13 @@ using depth_greater
0:15 Constant:
0:15 3 (const int)
0:? Linker Objects
0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal} t})
0:? 'anon@0' (layout( row_major std140) uniform block{ uniform structure{layout( offset=68) temp float f, temp float g, temp float d, temp 4-component vector of float normal} s})
0:? 'anon@1' (layout( row_major std140) uniform block{layout( row_major std140 offset=88) uniform structure{ temp float f, temp float g, temp float d, temp 4-component vector of float normal} t})
0:? 'f' (layout( location=0) out float)
0:? 'g' (layout( location=1) out float)
0:? 'd' ( out float FragDepth)
0:? 'normal' (layout( location=2) out 4-component vector of float)
0:? 't' (layout( location=0) in structure{ temp float f, centroid temp float g, temp float d, temp 4-component vector of float normal})
0:? 'anon@1' (layout( row_major std140) uniform block{layout( offset=0) uniform structure{layout( offset=68) temp float f, temp float g, temp float d, temp 4-component vector of float normal} s})
// Module Version 10000
// Generated by (magic number): 80001
@ -148,16 +148,16 @@ using depth_greater
MemberName 56(T) 1 "g"
MemberName 56(T) 2 "d"
MemberName 56(T) 3 "normal"
Name 57 "buff"
MemberName 57(buff) 0 "t"
Name 57 "$Global"
MemberName 57($Global) 0 "s"
Name 59 ""
Name 60 "T"
MemberName 60(T) 0 "f"
MemberName 60(T) 1 "g"
MemberName 60(T) 2 "d"
MemberName 60(T) 3 "normal"
Name 61 "$Global"
MemberName 61($Global) 0 "s"
Name 61 "buff"
MemberName 61(buff) 0 "t"
Name 63 ""
MemberDecorate 19(T) 1 Centroid
Decorate 21(t) Location 0
@ -165,19 +165,19 @@ using depth_greater
Decorate 46(g) Location 1
Decorate 49(d) BuiltIn FragDepth
Decorate 53(normal) Location 2
MemberDecorate 56(T) 0 Offset 0
MemberDecorate 56(T) 1 Offset 4
MemberDecorate 56(T) 2 Offset 8
MemberDecorate 56(T) 3 Offset 16
MemberDecorate 57(buff) 0 Offset 96
Decorate 57(buff) Block
MemberDecorate 56(T) 0 Offset 68
MemberDecorate 56(T) 1 Offset 72
MemberDecorate 56(T) 2 Offset 76
MemberDecorate 56(T) 3 Offset 80
MemberDecorate 57($Global) 0 Offset 0
Decorate 57($Global) Block
Decorate 59 DescriptorSet 0
MemberDecorate 60(T) 0 Offset 68
MemberDecorate 60(T) 1 Offset 72
MemberDecorate 60(T) 2 Offset 76
MemberDecorate 60(T) 3 Offset 80
MemberDecorate 61($Global) 0 Offset 0
Decorate 61($Global) Block
MemberDecorate 60(T) 0 Offset 0
MemberDecorate 60(T) 1 Offset 4
MemberDecorate 60(T) 2 Offset 8
MemberDecorate 60(T) 3 Offset 16
MemberDecorate 61(buff) 0 Offset 96
Decorate 61(buff) Block
Decorate 63 DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
@ -203,12 +203,12 @@ using depth_greater
52: TypePointer Output 7(fvec4)
53(normal): 52(ptr) Variable Output
56(T): TypeStruct 6(float) 6(float) 6(float) 7(fvec4)
57(buff): TypeStruct 56(T)
58: TypePointer Uniform 57(buff)
57($Global): TypeStruct 56(T)
58: TypePointer Uniform 57($Global)
59: 58(ptr) Variable Uniform
60(T): TypeStruct 6(float) 6(float) 6(float) 7(fvec4)
61($Global): TypeStruct 60(T)
62: TypePointer Uniform 61($Global)
61(buff): TypeStruct 60(T)
62: TypePointer Uniform 61(buff)
63: 62(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label