tombox-xshader: preserve quiet NaN on infinite subtraction in tb_fsub (fixes #333) #365

Closed
github-bot wants to merge 1 commit from gh-pr/365/head into gh-pr/365/base
Owner

@⁠FilimonEnc on GitHub · 2026-11-24 16:26 UTC · original
FilimonEnc:fix/xshader-fsub-inf-nan → main · +1 −1 · 1 files · 1 commits · closed without merging

On AMD RDNA2 GPU hardware (and certain host driver configurations), subtracting identical infinities in generated HLSL (inf - inf) can collapse to zero rather than yielding a quiet NaN (0x7fc00000). This caused failures in vop2_basic for v_sub_f32 and v_subrev_f32 (#642, #643, #707, #708) under TOMBOX_EXEC_HW=1 as documented in #333.

Explicitly detect identical infinite operands in tb_fsub and return asfloat(0x7fc00000u).

Fixes #333.

**@⁠FilimonEnc** on GitHub · 2026-11-24 16:26 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/365) `FilimonEnc:fix/xshader-fsub-inf-nan` → `main` · +1 −1 · 1 files · 1 commits · closed without merging On AMD RDNA2 GPU hardware (and certain host driver configurations), subtracting identical infinities in generated HLSL (`inf - inf`) can collapse to zero rather than yielding a quiet NaN (`0x7fc00000`). This caused failures in `vop2_basic` for `v_sub_f32` and `v_subrev_f32` (#642, #643, #707, #708) under `TOMBOX_EXEC_HW=1` as documented in #333. Explicitly detect identical infinite operands in `tb_fsub` and return `asfloat(0x7fc00000u)`. Fixes #333.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:20:24 +00:00
github-bot closed this pull request 2026-11-26 06:20:24 +00:00
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-25 13:51 UTC · original

Thanks. #375 contains the same tb_fsub fix plus NaN-input handling, so this is superseded.

**@⁠omonkeyz** on GitHub · 2026-11-25 13:51 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/365#issuecomment-7164394458) Thanks. #375 contains the same tb_fsub fix plus NaN-input handling, so this is superseded.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.