Preserve integer bits in typed buffer stores #109

Merged
TaynanGT merged 1 commit from upstream-pr/109 into main 2026-11-27 02:28:06 +00:00
TaynanGT commented 2026-11-27 01:33:56 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T01:33:56Z.


Changes

Typed buffer stores currently run their values through the floating-point NaN guard even when the destination has an integer format. The guard can change a valid integer with bits such as 0x7fc00000 or 0x7f800000.

The translator now uses the existing descriptor view-kind metadata for typed buffer stores. Integer views receive the original bits and float views keep NaN and infinity handling. The translator cache version advances to 4 so a normal cached launch can pick up the corrected DXIL.

Validation

  • Added a synthetic D3D12 test for unsigned, signed, and float buffer views. The same shader stores a canonical NaN bit pattern, both infinity bit patterns, and a finite float. The test checks the values read back from each view.
  • Reviewed the three-file diff and ran git diff --check. The Windows workflow passed Clippy, the default test suite and the diagnostics suite. The new typed-store test and both adjacent typed-load and d16 regressions are reported as passing in the default job.
  • The focused typed-store test also passed on the local Windows machine.

Follow-up to the original review on #27.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5519637498 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/109). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T01:33:56Z. --- ## Changes Typed buffer stores currently run their values through the floating-point NaN guard even when the destination has an integer format. The guard can change a valid integer with bits such as `0x7fc00000` or `0x7f800000`. The translator now uses the existing descriptor view-kind metadata for typed buffer stores. Integer views receive the original bits and float views keep NaN and infinity handling. The translator cache version advances to 4 so a normal cached launch can pick up the corrected DXIL. ## Validation - Added a synthetic D3D12 test for unsigned, signed, and float buffer views. The same shader stores a canonical NaN bit pattern, both infinity bit patterns, and a finite float. The test checks the values read back from each view. - Reviewed the three-file diff and ran `git diff --check`. The [Windows workflow](https://github.com/TaynanGT/Vice-Tay/actions/runs/45923282087) passed Clippy, the default test suite and the diagnostics suite. The new typed-store test and both adjacent typed-load and d16 regressions are reported as passing in the default job. - The focused typed-store test also passed on the local Windows machine. Follow-up to the [original review on #27](https://github.com/TaynanGT/Vice-Tay/pull/27#discussion_r4708374618).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
TaynanGT/Vice-Tay!109
No description provided.