xshader: join the unpacked FP64 significand from two scalars #593

Merged
NickStallman merged 1 commit from upstream-pr/593 into main 2026-11-30 23:16:30 +00:00
NickStallman commented 2026-11-30 18:41:16 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T18:41:16Z.


Refs #533 (follow-up to #546).

tb_f64_unpack assigned its out significand on three paths, one of them before an early return. With -fnew-inlining-behavior DXC leaves that as a merge of vectors, which its validator refuses ("Instructions must be of an allowed type"). So the programs holding soft FP64 arithmetic fail the launcher's fast compile and take the slower route. The helper now computes the two words as scalars and assigns the vector once at the end. Its results are unchanged (read; the GPU check compares words with a reference).

@JeffreyBytes confirmed on #592 that the 17 programs behind it are all FP64 ones and that this clears them (17 of 17 failed validation before, 17 of 17 pass after).

Measured (the DXC compile followed by dxv, in one time; DXC 1.9.2609, -O1 -disable-lifetime-markers -fnew-inlining-behavior, then dxv, 32-lane host translation, one core), three of the large volumetrics programs #546 newly accepts:

Program main with this
1 DXC exits 5, validation fails passes, 4 s
2 DXC exits 5, validation fails passes, 8 s
3 (the largest, 3.29 MB HLSL) DXC exits 5, validation fails passes, 42 s

Effect on recorded ProjectScarlett requests: 10,734 compute jobs (5,367 requests, both hosts) against a564e8c0: 17 requests change on each host, all of the transmission-volumetrics families, each by +200 bytes; none newly accepted or refused. Vertex, mesh and pixel stages were not surveyed (the helper is only emitted for FP64 programs, and no such recorded program was in the earlier translated set).

It doesn't shrink those programs: the FP64 helpers are 1% of the text. The size is the two-halves wrapper; I'll propose a change for that separately if it looks worthwhile.

Tested

  • A new text-level unit test fails on main and passes here.
  • Full python tuxbox.py check of 6fb04f1b (on bbc26254, GE-Proton11-14): RTX 5090 (10de:2b85, 620.70.10) 203 pass, 0 fail; AMD iGPU (1002:13c0, RADV) 202 pass, 0 fail.

Not run: the launcher's own compile route end to end, the game. Main has moved since (twelve commits to 451db047); the branch merges cleanly.

Evidence: TuxBox check of 6fb04f1b7a, no uncommitted changes, GPU 10de:2b85: 17 passed, 0 failed, 0 not run
Evidence: TuxBox check of 6fb04f1b7a, no uncommitted changes, GPU 1002:13c0: 17 passed, 0 failed, 0 not run

🤖 Generated with Claude Code

<!-- greyfinch-sync:brcly/TuxBox:issue:5571484334 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/593). Originally posted by [NickStallman](https://github.com/NickStallman) on 2026-11-30T18:41:16Z. --- Refs #533 (follow-up to #546). `tb_f64_unpack` assigned its `out` significand on three paths, one of them before an early return. With `-fnew-inlining-behavior` DXC leaves that as a merge of vectors, which its validator refuses ("Instructions must be of an allowed type"). So the programs holding soft FP64 arithmetic fail the launcher's fast compile and take the slower route. The helper now computes the two words as scalars and assigns the vector once at the end. Its results are unchanged (read; the GPU check compares words with a reference). @JeffreyBytes confirmed on #592 that the 17 programs behind it are all FP64 ones and that this clears them (17 of 17 failed validation before, 17 of 17 pass after). **Measured** (the DXC compile followed by `dxv`, in one time; DXC 1.9.2609, `-O1 -disable-lifetime-markers -fnew-inlining-behavior`, then `dxv`, 32-lane host translation, one core), three of the large volumetrics programs #546 newly accepts: | Program | main | with this | |---|---|---| | 1 | DXC exits 5, validation fails | passes, 4 s | | 2 | DXC exits 5, validation fails | passes, 8 s | | 3 (the largest, 3.29 MB HLSL) | DXC exits 5, validation fails | passes, 42 s | **Effect on recorded ProjectScarlett requests:** 10,734 compute jobs (5,367 requests, both hosts) against a564e8c0: 17 requests change on each host, all of the transmission-volumetrics families, each by +200 bytes; none newly accepted or refused. Vertex, mesh and pixel stages were not surveyed (the helper is only emitted for FP64 programs, and no such recorded program was in the earlier translated set). It doesn't shrink those programs: the FP64 helpers are 1% of the text. The size is the two-halves wrapper; I'll propose a change for that separately if it looks worthwhile. ## Tested - A new text-level unit test fails on main and passes here. - Full `python tuxbox.py check` of 6fb04f1b (on bbc26254, GE-Proton11-14): RTX 5090 (`10de:2b85`, 620.70.10) 203 pass, 0 fail; AMD iGPU (`1002:13c0`, RADV) 202 pass, 0 fail. **Not run:** the launcher's own compile route end to end, the game. Main has moved since (twelve commits to 451db047); the branch merges cleanly. Evidence: TuxBox check of 6fb04f1b7ae9, no uncommitted changes, GPU 10de:2b85: 17 passed, 0 failed, 0 not run Evidence: TuxBox check of 6fb04f1b7ae9, no uncommitted changes, GPU 1002:13c0: 17 passed, 0 failed, 0 not run 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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
brcly/TuxBox!593
No description provided.