Skip to content

docs/design.md: the typed-image-store row names the 1D and cube dims, and a test keeps it in step with STORE_DIMS - #7461

Open
evilclanker9000 wants to merge 2 commits into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/1-design-store-dims
Open

evilclanker9000 wants to merge 2 commits into
ItsNotRexed:mainfrom
evilclanker9000:deepseek/1-design-store-dims

Conversation

@evilclanker9000

Copy link
Copy Markdown
Contributor

Item: EGEN-DESIGN-IMAGE-STORE-DIMS (claimed in #7333: #7333 (comment))

What and why

docs/design.md's "Typed image stores" row listed image_store as "(2D, 2D array, 3D)" and its view indices as "dim 0 = 2D, 1 = 2D array, 2 = 3D", but the store path serves two more dimensions today:

AGENTS.md makes the contract table the record of every translator rule, with how it was confirmed, so a row that lists fewer dimensions than the code reads as a refusal that no longer exists: a reader of the row would conclude that a cube image_store is still Unsupported. The row now names both dimensions, gives their view indices and bindings, and says how each is confirmed (CPU only).

The second commit adds ests/test_design_store_dims_row.py, which derives the dimension names from Gen.STORE_DIMS and from the SQ_RSRC_IMG_* aliases in Gen.image_store's own source. The next dimension the store path learns therefore cannot land without a row that names it. A negative control proves that a short row is reported.

Test (before/after)

`
python -I tests/test_design_store_dims_row.py # at upstream/main (d90444f, before any commit)
FAIL: test_the_row_names_every_store_dimension
AssertionError: Lists differ: ['1D', 'CUBE'] != [] : docs/design.md's 'Typed image stores' row does not name
these dimensions that image_store serves (add them, with how each was confirmed)

python -I tests/test_design_store_dims_row.py # at the PR head
Ran 2 tests in 0.003s
OK
`

The claims the row makes are the ones the code and the existing CPU tests show:

`
python -m unittest discover -s tests/semantic -p test_image_cube_store_glc.py
Ran 9 tests in 1.026s
OK (skipped=2) # spirv-val and llvm-mc are not on PATH here

python -m unittest discover -s tests/semantic -p test_image_store_d16.py -k test_sparse_dmasks_pack_enabled_components_consecutively
Ran 1 test in 0.119s
OK # the 1D dmask:0x4 d16 store and its (5,) coordinate

python -I tests/test_docs_design_rows.py # OK, 5 tests (row shape, one row per topic)
python -I tests/test_design_contract_rows.py # OK, 4 tests (no repeated row)
python -I tests/test_ci_registration.py # OK, 14 tests (the new file is selected by CI)
`

No GPU is needed, and none was used: the row says "Not GPU-verified" because no GPU fixture on main stores to a cube or 1D image (only ps_cube_sample.asm samples one).

Notes

AI-assisted.

The row listed 2D, 2D array and 3D, but STORE_DIMS also serves 1D (index 3, bindings 17-19) and ItsNotRexed#6805 maps SQ_RSRC_IMG_CUBE onto the 2D-array views (dim 1, bindings 11-13, (x, y, face)). Name both, with how each is confirmed: tests/semantic/test_image_cube_store_glc.py and the 1D dmask:0x4 d16 case in tests/semantic/test_image_store_d16.py, neither GPU-verified.
Reads the dimension names from Gen.STORE_DIMS and the SQ_RSRC_IMG_* aliases in Gen.image_store, so the next dimension the store path learns cannot land without a row that names it (it fails on the previous commit with 1D and CUBE missing). Standard library only; a negative control proves a short row is reported.
@morodirule

Copy link
Copy Markdown

Tested d983db9 on Arch Linux, Python 3.14.10, CPU only: pass — first Linux check (no checks ran yet, zero comments before).

  • New tests/test_design_store_dims_row.py: 2/2 OK. Negative control: same file against the merge-base's docs/design.md fails (test_the_row_names_every_store_dimension), so it discriminates.
  • Related suites: test_docs_design_rows 5/5 OK.
  • test_docs_links 6/7: the 1 failure (dev-tools.md fence anchor) reproduces identically on clean origin/main — pre-existing and unrelated (this PR touches design.md only).

No game files, no GPU. AI-assisted.

@Daazd

Daazd commented Nov 23, 2026

Copy link
Copy Markdown

Independent check (Linux, Python 3.12.3, Node 24.13, CPU only, no game files): head d983db9c9 merged onto main 6a4299563: merges clean.

  • python3 -m unittest discover -s tests/semantic -p test_image_store_d16.py: Ran 4 tests in 0.272s FAILED (failures=1) (exit 1)
  • python3 -I tests/test_design_store_dims_row.py: Ran 2 tests in 0.003s OK (exit 0)

Its own test passes. Note: it does not turn test_image_store_d16 green (still red on main from #6805); #7194 or #7284 does that.

AI-assisted (Claude Code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants