test_image_load_typed: model tagged descriptor hits #2160
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2160
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2160/head"
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?
@whoalin1 on GitHub · 2026-11-26 00:30 UTC · original
whoalin1:image-load-typed-desc-model→main· +5 −0 · 1 files · 1 commits · merged 2026-11-26 01:43 UTCSummary
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).
@qhukz13 on GitHub · 2026-11-26 00:49 UTC · original
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).
@aslan2142 on GitHub · 2026-11-26 01:43 UTC · original
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).