Commit d7a0760
Fix min precision store widening: scope to ByteAddressBuffer only
The store widening for min precision types was applying to both
RawBufferStore (scalar) and RawBufferVectorStore (vector). This
broke StructuredBuffer stores (struct_buf3.hlsl) because it replaced
the correct sext/zext from TranslateMinPrecisionRawBuffer with a
blanket sext, losing signedness info for min16uint.
Scope the RawBufferStore widening to RawBuffer (ByteAddressBuffer)
only. StructuredBuffer scalar stores are correctly handled by the
later TranslateMinPrecisionRawBuffer pass in DxilGenerationPass,
which has signedness info from struct type annotations.
ByteAddressBuffer scalar stores still need widening here because
the later pass crashes on non-struct resource types (cast<StructType>
on ByteAddressBuffer's i32 inner element).
Co-authored-by: Copilot <[email protected]>1 parent 81a1f81 commit d7a0760
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4603 | 4603 | | |
4604 | 4604 | | |
4605 | 4605 | | |
4606 | | - | |
4607 | | - | |
| 4606 | + | |
| 4607 | + | |
| 4608 | + | |
| 4609 | + | |
| 4610 | + | |
| 4611 | + | |
| 4612 | + | |
| 4613 | + | |
4608 | 4614 | | |
4609 | 4615 | | |
4610 | 4616 | | |
| |||
0 commit comments