Commit 3ae1dc3
committed
[HLSL] Add matrix constructors using initalizer lists
fixes #159434
In HLSL matrices are matrix_type in all respects except that they support a constructor style syntax for initializing matrices.
This change adds a translation of vector constructor arguments into initializer lists.
This supports the following HLSL syntax:
(1) HLSL matrices support constructor syntax
(2) HLSL matrices are expanded to constituate components in constructor
using the same initalizer list behavior defined in transformInitList
allows us to support struct element initalization via HLSLElementwiseCast1 parent c7d776b commit 3ae1dc3
File tree
7 files changed
+608
-31
lines changed- clang
- include/clang
- Basic
- Sema
- lib/Sema
- test
- AST/HLSL
- SemaHLSL/BuiltIns
7 files changed
+608
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2418 | 2418 | | |
2419 | 2419 | | |
2420 | 2420 | | |
2421 | | - | |
2422 | | - | |
2423 | | - | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
2424 | 2424 | | |
2425 | 2425 | | |
2426 | 2426 | | |
| |||
6543 | 6543 | | |
6544 | 6544 | | |
6545 | 6545 | | |
6546 | | - | |
| 6546 | + | |
6547 | 6547 | | |
6548 | | - | |
| 6548 | + | |
6549 | 6549 | | |
6550 | 6550 | | |
6551 | 6551 | | |
| |||
11086 | 11086 | | |
11087 | 11087 | | |
11088 | 11088 | | |
11089 | | - | |
11090 | | - | |
| 11089 | + | |
| 11090 | + | |
11091 | 11091 | | |
11092 | 11092 | | |
11093 | 11093 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| |||
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
208 | | - | |
209 | | - | |
| 212 | + | |
| 213 | + | |
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
| |||
536 | 540 | | |
537 | 541 | | |
538 | 542 | | |
539 | | - | |
| 543 | + | |
540 | 544 | | |
541 | 545 | | |
542 | 546 | | |
543 | 547 | | |
544 | 548 | | |
545 | 549 | | |
546 | 550 | | |
547 | | - | |
| 551 | + | |
548 | 552 | | |
549 | 553 | | |
550 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
3323 | 3324 | | |
3324 | 3325 | | |
3325 | 3326 | | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
3326 | 3332 | | |
3327 | 3333 | | |
3328 | 3334 | | |
| |||
4124 | 4130 | | |
4125 | 4131 | | |
4126 | 4132 | | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
| 4141 | + | |
| 4142 | + | |
| 4143 | + | |
| 4144 | + | |
| 4145 | + | |
| 4146 | + | |
| 4147 | + | |
| 4148 | + | |
| 4149 | + | |
| 4150 | + | |
| 4151 | + | |
| 4152 | + | |
| 4153 | + | |
| 4154 | + | |
| 4155 | + | |
| 4156 | + | |
| 4157 | + | |
| 4158 | + | |
4127 | 4159 | | |
4128 | 4160 | | |
4129 | 4161 | | |
| |||
4177 | 4209 | | |
4178 | 4210 | | |
4179 | 4211 | | |
4180 | | - | |
4181 | 4212 | | |
4182 | | - | |
| 4213 | + | |
| 4214 | + | |
4183 | 4215 | | |
4184 | 4216 | | |
4185 | 4217 | | |
4186 | 4218 | | |
4187 | 4219 | | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
4188 | 4223 | | |
4189 | 4224 | | |
4190 | 4225 | | |
| |||
0 commit comments