Commit 41f37f9
Address review: refactor widenMinPrecisionType, extend to RawBufferStore
- widenMinPrecisionType now takes a single Type* (vector or scalar) and
LLVMContext instead of separate EltTy/VecOrScalarTy and IRBuilder.
- Load path uses widenMinPrecisionType upfront, eliminating the
else-if-isMinPrec branch per tex3d's suggestion.
- Store widening now covers both RawBufferStore and RawBufferVectorStore.
Without this, scalar min-precision stores crash with a cast type mismatch.
- Added scalar RawBufferLoad/Store test cases for all 3 min-precision types.
- Added TODO(#8314) for SExt/ZExt signedness issue.
Co-authored-by: Copilot <[email protected]>1 parent 8e7c6fb commit 41f37f9
2 files changed
Lines changed: 53 additions & 28 deletions
File tree
- lib/HLSL
- tools/clang/test/HLSLFileCheck/hlsl/objects/ByteAddressBuffer
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4327 | 4327 | | |
4328 | 4328 | | |
4329 | 4329 | | |
4330 | | - | |
4331 | | - | |
4332 | | - | |
4333 | | - | |
| 4330 | + | |
| 4331 | + | |
| 4332 | + | |
| 4333 | + | |
| 4334 | + | |
| 4335 | + | |
4334 | 4336 | | |
4335 | | - | |
4336 | | - | |
4337 | | - | |
4338 | | - | |
4339 | | - | |
| 4337 | + | |
| 4338 | + | |
| 4339 | + | |
| 4340 | + | |
| 4341 | + | |
4340 | 4342 | | |
4341 | 4343 | | |
4342 | 4344 | | |
| |||
4353 | 4355 | | |
4354 | 4356 | | |
4355 | 4357 | | |
4356 | | - | |
| 4358 | + | |
| 4359 | + | |
| 4360 | + | |
| 4361 | + | |
4357 | 4362 | | |
4358 | 4363 | | |
4359 | | - | |
4360 | | - | |
4361 | | - | |
4362 | | - | |
4363 | 4364 | | |
4364 | 4365 | | |
4365 | | - | |
| 4366 | + | |
4366 | 4367 | | |
4367 | | - | |
4368 | | - | |
4369 | | - | |
4370 | | - | |
4371 | | - | |
4372 | | - | |
4373 | | - | |
4374 | 4368 | | |
4375 | 4369 | | |
4376 | 4370 | | |
| |||
4612 | 4606 | | |
4613 | 4607 | | |
4614 | 4608 | | |
4615 | | - | |
4616 | | - | |
| 4609 | + | |
| 4610 | + | |
| 4611 | + | |
| 4612 | + | |
| 4613 | + | |
4617 | 4614 | | |
4618 | 4615 | | |
4619 | | - | |
| 4616 | + | |
4620 | 4617 | | |
4621 | 4618 | | |
4622 | 4619 | | |
4623 | 4620 | | |
| 4621 | + | |
| 4622 | + | |
4624 | 4623 | | |
4625 | 4624 | | |
4626 | 4625 | | |
| |||
tools/clang/test/HLSLFileCheck/hlsl/objects/ByteAddressBuffer/min_precision_vector_load_store.hlsl
Lines changed: 29 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
32 | 54 | | |
33 | 55 | | |
34 | 56 | | |
35 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
36 | 62 | | |
0 commit comments