Commit e07be1c
Greg Roth
Fix errors in retrieving and assigning load status parameter (microsoft#7513)
There were two problems with processing the status parameter with the
reword of the buffer load code. The first was that the status was not
being passed down to the load instruction generation for aggregate types
in any shader model version. The second was that the status retrieval
from the resret returned by the raw buffer loads was using the wrong
index for native vectors supported by shader model 6.9.
The status Value was not getting passed all the way down to the load
instruction generation for aggregate types because the refactored helper
constructor would always set it to null. It needs to be explicitly
stated since by that point, the original call instruction it came from
has been lost amidst subsequent GEPs, bitcasts, and/or loads that
aggregate types (arrays and structs) will use on the results of the
original call instruction to get the exact element required.
This changes the constructor to take an optional status parameter
allowing the locations where it might be set to pass it along. In other
cases, it will be null and be appropriately ignored.
Modified aggregate tests to verify this behavior. This required keeping
track of the return of the last load operation involved in a raw buffer
load, which made arrays more complicated. Rather than give them their
own CHECK prefix, I lumped them in with large matrices requiring three
loads. This did require making all the array lengths 3 to match. The
loss in test variability is worth the convenience as there is no known
distinction when it comes to array sizes over 1.
The status retrieval from the ResRet returned by the raw buffer loads
was using the wrong index for native vectors supported by shader model
6.9. Adjusting the index according to the opcode ensures that the index
will be correct.
This also required a change to validation that allows
checkAccessFullyMapped to operate on the second element extracted from a
ResRet where applicable and some corresponding null tolerance in related
code.
Adds status retrieving overloads to the relevant load/store tests for
sm6.9, aggregates, and other loads though the last category exhibited no
issues. At least I got some statuses right!
Fixes microsoft#75081 parent b390fb1 commit e07be1c
File tree
7 files changed
+280
-74
lines changed- include/dxc/DXIL
- lib
- DXIL
- DxilValidation
- HLSL
- tools/clang/test/CodeGenDXIL/hlsl/intrinsics
7 files changed
+280
-74
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6438 | 6438 | | |
6439 | 6439 | | |
6440 | 6440 | | |
6441 | | - | |
| 6441 | + | |
6442 | 6442 | | |
6443 | 6443 | | |
6444 | 6444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1573 | 1573 | | |
1574 | 1574 | | |
1575 | 1575 | | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
1576 | 1580 | | |
1577 | | - | |
1578 | | - | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
1579 | 1585 | | |
1580 | 1586 | | |
1581 | 1587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3063 | 3063 | | |
3064 | 3064 | | |
3065 | 3065 | | |
3066 | | - | |
| 3066 | + | |
| 3067 | + | |
3067 | 3068 | | |
3068 | | - | |
3069 | | - | |
| 3069 | + | |
3070 | 3070 | | |
3071 | 3071 | | |
3072 | 3072 | | |
| |||
4028 | 4028 | | |
4029 | 4029 | | |
4030 | 4030 | | |
4031 | | - | |
| 4031 | + | |
4032 | 4032 | | |
4033 | | - | |
| 4033 | + | |
4034 | 4034 | | |
4035 | 4035 | | |
4036 | 4036 | | |
| |||
4304 | 4304 | | |
4305 | 4305 | | |
4306 | 4306 | | |
| 4307 | + | |
4307 | 4308 | | |
4308 | 4309 | | |
4309 | 4310 | | |
4310 | 4311 | | |
4311 | | - | |
| 4312 | + | |
4312 | 4313 | | |
4313 | | - | |
| 4314 | + | |
| 4315 | + | |
4314 | 4316 | | |
4315 | 4317 | | |
| 4318 | + | |
| 4319 | + | |
4316 | 4320 | | |
4317 | 4321 | | |
4318 | | - | |
| 4322 | + | |
4319 | 4323 | | |
4320 | 4324 | | |
4321 | 4325 | | |
| |||
8537 | 8541 | | |
8538 | 8542 | | |
8539 | 8543 | | |
8540 | | - | |
| 8544 | + | |
8541 | 8545 | | |
8542 | 8546 | | |
8543 | 8547 | | |
| |||
8864 | 8868 | | |
8865 | 8869 | | |
8866 | 8870 | | |
8867 | | - | |
| 8871 | + | |
8868 | 8872 | | |
8869 | 8873 | | |
8870 | 8874 | | |
| |||
9239 | 9243 | | |
9240 | 9244 | | |
9241 | 9245 | | |
9242 | | - | |
| 9246 | + | |
| 9247 | + | |
9243 | 9248 | | |
9244 | 9249 | | |
9245 | 9250 | | |
| |||
0 commit comments