Preserve integer bits in typed buffer stores #109

Manually merged
github merged 1 commit from github-bot/gh-109 into main 2026-11-27 02:43:07 +00:00 AGit
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:33 UTC · original
TaynanGT:fix/typed-integer-store-nan-guard → main · +72 −9 · 3 files · 1 commits · merged 2026-11-27 02:28 UTC

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.

**@⁠TaynanGT** on GitHub · 2026-11-27 01:33 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/109) `TaynanGT:fix/typed-integer-store-nan-guard` → `main` · +72 −9 · 3 files · 1 commits · merged 2026-11-27 02:28 UTC ## 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://git.gtahub.st/github/TaynanGT--Vice-Tay/pulls/27).
Apply the NaN guard to float views and keep the existing typed handle. Advance the translation cache version so default launches recompile affected shaders.

Follow-up to the review of TaynanGT/Vice-Tay#27.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:11:05 +00:00
github manually merged commit 4847223d8c into main 2026-11-27 02:43:07 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.