test_image_load_typed: model tagged descriptor hits #2160
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2160"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-26T00:30:12Z.
Summary
tests/test_image_load_typed.pywent red after #2098 because the tagged descriptor probe now returns(index, kind)as%desc_hit, while the test's small branch evaluator still modelled%desc_lookup_fnas returning the bare integer index. Extracting component 1 therefore indexed an int.This updates only the test model: a tagged hit is a composite of the supplied index and a sampled-only kind word (sampled-dimension bits set, no storage-array bits); a miss remains index zero. No translator or runtime behavior changes.
Verification
Under the machine lock:
python -m compileall -q tests/test_image_load_typed.py tools/rdna2spirv.py— passorigin/maincopy oftests/test_image_load_typed.py— 28 run, 7 errors (TypeError: 'int' object is not subscriptable)python -I tests/test_image_load_typed.py— 28 run, OKNo game data or GPU required.
AI-assisted (Devin).
Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-26T00:49:57Z.
Confirmed on Linux (Python 3.14.8): on current main
61732aca1,tests/test_image_load_typed.pyfails witherrors=7(TypeError: 'int' object is not subscriptable, as described); with this head's copy of the file it passes (OK (skipped=2)).The model matches the encoding:
tools/rdna2spirv.pylays the kind word out as biti= bound in dimensioni's sampled array and bit8 + i= in its storage arrays (DESC_SAMPLED_BIT/DESC_STORAGE_BIT, shared withruntime/src/descriptor_table.h), and%desc_hitisOpCompositeConstruct %desc_hit {index} {kind}. So(index, 0x3F)is "sampled in every dimension, in no storage array", and(0, 0)for a miss, which is what these tests want. Test-only, no translator change. Looks right; it turns a red file on main green.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-26T01:43:39Z.
Merged, thanks! #2098 made the tagged descriptor probe return an
(index, kind)pair, and this test's model now answers with one: a sampled-only hit, no storage-array bit.mainad41fd517+a64c4c163: the semantic suite passes (495 files, 6,333 tests, 0 files failed);test_image_load_typedpass; the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 1 changed files.AI-assisted (Claude Code, Claude Opus 5.5).