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,222 +1,239 @@
|
||||
remap.hlsl.templatetypes.none.frag
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 150
|
||||
// Id's are bound by 160
|
||||
|
||||
Capability Shader
|
||||
Capability Float64
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 146 149
|
||||
EntryPoint Fragment 4 "main" 153 156
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Name 4 "main"
|
||||
Name 9 "r00"
|
||||
Name 15 "r01"
|
||||
Name 20 "r12"
|
||||
Name 24 "r13"
|
||||
Name 27 "r14"
|
||||
Name 30 "r15"
|
||||
Name 34 "r16"
|
||||
Name 38 "r20"
|
||||
Name 43 "r21"
|
||||
Name 48 "r22"
|
||||
Name 52 "r23"
|
||||
Name 57 "r24"
|
||||
Name 62 "r30"
|
||||
Name 66 "r31"
|
||||
Name 71 "r32"
|
||||
Name 75 "r33"
|
||||
Name 80 "r34"
|
||||
Name 85 "r40"
|
||||
Name 89 "r41"
|
||||
Name 92 "r42"
|
||||
Name 95 "r43"
|
||||
Name 100 "r44"
|
||||
Name 105 "r50"
|
||||
Name 122 "r51"
|
||||
Name 125 "r61"
|
||||
Name 130 "r62"
|
||||
Name 136 "r65"
|
||||
Name 141 "r66"
|
||||
Name 146 "@entryPointOutput"
|
||||
Name 149 "input"
|
||||
Decorate 146(@entryPointOutput) Location 0
|
||||
Decorate 149(input) Location 0
|
||||
Name 11 "@main(vf4;"
|
||||
Name 10 "input"
|
||||
Name 13 "r00"
|
||||
Name 19 "r01"
|
||||
Name 24 "r12"
|
||||
Name 28 "r13"
|
||||
Name 31 "r14"
|
||||
Name 34 "r15"
|
||||
Name 38 "r16"
|
||||
Name 42 "r20"
|
||||
Name 47 "r21"
|
||||
Name 52 "r22"
|
||||
Name 56 "r23"
|
||||
Name 61 "r24"
|
||||
Name 66 "r30"
|
||||
Name 70 "r31"
|
||||
Name 75 "r32"
|
||||
Name 79 "r33"
|
||||
Name 84 "r34"
|
||||
Name 89 "r40"
|
||||
Name 93 "r41"
|
||||
Name 96 "r42"
|
||||
Name 99 "r43"
|
||||
Name 104 "r44"
|
||||
Name 109 "r50"
|
||||
Name 126 "r51"
|
||||
Name 129 "r61"
|
||||
Name 134 "r62"
|
||||
Name 140 "r65"
|
||||
Name 145 "r66"
|
||||
Name 151 "input"
|
||||
Name 153 "input"
|
||||
Name 156 "@entryPointOutput"
|
||||
Name 157 "param"
|
||||
Decorate 153(input) Location 0
|
||||
Decorate 156(@entryPointOutput) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Function 7(fvec4)
|
||||
10: 6(float) Constant 1065353216
|
||||
11: 6(float) Constant 1073741824
|
||||
12: 6(float) Constant 1077936128
|
||||
13: 6(float) Constant 1082130432
|
||||
14: 7(fvec4) ConstantComposite 10 11 12 13
|
||||
16: 6(float) Constant 1084227584
|
||||
17: 7(fvec4) ConstantComposite 11 12 13 16
|
||||
18: TypeBool
|
||||
19: TypePointer Function 18(bool)
|
||||
21: 18(bool) ConstantFalse
|
||||
22: TypeInt 32 1
|
||||
23: TypePointer Function 22(int)
|
||||
25: 22(int) Constant 1
|
||||
26: TypePointer Function 6(float)
|
||||
28: TypeFloat 64
|
||||
29: TypePointer Function 28(float)
|
||||
31: 28(float) Constant 0 1072693248
|
||||
32: TypeInt 32 0
|
||||
33: TypePointer Function 32(int)
|
||||
35: 32(int) Constant 1
|
||||
36: TypeVector 18(bool) 2
|
||||
37: TypePointer Function 36(bvec2)
|
||||
39: 18(bool) ConstantTrue
|
||||
40: 36(bvec2) ConstantComposite 21 39
|
||||
41: TypeVector 22(int) 2
|
||||
42: TypePointer Function 41(ivec2)
|
||||
44: 22(int) Constant 2
|
||||
45: 41(ivec2) ConstantComposite 25 44
|
||||
46: TypeVector 6(float) 2
|
||||
47: TypePointer Function 46(fvec2)
|
||||
49: 46(fvec2) ConstantComposite 10 11
|
||||
50: TypeVector 28(float) 2
|
||||
9: TypeFunction 6(float) 8(ptr)
|
||||
14: 6(float) Constant 1065353216
|
||||
15: 6(float) Constant 1073741824
|
||||
16: 6(float) Constant 1077936128
|
||||
17: 6(float) Constant 1082130432
|
||||
18: 7(fvec4) ConstantComposite 14 15 16 17
|
||||
20: 6(float) Constant 1084227584
|
||||
21: 7(fvec4) ConstantComposite 15 16 17 20
|
||||
22: TypeBool
|
||||
23: TypePointer Function 22(bool)
|
||||
25: 22(bool) ConstantFalse
|
||||
26: TypeInt 32 1
|
||||
27: TypePointer Function 26(int)
|
||||
29: 26(int) Constant 1
|
||||
30: TypePointer Function 6(float)
|
||||
32: TypeFloat 64
|
||||
33: TypePointer Function 32(float)
|
||||
35: 32(float) Constant 0 1072693248
|
||||
36: TypeInt 32 0
|
||||
37: TypePointer Function 36(int)
|
||||
39: 36(int) Constant 1
|
||||
40: TypeVector 22(bool) 2
|
||||
41: TypePointer Function 40(bvec2)
|
||||
43: 22(bool) ConstantTrue
|
||||
44: 40(bvec2) ConstantComposite 25 43
|
||||
45: TypeVector 26(int) 2
|
||||
46: TypePointer Function 45(ivec2)
|
||||
48: 26(int) Constant 2
|
||||
49: 45(ivec2) ConstantComposite 29 48
|
||||
50: TypeVector 6(float) 2
|
||||
51: TypePointer Function 50(fvec2)
|
||||
53: 28(float) Constant 0 1073741824
|
||||
54: 50(fvec2) ConstantComposite 31 53
|
||||
55: TypeVector 32(int) 2
|
||||
56: TypePointer Function 55(ivec2)
|
||||
58: 32(int) Constant 2
|
||||
59: 55(ivec2) ConstantComposite 35 58
|
||||
60: TypeVector 18(bool) 3
|
||||
61: TypePointer Function 60(bvec3)
|
||||
63: 60(bvec3) ConstantComposite 21 39 39
|
||||
64: TypeVector 22(int) 3
|
||||
65: TypePointer Function 64(ivec3)
|
||||
67: 22(int) Constant 3
|
||||
68: 64(ivec3) ConstantComposite 25 44 67
|
||||
69: TypeVector 6(float) 3
|
||||
70: TypePointer Function 69(fvec3)
|
||||
72: 69(fvec3) ConstantComposite 10 11 12
|
||||
73: TypeVector 28(float) 3
|
||||
53: 50(fvec2) ConstantComposite 14 15
|
||||
54: TypeVector 32(float) 2
|
||||
55: TypePointer Function 54(fvec2)
|
||||
57: 32(float) Constant 0 1073741824
|
||||
58: 54(fvec2) ConstantComposite 35 57
|
||||
59: TypeVector 36(int) 2
|
||||
60: TypePointer Function 59(ivec2)
|
||||
62: 36(int) Constant 2
|
||||
63: 59(ivec2) ConstantComposite 39 62
|
||||
64: TypeVector 22(bool) 3
|
||||
65: TypePointer Function 64(bvec3)
|
||||
67: 64(bvec3) ConstantComposite 25 43 43
|
||||
68: TypeVector 26(int) 3
|
||||
69: TypePointer Function 68(ivec3)
|
||||
71: 26(int) Constant 3
|
||||
72: 68(ivec3) ConstantComposite 29 48 71
|
||||
73: TypeVector 6(float) 3
|
||||
74: TypePointer Function 73(fvec3)
|
||||
76: 28(float) Constant 0 1074266112
|
||||
77: 73(fvec3) ConstantComposite 31 53 76
|
||||
78: TypeVector 32(int) 3
|
||||
79: TypePointer Function 78(ivec3)
|
||||
81: 32(int) Constant 3
|
||||
82: 78(ivec3) ConstantComposite 35 58 81
|
||||
83: TypeVector 18(bool) 4
|
||||
84: TypePointer Function 83(bvec4)
|
||||
86: 83(bvec4) ConstantComposite 21 39 39 21
|
||||
87: TypeVector 22(int) 4
|
||||
88: TypePointer Function 87(ivec4)
|
||||
90: 22(int) Constant 4
|
||||
91: 87(ivec4) ConstantComposite 25 44 67 90
|
||||
93: TypeVector 28(float) 4
|
||||
94: TypePointer Function 93(fvec4)
|
||||
96: 28(float) Constant 0 1074790400
|
||||
97: 93(fvec4) ConstantComposite 31 53 76 96
|
||||
98: TypeVector 32(int) 4
|
||||
99: TypePointer Function 98(ivec4)
|
||||
101: 32(int) Constant 4
|
||||
102: 98(ivec4) ConstantComposite 35 58 81 101
|
||||
103: TypeMatrix 7(fvec4) 4
|
||||
104: TypePointer Function 103
|
||||
106: 6(float) Constant 0
|
||||
107: 7(fvec4) ConstantComposite 106 10 11 12
|
||||
108: 6(float) Constant 1086324736
|
||||
109: 6(float) Constant 1088421888
|
||||
110: 7(fvec4) ConstantComposite 13 16 108 109
|
||||
111: 6(float) Constant 1090519040
|
||||
112: 6(float) Constant 1091567616
|
||||
113: 6(float) Constant 1092616192
|
||||
114: 6(float) Constant 1093664768
|
||||
115: 7(fvec4) ConstantComposite 111 112 113 114
|
||||
116: 6(float) Constant 1094713344
|
||||
117: 6(float) Constant 1095761920
|
||||
118: 6(float) Constant 1096810496
|
||||
119: 6(float) Constant 1097859072
|
||||
120: 7(fvec4) ConstantComposite 116 117 118 119
|
||||
121: 103 ConstantComposite 107 110 115 120
|
||||
123: TypeMatrix 69(fvec3) 2
|
||||
124: TypePointer Function 123
|
||||
126: 69(fvec3) ConstantComposite 13 16 108
|
||||
127: 123 ConstantComposite 72 126
|
||||
128: TypeMatrix 46(fvec2) 3
|
||||
129: TypePointer Function 128
|
||||
131: 46(fvec2) ConstantComposite 12 13
|
||||
132: 46(fvec2) ConstantComposite 16 108
|
||||
133: 128 ConstantComposite 49 131 132
|
||||
134: TypeMatrix 46(fvec2) 4
|
||||
135: TypePointer Function 134
|
||||
137: 46(fvec2) ConstantComposite 109 111
|
||||
138: 134 ConstantComposite 49 131 132 137
|
||||
139: TypeMatrix 69(fvec3) 4
|
||||
140: TypePointer Function 139
|
||||
142: 69(fvec3) ConstantComposite 109 111 112
|
||||
143: 69(fvec3) ConstantComposite 113 114 116
|
||||
144: 139 ConstantComposite 72 126 142 143
|
||||
145: TypePointer Output 6(float)
|
||||
146(@entryPointOutput): 145(ptr) Variable Output
|
||||
148: TypePointer Input 7(fvec4)
|
||||
149(input): 148(ptr) Variable Input
|
||||
76: 73(fvec3) ConstantComposite 14 15 16
|
||||
77: TypeVector 32(float) 3
|
||||
78: TypePointer Function 77(fvec3)
|
||||
80: 32(float) Constant 0 1074266112
|
||||
81: 77(fvec3) ConstantComposite 35 57 80
|
||||
82: TypeVector 36(int) 3
|
||||
83: TypePointer Function 82(ivec3)
|
||||
85: 36(int) Constant 3
|
||||
86: 82(ivec3) ConstantComposite 39 62 85
|
||||
87: TypeVector 22(bool) 4
|
||||
88: TypePointer Function 87(bvec4)
|
||||
90: 87(bvec4) ConstantComposite 25 43 43 25
|
||||
91: TypeVector 26(int) 4
|
||||
92: TypePointer Function 91(ivec4)
|
||||
94: 26(int) Constant 4
|
||||
95: 91(ivec4) ConstantComposite 29 48 71 94
|
||||
97: TypeVector 32(float) 4
|
||||
98: TypePointer Function 97(fvec4)
|
||||
100: 32(float) Constant 0 1074790400
|
||||
101: 97(fvec4) ConstantComposite 35 57 80 100
|
||||
102: TypeVector 36(int) 4
|
||||
103: TypePointer Function 102(ivec4)
|
||||
105: 36(int) Constant 4
|
||||
106: 102(ivec4) ConstantComposite 39 62 85 105
|
||||
107: TypeMatrix 7(fvec4) 4
|
||||
108: TypePointer Function 107
|
||||
110: 6(float) Constant 0
|
||||
111: 7(fvec4) ConstantComposite 110 14 15 16
|
||||
112: 6(float) Constant 1086324736
|
||||
113: 6(float) Constant 1088421888
|
||||
114: 7(fvec4) ConstantComposite 17 20 112 113
|
||||
115: 6(float) Constant 1090519040
|
||||
116: 6(float) Constant 1091567616
|
||||
117: 6(float) Constant 1092616192
|
||||
118: 6(float) Constant 1093664768
|
||||
119: 7(fvec4) ConstantComposite 115 116 117 118
|
||||
120: 6(float) Constant 1094713344
|
||||
121: 6(float) Constant 1095761920
|
||||
122: 6(float) Constant 1096810496
|
||||
123: 6(float) Constant 1097859072
|
||||
124: 7(fvec4) ConstantComposite 120 121 122 123
|
||||
125: 107 ConstantComposite 111 114 119 124
|
||||
127: TypeMatrix 73(fvec3) 2
|
||||
128: TypePointer Function 127
|
||||
130: 73(fvec3) ConstantComposite 17 20 112
|
||||
131: 127 ConstantComposite 76 130
|
||||
132: TypeMatrix 50(fvec2) 3
|
||||
133: TypePointer Function 132
|
||||
135: 50(fvec2) ConstantComposite 16 17
|
||||
136: 50(fvec2) ConstantComposite 20 112
|
||||
137: 132 ConstantComposite 53 135 136
|
||||
138: TypeMatrix 50(fvec2) 4
|
||||
139: TypePointer Function 138
|
||||
141: 50(fvec2) ConstantComposite 113 115
|
||||
142: 138 ConstantComposite 53 135 136 141
|
||||
143: TypeMatrix 73(fvec3) 4
|
||||
144: TypePointer Function 143
|
||||
146: 73(fvec3) ConstantComposite 113 115 116
|
||||
147: 73(fvec3) ConstantComposite 117 118 120
|
||||
148: 143 ConstantComposite 76 130 146 147
|
||||
152: TypePointer Input 7(fvec4)
|
||||
153(input): 152(ptr) Variable Input
|
||||
155: TypePointer Output 6(float)
|
||||
156(@entryPointOutput): 155(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(r00): 8(ptr) Variable Function
|
||||
15(r01): 8(ptr) Variable Function
|
||||
20(r12): 19(ptr) Variable Function
|
||||
24(r13): 23(ptr) Variable Function
|
||||
27(r14): 26(ptr) Variable Function
|
||||
30(r15): 29(ptr) Variable Function
|
||||
34(r16): 33(ptr) Variable Function
|
||||
38(r20): 37(ptr) Variable Function
|
||||
43(r21): 42(ptr) Variable Function
|
||||
48(r22): 47(ptr) Variable Function
|
||||
52(r23): 51(ptr) Variable Function
|
||||
57(r24): 56(ptr) Variable Function
|
||||
62(r30): 61(ptr) Variable Function
|
||||
66(r31): 65(ptr) Variable Function
|
||||
71(r32): 70(ptr) Variable Function
|
||||
75(r33): 74(ptr) Variable Function
|
||||
80(r34): 79(ptr) Variable Function
|
||||
85(r40): 84(ptr) Variable Function
|
||||
89(r41): 88(ptr) Variable Function
|
||||
92(r42): 8(ptr) Variable Function
|
||||
95(r43): 94(ptr) Variable Function
|
||||
100(r44): 99(ptr) Variable Function
|
||||
105(r50): 104(ptr) Variable Function
|
||||
122(r51): 104(ptr) Variable Function
|
||||
125(r61): 124(ptr) Variable Function
|
||||
130(r62): 129(ptr) Variable Function
|
||||
136(r65): 135(ptr) Variable Function
|
||||
141(r66): 140(ptr) Variable Function
|
||||
Store 9(r00) 14
|
||||
Store 15(r01) 17
|
||||
Store 20(r12) 21
|
||||
Store 24(r13) 25
|
||||
Store 27(r14) 10
|
||||
Store 30(r15) 31
|
||||
Store 34(r16) 35
|
||||
Store 38(r20) 40
|
||||
Store 43(r21) 45
|
||||
Store 48(r22) 49
|
||||
Store 52(r23) 54
|
||||
Store 57(r24) 59
|
||||
Store 62(r30) 63
|
||||
Store 66(r31) 68
|
||||
Store 71(r32) 72
|
||||
Store 75(r33) 77
|
||||
Store 80(r34) 82
|
||||
Store 85(r40) 86
|
||||
Store 89(r41) 91
|
||||
Store 92(r42) 14
|
||||
Store 95(r43) 97
|
||||
Store 100(r44) 102
|
||||
Store 105(r50) 121
|
||||
Store 122(r51) 121
|
||||
Store 125(r61) 127
|
||||
Store 130(r62) 133
|
||||
Store 136(r65) 138
|
||||
Store 141(r66) 144
|
||||
Store 146(@entryPointOutput) 106
|
||||
151(input): 8(ptr) Variable Function
|
||||
157(param): 8(ptr) Variable Function
|
||||
154: 7(fvec4) Load 153(input)
|
||||
Store 151(input) 154
|
||||
158: 7(fvec4) Load 151(input)
|
||||
Store 157(param) 158
|
||||
159: 6(float) FunctionCall 11(@main(vf4;) 157(param)
|
||||
Store 156(@entryPointOutput) 159
|
||||
Return
|
||||
FunctionEnd
|
||||
11(@main(vf4;): 6(float) Function None 9
|
||||
10(input): 8(ptr) FunctionParameter
|
||||
12: Label
|
||||
13(r00): 8(ptr) Variable Function
|
||||
19(r01): 8(ptr) Variable Function
|
||||
24(r12): 23(ptr) Variable Function
|
||||
28(r13): 27(ptr) Variable Function
|
||||
31(r14): 30(ptr) Variable Function
|
||||
34(r15): 33(ptr) Variable Function
|
||||
38(r16): 37(ptr) Variable Function
|
||||
42(r20): 41(ptr) Variable Function
|
||||
47(r21): 46(ptr) Variable Function
|
||||
52(r22): 51(ptr) Variable Function
|
||||
56(r23): 55(ptr) Variable Function
|
||||
61(r24): 60(ptr) Variable Function
|
||||
66(r30): 65(ptr) Variable Function
|
||||
70(r31): 69(ptr) Variable Function
|
||||
75(r32): 74(ptr) Variable Function
|
||||
79(r33): 78(ptr) Variable Function
|
||||
84(r34): 83(ptr) Variable Function
|
||||
89(r40): 88(ptr) Variable Function
|
||||
93(r41): 92(ptr) Variable Function
|
||||
96(r42): 8(ptr) Variable Function
|
||||
99(r43): 98(ptr) Variable Function
|
||||
104(r44): 103(ptr) Variable Function
|
||||
109(r50): 108(ptr) Variable Function
|
||||
126(r51): 108(ptr) Variable Function
|
||||
129(r61): 128(ptr) Variable Function
|
||||
134(r62): 133(ptr) Variable Function
|
||||
140(r65): 139(ptr) Variable Function
|
||||
145(r66): 144(ptr) Variable Function
|
||||
Store 13(r00) 18
|
||||
Store 19(r01) 21
|
||||
Store 24(r12) 25
|
||||
Store 28(r13) 29
|
||||
Store 31(r14) 14
|
||||
Store 34(r15) 35
|
||||
Store 38(r16) 39
|
||||
Store 42(r20) 44
|
||||
Store 47(r21) 49
|
||||
Store 52(r22) 53
|
||||
Store 56(r23) 58
|
||||
Store 61(r24) 63
|
||||
Store 66(r30) 67
|
||||
Store 70(r31) 72
|
||||
Store 75(r32) 76
|
||||
Store 79(r33) 81
|
||||
Store 84(r34) 86
|
||||
Store 89(r40) 90
|
||||
Store 93(r41) 95
|
||||
Store 96(r42) 18
|
||||
Store 99(r43) 101
|
||||
Store 104(r44) 106
|
||||
Store 109(r50) 125
|
||||
Store 126(r51) 125
|
||||
Store 129(r61) 131
|
||||
Store 134(r62) 137
|
||||
Store 140(r65) 142
|
||||
Store 145(r66) 148
|
||||
ReturnValue 110
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user