docs(shader): record the measured cube-T# store formats #16491

Merged
brumskysb merged 2 commits from upstream-pr/16491 into main 2026-11-10 17:16:19 +00:00
brumskysb commented 2026-11-06 22:07:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by brumskysb on 2026-11-06T22:07:18Z.


What

Records the remaining store formats of the "2D accesses through a cube T#" entry. Its gap clause read "Other formats, and Crimson Desert's own 256x256 tiled descriptor, are not measured"; four more formats are now measured, and the tiled descriptor stays unmeasured with the entry still saying so.

On gfx1036 (driver 31.0.22044.1), stores of 8_8_8_8_UNORM (56), 8_8_8_8_SNORM (57), 16_16_FLOAT (29) and 32_SINT (21) through a cube T# land on the T#'s BASE_ARRAY face and change no other byte of the 64 KiB backing, at BASE_ARRAY 0 and 6. Two observations go in with them, both taken from the same runs:

  • a dmask:0x1 store writes the components in dmask and zeroes the rest of the texel rather than leaving them — 8_8_8_8_UNORM texel 1 reads 0x00000004 on a 0xcd backing, G/B/A zero;
  • a 32-bit store is raw — 32_SINT stores 0x3f800000 for a value of 1.0, the register dword unchanged, so no conversion happens on the store path.

Evidence (scripts, every dump, the full step record): https://gist.github.com/brumskysb/0f2d44c209a50bfbfd23f2a1ac451e86

Tested

  • GPU: AMD Radeon(TM) Graphics, integrated RDNA2, gfx1036, driver 31.0.22044.1, Windows 11 build 26300. Harness tools/hw-oracle, wave32, 64 rows per dispatch, 8x8 image at a 256-byte row pitch, T# type nibble 11 (Cube), DEPTH 11.
  • 304 dispatches: six formats x 16 readback windows at BASE_ARRAY 0, the same six at BASE_ARRAY 6, and a determinism repeat.
  • Every format moved exactly its face — 64 dwords, or 128 for the 8-byte 16_16_16_16_FLOAT texels — with 0 dwords outside the face and 0 face dwords untouched, at both base arrays.
  • Determinism: 8_8_8_8_UNORM re-run from scratch (16 fresh dispatches), 16,384 dwords, 0 differ. The 32_FLOAT control repeats identically too.
  • The readback is not sampled: each dispatch reads the whole 64 KiB, and the instrument was proven before any store by reading the untouched backing and finding 0 non-marker words.

Notes

  • Corrected after review, before merge. An independent read of this entry found the first version overreached: "a 32-bit store is raw" was disprovable by this same sentence's own 8_8_8_8_UNORM result, the dmask claim was demonstrated for two formats at BASE_ARRAY 0 only, wave32 was unstated after a preceding sentence that says "wave32 and wave64", and the console exclusion was missing. The sentence now states the 32_SINT finding as the observation it is and scopes the rest to what was measured.

  • The entry is 3,274 characters, over the 1,000-character guideline, so the debt-length warning is expected. The growth is +457 on an entry that was already 2,817 in main; nothing was trimmed to fit, and no measured condition was removed. Splitting this entry is a separate question from closing its gap clause.

  • Two model errors were caught by the measurement and are recorded in the gist rather than hidden: 32_SINT does not convert on the store path, and an 8-byte texel makes the face span 128 dwords, not 64.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attached to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: AMD Radeon(TM) Graphics (gfx1036, driver 31.0.22044.1, Windows 11)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5195339687 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16491). Originally posted by [brumskysb](https://github.com/brumskysb) on 2026-11-06T22:07:18Z. --- ### What Records the remaining store formats of the "2D accesses through a cube T#" entry. Its gap clause read "Other formats, and Crimson Desert's own 256x256 tiled descriptor, are not measured"; four more formats are now measured, and the tiled descriptor stays unmeasured with the entry still saying so. On gfx1036 (driver 31.0.22044.1), stores of `8_8_8_8_UNORM` (56), `8_8_8_8_SNORM` (57), `16_16_FLOAT` (29) and `32_SINT` (21) through a cube T# land on the T#'s `BASE_ARRAY` face and change no other byte of the 64 KiB backing, at `BASE_ARRAY` 0 and 6. Two observations go in with them, both taken from the same runs: - a `dmask:0x1` store writes the components in `dmask` and **zeroes the rest of the texel** rather than leaving them — `8_8_8_8_UNORM` texel 1 reads `0x00000004` on a `0xcd` backing, G/B/A zero; - a 32-bit store is **raw** — `32_SINT` stores `0x3f800000` for a value of `1.0`, the register dword unchanged, so no conversion happens on the store path. Evidence (scripts, every dump, the full step record): https://gist.github.com/brumskysb/0f2d44c209a50bfbfd23f2a1ac451e86 ### Tested - GPU: AMD Radeon(TM) Graphics, integrated RDNA2, `gfx1036`, driver **31.0.22044.1**, Windows 11 build 26300. Harness `tools/hw-oracle`, wave32, 64 rows per dispatch, 8x8 image at a 256-byte row pitch, T# type nibble 11 (`Cube`), `DEPTH` 11. - 304 dispatches: six formats x 16 readback windows at `BASE_ARRAY` 0, the same six at `BASE_ARRAY` 6, and a determinism repeat. - Every format moved exactly its face — 64 dwords, or 128 for the 8-byte `16_16_16_16_FLOAT` texels — with **0 dwords outside the face and 0 face dwords untouched**, at both base arrays. - Determinism: `8_8_8_8_UNORM` re-run from scratch (16 fresh dispatches), 16,384 dwords, **0 differ**. The 32_FLOAT control repeats identically too. - The readback is not sampled: each dispatch reads the whole 64 KiB, and the instrument was proven before any store by reading the untouched backing and finding 0 non-marker words. ### Notes - **Corrected after review, before merge.** An independent read of this entry found the first version overreached: "a 32-bit store is raw" was disprovable by this same sentence's own `8_8_8_8_UNORM` result, the `dmask` claim was demonstrated for two formats at `BASE_ARRAY` 0 only, `wave32` was unstated after a preceding sentence that says "wave32 and wave64", and the console exclusion was missing. The sentence now states the `32_SINT` finding as the observation it is and scopes the rest to what was measured. - **The entry is 3,274 characters**, over the 1,000-character guideline, so the `debt-length` warning is expected. The growth is +457 on an entry that was already 2,817 in `main`; nothing was trimmed to fit, and no measured condition was removed. Splitting this entry is a separate question from closing its gap clause. - Two model errors were caught by the measurement and are recorded in the gist rather than hidden: `32_SINT` does not convert on the store path, and an 8-byte texel makes the face span 128 dwords, not 64. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attached to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon(TM) Graphics (gfx1036, driver 31.0.22044.1, Windows 11) - [x] AI-assisted: yes
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
boykopovar/AnyPS5!16491
No description provided.