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

Manually merged
github merged 1 commit from gh-pr/44/head into gh-pr/44/base 2026-11-26 08:42:10 +00:00
Owner

@⁠Mby159 on GitHub · 2026-11-24 02:06 UTC · original
Mby159:docs/cube-store-contract → main · +2 −2 · 1 files · 1 commits · merged 2026-11-24 03:09 UTC

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).

**@⁠Mby159** on GitHub · 2026-11-24 02:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/44) `Mby159:docs/cube-store-contract` → `main` · +2 −2 · 1 files · 1 commits · merged 2026-11-24 03:09 UTC 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).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:42:08 +00:00
github manually merged commit a5a22ad7a9 into gh-pr/44/base 2026-11-26 08:42:10 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.