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:
@@ -1,9 +1,9 @@
|
||||
hlsl.matrixSwizzle.vert
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:2 Function Definition: ShaderFunction(f1; (temp void)
|
||||
0:2 Function Definition: @ShaderFunction(f1; (temp void)
|
||||
0:2 Function Parameters:
|
||||
0:2 'inf' (layout(location=0 ) in float)
|
||||
0:2 'inf' (in float)
|
||||
0:? Sequence
|
||||
0:7 move second child to first child (temp float)
|
||||
0:7 direct index (temp float)
|
||||
@@ -205,6 +205,14 @@ Shader version: 450
|
||||
0:23 2 (const int)
|
||||
0:23 Constant:
|
||||
0:23 0 (const int)
|
||||
0:2 Function Definition: ShaderFunction( (temp void)
|
||||
0:2 Function Parameters:
|
||||
0:? Sequence
|
||||
0:2 move second child to first child (temp float)
|
||||
0:? 'inf' (temp float)
|
||||
0:? 'inf' (layout(location=0 ) in float)
|
||||
0:2 Function Call: @ShaderFunction(f1; (temp void)
|
||||
0:? 'inf' (temp float)
|
||||
0:27 Function Definition: createMat3x3(vf3;vf3;vf3; (temp 3X3 matrix of float)
|
||||
0:27 Function Parameters:
|
||||
0:27 'a' (in 3-component vector of float)
|
||||
@@ -333,9 +341,9 @@ Linked vertex stage:
|
||||
|
||||
Shader version: 450
|
||||
0:? Sequence
|
||||
0:2 Function Definition: ShaderFunction(f1; (temp void)
|
||||
0:2 Function Definition: @ShaderFunction(f1; (temp void)
|
||||
0:2 Function Parameters:
|
||||
0:2 'inf' (layout(location=0 ) in float)
|
||||
0:2 'inf' (in float)
|
||||
0:? Sequence
|
||||
0:7 move second child to first child (temp float)
|
||||
0:7 direct index (temp float)
|
||||
@@ -537,6 +545,14 @@ Shader version: 450
|
||||
0:23 2 (const int)
|
||||
0:23 Constant:
|
||||
0:23 0 (const int)
|
||||
0:2 Function Definition: ShaderFunction( (temp void)
|
||||
0:2 Function Parameters:
|
||||
0:? Sequence
|
||||
0:2 move second child to first child (temp float)
|
||||
0:? 'inf' (temp float)
|
||||
0:? 'inf' (layout(location=0 ) in float)
|
||||
0:2 Function Call: @ShaderFunction(f1; (temp void)
|
||||
0:? 'inf' (temp float)
|
||||
0:27 Function Definition: createMat3x3(vf3;vf3;vf3; (temp 3X3 matrix of float)
|
||||
0:27 Function Parameters:
|
||||
0:27 'a' (in 3-component vector of float)
|
||||
@@ -662,157 +678,174 @@ Shader version: 450
|
||||
Missing functionality: matrix swizzle
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 109
|
||||
// Id's are bound by 118
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "ShaderFunction" 108
|
||||
EntryPoint Vertex 4 "ShaderFunction" 81
|
||||
Name 4 "ShaderFunction"
|
||||
Name 14 "createMat3x3(vf3;vf3;vf3;"
|
||||
Name 11 "a"
|
||||
Name 12 "b"
|
||||
Name 13 "c"
|
||||
Name 19 "m"
|
||||
Name 38 "f3"
|
||||
Name 51 "intermVec"
|
||||
Name 63 "intermVec"
|
||||
Name 76 "m"
|
||||
Name 108 "inf"
|
||||
Decorate 108(inf) Location 0
|
||||
Name 10 "@ShaderFunction(f1;"
|
||||
Name 9 "inf"
|
||||
Name 19 "createMat3x3(vf3;vf3;vf3;"
|
||||
Name 16 "a"
|
||||
Name 17 "b"
|
||||
Name 18 "c"
|
||||
Name 24 "m"
|
||||
Name 42 "f3"
|
||||
Name 55 "intermVec"
|
||||
Name 67 "intermVec"
|
||||
Name 79 "inf"
|
||||
Name 81 "inf"
|
||||
Name 83 "param"
|
||||
Name 87 "m"
|
||||
Decorate 81(inf) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 3
|
||||
8: TypePointer Function 7(fvec3)
|
||||
9: TypeMatrix 7(fvec3) 3
|
||||
10: TypeFunction 9 8(ptr) 8(ptr) 8(ptr)
|
||||
16: TypeVector 6(float) 4
|
||||
17: TypeMatrix 16(fvec4) 3
|
||||
18: TypePointer Function 17
|
||||
20: TypeInt 32 1
|
||||
21: 20(int) Constant 2
|
||||
22: 6(float) Constant 1065353216
|
||||
23: TypeInt 32 0
|
||||
24: 23(int) Constant 3
|
||||
25: TypePointer Function 6(float)
|
||||
27: 6(float) Constant 1073741824
|
||||
30: 20(int) Constant 0
|
||||
31: 6(float) Constant 1077936128
|
||||
32: 16(fvec4) ConstantComposite 31 31 31 31
|
||||
33: TypePointer Function 16(fvec4)
|
||||
35: 20(int) Constant 1
|
||||
39: 23(int) Constant 0
|
||||
43: 23(int) Constant 1
|
||||
47: 23(int) Constant 2
|
||||
52: 6(float) Constant 1084227584
|
||||
53: 7(fvec3) ConstantComposite 52 52 52
|
||||
75: TypePointer Function 9
|
||||
107: TypePointer Input 6(float)
|
||||
108(inf): 107(ptr) Variable Input
|
||||
7: TypePointer Function 6(float)
|
||||
8: TypeFunction 2 7(ptr)
|
||||
12: TypeVector 6(float) 3
|
||||
13: TypePointer Function 12(fvec3)
|
||||
14: TypeMatrix 12(fvec3) 3
|
||||
15: TypeFunction 14 13(ptr) 13(ptr) 13(ptr)
|
||||
21: TypeVector 6(float) 4
|
||||
22: TypeMatrix 21(fvec4) 3
|
||||
23: TypePointer Function 22
|
||||
25: TypeInt 32 1
|
||||
26: 25(int) Constant 2
|
||||
27: 6(float) Constant 1065353216
|
||||
28: TypeInt 32 0
|
||||
29: 28(int) Constant 3
|
||||
31: 6(float) Constant 1073741824
|
||||
34: 25(int) Constant 0
|
||||
35: 6(float) Constant 1077936128
|
||||
36: 21(fvec4) ConstantComposite 35 35 35 35
|
||||
37: TypePointer Function 21(fvec4)
|
||||
39: 25(int) Constant 1
|
||||
43: 28(int) Constant 0
|
||||
47: 28(int) Constant 1
|
||||
51: 28(int) Constant 2
|
||||
56: 6(float) Constant 1084227584
|
||||
57: 12(fvec3) ConstantComposite 56 56 56
|
||||
80: TypePointer Input 6(float)
|
||||
81(inf): 80(ptr) Variable Input
|
||||
86: TypePointer Function 14
|
||||
4(ShaderFunction): 2 Function None 3
|
||||
5: Label
|
||||
19(m): 18(ptr) Variable Function
|
||||
38(f3): 8(ptr) Variable Function
|
||||
51(intermVec): 8(ptr) Variable Function
|
||||
63(intermVec): 8(ptr) Variable Function
|
||||
26: 25(ptr) AccessChain 19(m) 21 24
|
||||
Store 26 22
|
||||
28: 25(ptr) AccessChain 19(m) 21 24
|
||||
Store 28 27
|
||||
29: 25(ptr) AccessChain 19(m) 21 24
|
||||
Store 29 27
|
||||
34: 33(ptr) AccessChain 19(m) 30
|
||||
Store 34 32
|
||||
36: 33(ptr) AccessChain 19(m) 35
|
||||
Store 36 32
|
||||
37: 33(ptr) AccessChain 19(m) 35
|
||||
Store 37 32
|
||||
40: 25(ptr) AccessChain 38(f3) 39
|
||||
41: 6(float) Load 40
|
||||
42: 25(ptr) AccessChain 19(m) 30 39
|
||||
Store 42 41
|
||||
44: 25(ptr) AccessChain 38(f3) 43
|
||||
45: 6(float) Load 44
|
||||
46: 25(ptr) AccessChain 19(m) 35 43
|
||||
Store 46 45
|
||||
48: 25(ptr) AccessChain 38(f3) 47
|
||||
49: 6(float) Load 48
|
||||
50: 25(ptr) AccessChain 19(m) 35 47
|
||||
Store 50 49
|
||||
Store 51(intermVec) 53
|
||||
54: 25(ptr) AccessChain 51(intermVec) 39
|
||||
55: 6(float) Load 54
|
||||
56: 25(ptr) AccessChain 19(m) 35 39
|
||||
Store 56 55
|
||||
57: 25(ptr) AccessChain 51(intermVec) 43
|
||||
58: 6(float) Load 57
|
||||
59: 25(ptr) AccessChain 19(m) 30 43
|
||||
Store 59 58
|
||||
60: 25(ptr) AccessChain 51(intermVec) 47
|
||||
61: 6(float) Load 60
|
||||
62: 25(ptr) AccessChain 19(m) 21 39
|
||||
Store 62 61
|
||||
64: 7(fvec3) Load 38(f3)
|
||||
65: 7(fvec3) VectorTimesScalar 64 27
|
||||
Store 63(intermVec) 65
|
||||
66: 25(ptr) AccessChain 63(intermVec) 39
|
||||
67: 6(float) Load 66
|
||||
68: 25(ptr) AccessChain 19(m) 30 39
|
||||
Store 68 67
|
||||
69: 25(ptr) AccessChain 63(intermVec) 43
|
||||
70: 6(float) Load 69
|
||||
71: 25(ptr) AccessChain 19(m) 30 43
|
||||
Store 71 70
|
||||
72: 25(ptr) AccessChain 63(intermVec) 47
|
||||
73: 6(float) Load 72
|
||||
74: 25(ptr) AccessChain 19(m) 35 39
|
||||
Store 74 73
|
||||
Store 38(f3) 30
|
||||
79(inf): 7(ptr) Variable Function
|
||||
83(param): 7(ptr) Variable Function
|
||||
82: 6(float) Load 81(inf)
|
||||
Store 79(inf) 82
|
||||
84: 6(float) Load 79(inf)
|
||||
Store 83(param) 84
|
||||
85: 2 FunctionCall 10(@ShaderFunction(f1;) 83(param)
|
||||
Return
|
||||
FunctionEnd
|
||||
14(createMat3x3(vf3;vf3;vf3;): 9 Function None 10
|
||||
11(a): 8(ptr) FunctionParameter
|
||||
12(b): 8(ptr) FunctionParameter
|
||||
13(c): 8(ptr) FunctionParameter
|
||||
15: Label
|
||||
76(m): 75(ptr) Variable Function
|
||||
77: 25(ptr) AccessChain 11(a) 39
|
||||
78: 6(float) Load 77
|
||||
79: 25(ptr) AccessChain 76(m) 30 39
|
||||
Store 79 78
|
||||
80: 25(ptr) AccessChain 11(a) 43
|
||||
81: 6(float) Load 80
|
||||
82: 25(ptr) AccessChain 76(m) 35 39
|
||||
Store 82 81
|
||||
83: 25(ptr) AccessChain 11(a) 47
|
||||
84: 6(float) Load 83
|
||||
85: 25(ptr) AccessChain 76(m) 21 39
|
||||
Store 85 84
|
||||
86: 25(ptr) AccessChain 12(b) 39
|
||||
87: 6(float) Load 86
|
||||
88: 25(ptr) AccessChain 76(m) 30 43
|
||||
Store 88 87
|
||||
89: 25(ptr) AccessChain 12(b) 43
|
||||
90: 6(float) Load 89
|
||||
91: 25(ptr) AccessChain 76(m) 35 43
|
||||
Store 91 90
|
||||
92: 25(ptr) AccessChain 12(b) 47
|
||||
93: 6(float) Load 92
|
||||
94: 25(ptr) AccessChain 76(m) 21 43
|
||||
Store 94 93
|
||||
95: 25(ptr) AccessChain 13(c) 39
|
||||
96: 6(float) Load 95
|
||||
97: 25(ptr) AccessChain 76(m) 30 47
|
||||
Store 97 96
|
||||
98: 25(ptr) AccessChain 13(c) 43
|
||||
99: 6(float) Load 98
|
||||
100: 25(ptr) AccessChain 76(m) 35 47
|
||||
Store 100 99
|
||||
101: 25(ptr) AccessChain 13(c) 47
|
||||
102: 6(float) Load 101
|
||||
103: 25(ptr) AccessChain 76(m) 21 47
|
||||
Store 103 102
|
||||
104: 9 Load 76(m)
|
||||
ReturnValue 104
|
||||
10(@ShaderFunction(f1;): 2 Function None 8
|
||||
9(inf): 7(ptr) FunctionParameter
|
||||
11: Label
|
||||
24(m): 23(ptr) Variable Function
|
||||
42(f3): 13(ptr) Variable Function
|
||||
55(intermVec): 13(ptr) Variable Function
|
||||
67(intermVec): 13(ptr) Variable Function
|
||||
30: 7(ptr) AccessChain 24(m) 26 29
|
||||
Store 30 27
|
||||
32: 7(ptr) AccessChain 24(m) 26 29
|
||||
Store 32 31
|
||||
33: 7(ptr) AccessChain 24(m) 26 29
|
||||
Store 33 31
|
||||
38: 37(ptr) AccessChain 24(m) 34
|
||||
Store 38 36
|
||||
40: 37(ptr) AccessChain 24(m) 39
|
||||
Store 40 36
|
||||
41: 37(ptr) AccessChain 24(m) 39
|
||||
Store 41 36
|
||||
44: 7(ptr) AccessChain 42(f3) 43
|
||||
45: 6(float) Load 44
|
||||
46: 7(ptr) AccessChain 24(m) 34 43
|
||||
Store 46 45
|
||||
48: 7(ptr) AccessChain 42(f3) 47
|
||||
49: 6(float) Load 48
|
||||
50: 7(ptr) AccessChain 24(m) 39 47
|
||||
Store 50 49
|
||||
52: 7(ptr) AccessChain 42(f3) 51
|
||||
53: 6(float) Load 52
|
||||
54: 7(ptr) AccessChain 24(m) 39 51
|
||||
Store 54 53
|
||||
Store 55(intermVec) 57
|
||||
58: 7(ptr) AccessChain 55(intermVec) 43
|
||||
59: 6(float) Load 58
|
||||
60: 7(ptr) AccessChain 24(m) 39 43
|
||||
Store 60 59
|
||||
61: 7(ptr) AccessChain 55(intermVec) 47
|
||||
62: 6(float) Load 61
|
||||
63: 7(ptr) AccessChain 24(m) 34 47
|
||||
Store 63 62
|
||||
64: 7(ptr) AccessChain 55(intermVec) 51
|
||||
65: 6(float) Load 64
|
||||
66: 7(ptr) AccessChain 24(m) 26 43
|
||||
Store 66 65
|
||||
68: 12(fvec3) Load 42(f3)
|
||||
69: 12(fvec3) VectorTimesScalar 68 31
|
||||
Store 67(intermVec) 69
|
||||
70: 7(ptr) AccessChain 67(intermVec) 43
|
||||
71: 6(float) Load 70
|
||||
72: 7(ptr) AccessChain 24(m) 34 43
|
||||
Store 72 71
|
||||
73: 7(ptr) AccessChain 67(intermVec) 47
|
||||
74: 6(float) Load 73
|
||||
75: 7(ptr) AccessChain 24(m) 34 47
|
||||
Store 75 74
|
||||
76: 7(ptr) AccessChain 67(intermVec) 51
|
||||
77: 6(float) Load 76
|
||||
78: 7(ptr) AccessChain 24(m) 39 43
|
||||
Store 78 77
|
||||
Store 42(f3) 34
|
||||
Return
|
||||
FunctionEnd
|
||||
19(createMat3x3(vf3;vf3;vf3;): 14 Function None 15
|
||||
16(a): 13(ptr) FunctionParameter
|
||||
17(b): 13(ptr) FunctionParameter
|
||||
18(c): 13(ptr) FunctionParameter
|
||||
20: Label
|
||||
87(m): 86(ptr) Variable Function
|
||||
88: 7(ptr) AccessChain 16(a) 43
|
||||
89: 6(float) Load 88
|
||||
90: 7(ptr) AccessChain 87(m) 34 43
|
||||
Store 90 89
|
||||
91: 7(ptr) AccessChain 16(a) 47
|
||||
92: 6(float) Load 91
|
||||
93: 7(ptr) AccessChain 87(m) 39 43
|
||||
Store 93 92
|
||||
94: 7(ptr) AccessChain 16(a) 51
|
||||
95: 6(float) Load 94
|
||||
96: 7(ptr) AccessChain 87(m) 26 43
|
||||
Store 96 95
|
||||
97: 7(ptr) AccessChain 17(b) 43
|
||||
98: 6(float) Load 97
|
||||
99: 7(ptr) AccessChain 87(m) 34 47
|
||||
Store 99 98
|
||||
100: 7(ptr) AccessChain 17(b) 47
|
||||
101: 6(float) Load 100
|
||||
102: 7(ptr) AccessChain 87(m) 39 47
|
||||
Store 102 101
|
||||
103: 7(ptr) AccessChain 17(b) 51
|
||||
104: 6(float) Load 103
|
||||
105: 7(ptr) AccessChain 87(m) 26 47
|
||||
Store 105 104
|
||||
106: 7(ptr) AccessChain 18(c) 43
|
||||
107: 6(float) Load 106
|
||||
108: 7(ptr) AccessChain 87(m) 34 51
|
||||
Store 108 107
|
||||
109: 7(ptr) AccessChain 18(c) 47
|
||||
110: 6(float) Load 109
|
||||
111: 7(ptr) AccessChain 87(m) 39 51
|
||||
Store 111 110
|
||||
112: 7(ptr) AccessChain 18(c) 51
|
||||
113: 6(float) Load 112
|
||||
114: 7(ptr) AccessChain 87(m) 26 51
|
||||
Store 114 113
|
||||
115: 14 Load 87(m)
|
||||
ReturnValue 115
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user