startup: typed buffer load of BUF_FMT_16_16_16_16_FLOAT is refused (5 of 29 loading-screen shader refusals) #1688

Closed
opened 2026-11-24 17:18:28 +00:00 by triggered02 · 0 comments
triggered02 commented 2026-11-24 17:18:28 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T17:18:28Z.


Found while triaging the refusals in the first main-game loading-screen shader cache (#870). 5 of 29 refused shaders.

Problem

gfx2hlsl's typed-buffer-load format table has the two-channel half-float form (BUF_FMT_16_16_FLOAT) but not the four-channel one, so a typed load of BUF_FMT_16_16_16_16_FLOAT is refused:

tbuffer_load_format_xyz v[0:2], v0, s[20:23], 0 format:[BUF_FMT_16_16_16_16_FLOAT] idxen
-> REFUSED: buffer format BUF_FMT_16_16_16_16_FLOAT

BUF_FMT_16_16_16_16_FLOAT stores four binary16 channels in one 8-byte element: x and y in the first dword, z and w in the second. The two-channel entry already shows the intended conversion (U(f16tof32(w))), so the four-channel case is the same rule applied to both dwords.

Measured

Decoded from real bytes in the cache (00203aea00000580), main at bc65bb1b:

form before expected
tbuffer_load_format_xyz ... BUF_FMT_16_16_16_16_FLOAT refused x = f16tof32(dword0), y = f16tof32(dword0 >> 16), z = f16tof32(dword1)
tbuffer_load_format_xyzw ... same format refused plus w = f16tof32(dword1 >> 16)
tbuffer_load_format_x ... same format refused x only
a numeric format the table does not name refused stays refused
tbuffer_load_format_d16_xyz ... same format refused (no lowering) stays refused

Done when

  • The four-half format lowers for the x, xy and xyz forms, with x/y from the first dword and z/w from the second.
  • The test starts from encoded instructions and goes through decode(), then the translator.
  • A ctest covers the accepted forms and both refusals, and fails if the format entry is removed.
  • docs/experiments.md records the added format.

Not in this slice: other unnamed formats, the d16 forms, and proving the loading screen gets further (that needs a run that visibly reaches it; census counts are aggregates only).

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6587433746 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1695). Originally posted by [triggered02](https://github.com/triggered02) on 2026-11-24T17:18:28Z. --- Found while triaging the refusals in the first main-game loading-screen shader cache (#870). **5 of 29** refused shaders. ## Problem `gfx2hlsl`'s typed-buffer-load format table has the two-channel half-float form (`BUF_FMT_16_16_FLOAT`) but not the four-channel one, so a typed load of `BUF_FMT_16_16_16_16_FLOAT` is refused: ``` tbuffer_load_format_xyz v[0:2], v0, s[20:23], 0 format:[BUF_FMT_16_16_16_16_FLOAT] idxen -> REFUSED: buffer format BUF_FMT_16_16_16_16_FLOAT ``` `BUF_FMT_16_16_16_16_FLOAT` stores four binary16 channels in one 8-byte element: x and y in the first dword, z and w in the second. The two-channel entry already shows the intended conversion (`U(f16tof32(w))`), so the four-channel case is the same rule applied to both dwords. ## Measured Decoded from real bytes in the cache (`00203aea00000580`), `main` at `bc65bb1b`: | form | before | expected | |---|---|---| | `tbuffer_load_format_xyz ... BUF_FMT_16_16_16_16_FLOAT` | refused | x = f16tof32(dword0), y = f16tof32(dword0 >> 16), z = f16tof32(dword1) | | `tbuffer_load_format_xyzw ... same format` | refused | plus w = f16tof32(dword1 >> 16) | | `tbuffer_load_format_x ... same format` | refused | x only | | a numeric format the table does not name | refused | stays refused | | `tbuffer_load_format_d16_xyz ... same format` | refused (no lowering) | stays refused | ## Done when - The four-half format lowers for the x, xy and xyz forms, with x/y from the first dword and z/w from the second. - The test starts from encoded instructions and goes through `decode()`, then the translator. - A ctest covers the accepted forms and both refusals, and fails if the format entry is removed. - `docs/experiments.md` records the added format. Not in this slice: other unnamed formats, the `d16` forms, and proving the loading screen gets further (that needs a run that visibly reaches it; census counts are aggregates only). AI-assisted (Claude Code).
Sign in to join this conversation.
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
R0Y00/Xbox2Windows#1688
No description provided.