HLSL: Wrap the entry-point; need to write 'in' args, and support 'inout' args.
This needs some render testing, but is destined to be part of master. This also leads to a variety of other simplifications. - IO are global symbols, so only need one list of linkage nodes (deferred) - no longer need parse-context-wide 'inEntryPoint' state, entry-point is localized - several parts of splitting/flattening are now localized
This commit is contained in:
@@ -2,7 +2,7 @@ hlsl.promote.binary.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:14 Function Definition: main( (temp structure{temp 4-component vector of float Color})
|
||||
0:14 Function Definition: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:14 Function Parameters:
|
||||
0:? Sequence
|
||||
0:15 mod (temp float)
|
||||
@@ -67,15 +67,18 @@ gl_FragCoord origin is upper left
|
||||
0:25 0.000000
|
||||
0:25 0.000000
|
||||
0:25 0.000000
|
||||
0:26 Sequence
|
||||
0:26 Sequence
|
||||
0:26 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:26 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:26 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 Branch: Return
|
||||
0:26 Branch: Return with expression
|
||||
0:26 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:14 Function Definition: main( (temp void)
|
||||
0:14 Function Parameters:
|
||||
0:? Sequence
|
||||
0:14 Sequence
|
||||
0:14 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:14 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:14 Function Call: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:14 Constant:
|
||||
0:14 0 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform bool bval, layout(offset=16 ) uniform 4-component vector of bool bval4, layout(offset=32 ) uniform int ival, layout(offset=48 ) uniform 4-component vector of int ival4, layout(offset=64 ) uniform float fval, layout(offset=80 ) uniform 4-component vector of float fval4})
|
||||
@@ -87,7 +90,7 @@ Linked fragment stage:
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:14 Function Definition: main( (temp structure{temp 4-component vector of float Color})
|
||||
0:14 Function Definition: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:14 Function Parameters:
|
||||
0:? Sequence
|
||||
0:15 mod (temp float)
|
||||
@@ -152,129 +155,139 @@ gl_FragCoord origin is upper left
|
||||
0:25 0.000000
|
||||
0:25 0.000000
|
||||
0:25 0.000000
|
||||
0:26 Sequence
|
||||
0:26 Sequence
|
||||
0:26 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:26 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:26 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:26 Constant:
|
||||
0:26 0 (const int)
|
||||
0:26 Branch: Return
|
||||
0:26 Branch: Return with expression
|
||||
0:26 'psout' (temp structure{temp 4-component vector of float Color})
|
||||
0:14 Function Definition: main( (temp void)
|
||||
0:14 Function Parameters:
|
||||
0:? Sequence
|
||||
0:14 Sequence
|
||||
0:14 move second child to first child (temp 4-component vector of float)
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:14 Color: direct index for structure (temp 4-component vector of float)
|
||||
0:14 Function Call: @main( (temp structure{temp 4-component vector of float Color})
|
||||
0:14 Constant:
|
||||
0:14 0 (const int)
|
||||
0:? Linker Objects
|
||||
0:? 'Color' (layout(location=0 ) out 4-component vector of float)
|
||||
0:? 'anon@0' (layout(row_major std140 ) uniform block{layout(offset=0 ) uniform bool bval, layout(offset=16 ) uniform 4-component vector of bool bval4, layout(offset=32 ) uniform int ival, layout(offset=48 ) uniform 4-component vector of int ival4, layout(offset=64 ) uniform float fval, layout(offset=80 ) uniform 4-component vector of float fval4})
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 78
|
||||
// Id's are bound by 83
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 74
|
||||
EntryPoint Fragment 4 "main" 80
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 12 "$Global"
|
||||
MemberName 12($Global) 0 "bval"
|
||||
MemberName 12($Global) 1 "bval4"
|
||||
MemberName 12($Global) 2 "ival"
|
||||
MemberName 12($Global) 3 "ival4"
|
||||
MemberName 12($Global) 4 "fval"
|
||||
MemberName 12($Global) 5 "fval4"
|
||||
Name 14 ""
|
||||
Name 62 "l_int"
|
||||
Name 68 "PS_OUTPUT"
|
||||
MemberName 68(PS_OUTPUT) 0 "Color"
|
||||
Name 70 "psout"
|
||||
Name 74 "Color"
|
||||
MemberDecorate 12($Global) 0 Offset 0
|
||||
MemberDecorate 12($Global) 1 Offset 16
|
||||
MemberDecorate 12($Global) 2 Offset 32
|
||||
MemberDecorate 12($Global) 3 Offset 48
|
||||
MemberDecorate 12($Global) 4 Offset 64
|
||||
MemberDecorate 12($Global) 5 Offset 80
|
||||
Decorate 12($Global) Block
|
||||
Decorate 14 DescriptorSet 0
|
||||
Decorate 74(Color) Location 0
|
||||
Name 8 "PS_OUTPUT"
|
||||
MemberName 8(PS_OUTPUT) 0 "Color"
|
||||
Name 10 "@main("
|
||||
Name 16 "$Global"
|
||||
MemberName 16($Global) 0 "bval"
|
||||
MemberName 16($Global) 1 "bval4"
|
||||
MemberName 16($Global) 2 "ival"
|
||||
MemberName 16($Global) 3 "ival4"
|
||||
MemberName 16($Global) 4 "fval"
|
||||
MemberName 16($Global) 5 "fval4"
|
||||
Name 18 ""
|
||||
Name 66 "l_int"
|
||||
Name 73 "psout"
|
||||
Name 80 "Color"
|
||||
MemberDecorate 16($Global) 0 Offset 0
|
||||
MemberDecorate 16($Global) 1 Offset 16
|
||||
MemberDecorate 16($Global) 2 Offset 32
|
||||
MemberDecorate 16($Global) 3 Offset 48
|
||||
MemberDecorate 16($Global) 4 Offset 64
|
||||
MemberDecorate 16($Global) 5 Offset 80
|
||||
Decorate 16($Global) Block
|
||||
Decorate 18 DescriptorSet 0
|
||||
Decorate 80(Color) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeVector 6(int) 4
|
||||
8: TypeInt 32 1
|
||||
9: TypeVector 8(int) 4
|
||||
10: TypeFloat 32
|
||||
11: TypeVector 10(float) 4
|
||||
12($Global): TypeStruct 6(int) 7(ivec4) 8(int) 9(ivec4) 10(float) 11(fvec4)
|
||||
13: TypePointer Uniform 12($Global)
|
||||
14: 13(ptr) Variable Uniform
|
||||
15: 8(int) Constant 2
|
||||
16: TypePointer Uniform 8(int)
|
||||
20: 8(int) Constant 4
|
||||
21: TypePointer Uniform 10(float)
|
||||
25: 8(int) Constant 3
|
||||
26: TypePointer Uniform 9(ivec4)
|
||||
30: 8(int) Constant 5
|
||||
31: TypePointer Uniform 11(fvec4)
|
||||
35: 8(int) Constant 0
|
||||
36: TypePointer Uniform 6(int)
|
||||
39: TypeBool
|
||||
40: 6(int) Constant 0
|
||||
42: 10(float) Constant 0
|
||||
43: 10(float) Constant 1065353216
|
||||
48: 8(int) Constant 1
|
||||
49: TypePointer Uniform 7(ivec4)
|
||||
52: TypeVector 39(bool) 4
|
||||
53: 7(ivec4) ConstantComposite 40 40 40 40
|
||||
55: 11(fvec4) ConstantComposite 42 42 42 42
|
||||
56: 11(fvec4) ConstantComposite 43 43 43 43
|
||||
61: TypePointer Function 8(int)
|
||||
68(PS_OUTPUT): TypeStruct 11(fvec4)
|
||||
69: TypePointer Function 68(PS_OUTPUT)
|
||||
71: TypePointer Function 11(fvec4)
|
||||
73: TypePointer Output 11(fvec4)
|
||||
74(Color): 73(ptr) Variable Output
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8(PS_OUTPUT): TypeStruct 7(fvec4)
|
||||
9: TypeFunction 8(PS_OUTPUT)
|
||||
12: TypeInt 32 0
|
||||
13: TypeVector 12(int) 4
|
||||
14: TypeInt 32 1
|
||||
15: TypeVector 14(int) 4
|
||||
16($Global): TypeStruct 12(int) 13(ivec4) 14(int) 15(ivec4) 6(float) 7(fvec4)
|
||||
17: TypePointer Uniform 16($Global)
|
||||
18: 17(ptr) Variable Uniform
|
||||
19: 14(int) Constant 2
|
||||
20: TypePointer Uniform 14(int)
|
||||
24: 14(int) Constant 4
|
||||
25: TypePointer Uniform 6(float)
|
||||
29: 14(int) Constant 3
|
||||
30: TypePointer Uniform 15(ivec4)
|
||||
34: 14(int) Constant 5
|
||||
35: TypePointer Uniform 7(fvec4)
|
||||
39: 14(int) Constant 0
|
||||
40: TypePointer Uniform 12(int)
|
||||
43: TypeBool
|
||||
44: 12(int) Constant 0
|
||||
46: 6(float) Constant 0
|
||||
47: 6(float) Constant 1065353216
|
||||
52: 14(int) Constant 1
|
||||
53: TypePointer Uniform 13(ivec4)
|
||||
56: TypeVector 43(bool) 4
|
||||
57: 13(ivec4) ConstantComposite 44 44 44 44
|
||||
59: 7(fvec4) ConstantComposite 46 46 46 46
|
||||
60: 7(fvec4) ConstantComposite 47 47 47 47
|
||||
65: TypePointer Function 14(int)
|
||||
72: TypePointer Function 8(PS_OUTPUT)
|
||||
74: TypePointer Function 7(fvec4)
|
||||
79: TypePointer Output 7(fvec4)
|
||||
80(Color): 79(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
62(l_int): 61(ptr) Variable Function
|
||||
70(psout): 69(ptr) Variable Function
|
||||
17: 16(ptr) AccessChain 14 15
|
||||
18: 8(int) Load 17
|
||||
19: 10(float) ConvertSToF 18
|
||||
22: 21(ptr) AccessChain 14 20
|
||||
23: 10(float) Load 22
|
||||
24: 10(float) FMod 19 23
|
||||
27: 26(ptr) AccessChain 14 25
|
||||
28: 9(ivec4) Load 27
|
||||
29: 11(fvec4) ConvertSToF 28
|
||||
32: 31(ptr) AccessChain 14 30
|
||||
33: 11(fvec4) Load 32
|
||||
34: 11(fvec4) FMod 29 33
|
||||
37: 36(ptr) AccessChain 14 35
|
||||
38: 6(int) Load 37
|
||||
41: 39(bool) INotEqual 38 40
|
||||
44: 10(float) Select 41 43 42
|
||||
45: 21(ptr) AccessChain 14 20
|
||||
46: 10(float) Load 45
|
||||
47: 10(float) FMod 44 46
|
||||
50: 49(ptr) AccessChain 14 48
|
||||
51: 7(ivec4) Load 50
|
||||
54: 52(bvec4) INotEqual 51 53
|
||||
57: 11(fvec4) Select 54 56 55
|
||||
58: 31(ptr) AccessChain 14 30
|
||||
59: 11(fvec4) Load 58
|
||||
60: 11(fvec4) FMod 57 59
|
||||
Store 62(l_int) 48
|
||||
63: 21(ptr) AccessChain 14 20
|
||||
64: 10(float) Load 63
|
||||
65: 8(int) ConvertFToS 64
|
||||
66: 8(int) Load 62(l_int)
|
||||
67: 8(int) SMod 66 65
|
||||
Store 62(l_int) 67
|
||||
72: 71(ptr) AccessChain 70(psout) 35
|
||||
Store 72 55
|
||||
75: 71(ptr) AccessChain 70(psout) 35
|
||||
76: 11(fvec4) Load 75
|
||||
Store 74(Color) 76
|
||||
81:8(PS_OUTPUT) FunctionCall 10(@main()
|
||||
82: 7(fvec4) CompositeExtract 81 0
|
||||
Store 80(Color) 82
|
||||
Return
|
||||
FunctionEnd
|
||||
10(@main():8(PS_OUTPUT) Function None 9
|
||||
11: Label
|
||||
66(l_int): 65(ptr) Variable Function
|
||||
73(psout): 72(ptr) Variable Function
|
||||
21: 20(ptr) AccessChain 18 19
|
||||
22: 14(int) Load 21
|
||||
23: 6(float) ConvertSToF 22
|
||||
26: 25(ptr) AccessChain 18 24
|
||||
27: 6(float) Load 26
|
||||
28: 6(float) FMod 23 27
|
||||
31: 30(ptr) AccessChain 18 29
|
||||
32: 15(ivec4) Load 31
|
||||
33: 7(fvec4) ConvertSToF 32
|
||||
36: 35(ptr) AccessChain 18 34
|
||||
37: 7(fvec4) Load 36
|
||||
38: 7(fvec4) FMod 33 37
|
||||
41: 40(ptr) AccessChain 18 39
|
||||
42: 12(int) Load 41
|
||||
45: 43(bool) INotEqual 42 44
|
||||
48: 6(float) Select 45 47 46
|
||||
49: 25(ptr) AccessChain 18 24
|
||||
50: 6(float) Load 49
|
||||
51: 6(float) FMod 48 50
|
||||
54: 53(ptr) AccessChain 18 52
|
||||
55: 13(ivec4) Load 54
|
||||
58: 56(bvec4) INotEqual 55 57
|
||||
61: 7(fvec4) Select 58 60 59
|
||||
62: 35(ptr) AccessChain 18 34
|
||||
63: 7(fvec4) Load 62
|
||||
64: 7(fvec4) FMod 61 63
|
||||
Store 66(l_int) 52
|
||||
67: 25(ptr) AccessChain 18 24
|
||||
68: 6(float) Load 67
|
||||
69: 14(int) ConvertFToS 68
|
||||
70: 14(int) Load 66(l_int)
|
||||
71: 14(int) SMod 70 69
|
||||
Store 66(l_int) 71
|
||||
75: 74(ptr) AccessChain 73(psout) 39
|
||||
Store 75 59
|
||||
76:8(PS_OUTPUT) Load 73(psout)
|
||||
ReturnValue 76
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user