docs/design.md: the cube storage image contract (DOC-CUBE-STORE) #44

Merged
Mby159 merged 1 commit from upstream-pr/44 into main 2026-11-24 03:09:44 +00:00
Mby159 commented 2026-11-24 02:06:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Mby159 on 2026-11-24T02:06:39Z.


claiming: DOC-CUBE-STORE

The contract table in docs/design.md still describes the state before cube storage images were supported.

"Coherent image accesses (glc)" ended with

glc on a sampled read (image_sample*, image_gather*, image_load_mip) or on a dimension without storage views (cube) is Unsupported

but a cube does have a storage view now: the translator maps dim:SQ_RSRC_IMG_CUBE to the 2D-array view, and a coherent image_load on a cube is accepted. The row now says that a sampled read is still Unsupported, and that a cube has no storage view of its own because it is bound as a six-layer 2D array, with bindings 11/12/13 and the third coordinate as the face.

"Typed image stores" listed only 2D, 2D array and 3D. It now lists cube as well, and spells out the binding (bindings 11/12/13 for float/uint/sint, OpTypeImage ... 2D 0 1 0 2 Unknown, %v3int coordinates (x, y, face)), that tfe and lwe are refused, and how the rule was confirmed.

How it was confirmed

CPU-checked by tests/semantic/test_image_cube_store_glc.py (image_store and coherent image_load on dim:SQ_RSRC_IMG_CUBE across dmask subsets, a16, d16, unorm, and the CS and PS stages, with spirv-val on every generated module). Not GPU-verified: no GPU fixture covers a cube store, so the row says so instead of claiming a GPU check.

Checks

  • python -I scripts/check_no_game_data.py docs/design.md - clean.
  • python -m unittest discover -s tests/semantic -p test_image_cube_store_glc.py - 9 tests, OK (2 skipped).
  • python -I scripts/run_semantic_tests.py tests/semantic on this main: 463 files, 6075 tests, 2 files failed (test_exec_computed, test_image_atomics_guard) - unchanged by this edit, which touches documentation only.

No game files; documentation only. AI-assisted (MiniMax Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5464706369 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/44). Originally posted by [Mby159](https://github.com/Mby159) on 2026-11-24T02:06:39Z. --- claiming: DOC-CUBE-STORE The contract table in `docs/design.md` still describes the state before cube storage images were supported. **"Coherent image accesses (`glc`)"** ended with > `glc` on a sampled read (`image_sample*`, `image_gather*`, `image_load_mip`) or on a dimension without storage views (cube) is `Unsupported` but a cube does have a storage view now: the translator maps `dim:SQ_RSRC_IMG_CUBE` to the 2D-array view, and a coherent `image_load` on a cube is accepted. The row now says that a sampled read is still `Unsupported`, and that a cube has no storage view of its own because it is bound as a six-layer 2D array, with bindings 11/12/13 and the third coordinate as the face. **"Typed image stores"** listed only 2D, 2D array and 3D. It now lists cube as well, and spells out the binding (bindings 11/12/13 for float/uint/sint, `OpTypeImage ... 2D 0 1 0 2 Unknown`, `%v3int` coordinates (x, y, face)), that `tfe` and `lwe` are refused, and how the rule was confirmed. ## How it was confirmed CPU-checked by `tests/semantic/test_image_cube_store_glc.py` (image_store and coherent image_load on `dim:SQ_RSRC_IMG_CUBE` across dmask subsets, a16, d16, unorm, and the CS and PS stages, with `spirv-val` on every generated module). **Not GPU-verified**: no GPU fixture covers a cube store, so the row says so instead of claiming a GPU check. ## Checks - `python -I scripts/check_no_game_data.py docs/design.md` - clean. - `python -m unittest discover -s tests/semantic -p test_image_cube_store_glc.py` - 9 tests, OK (2 skipped). - `python -I scripts/run_semantic_tests.py tests/semantic` on this main: 463 files, 6075 tests, 2 files failed (`test_exec_computed`, `test_image_atomics_guard`) - unchanged by this edit, which touches documentation only. No game files; documentation only. AI-assisted (MiniMax 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
ProjectLeonida/mandy!44
No description provided.