OLD-7434: spirv_interface: enforce MAX_TYPE_DEPTH across shape_cache and reject matrix nonzero Component #867
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!867
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/867/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?
@narekshaghoyandev on GitHub · 2026-11-24 14:50 UTC · original
narekshaghoyandev:ubiq-spirv-interface-depth-and-matrix-component→main· +59 −0 · 2 files · 1 commits · merged 2026-11-24 21:03 UTCReopening my original upstream PR #7434 (previously double-approved by
@leoleahyand@devnull34, verified on Linux + Windows 11) cleanly rebased ontomain:MAX_TYPE_DEPTHacrossshape_cache(_describe_type): Previously, caching a type's shape without tracking its subtree depth allowed a cached deep type to be wrapped in another outer type and bypassMAX_TYPE_DEPTH. Now tracks/checks subtree depth on cache hits soMAX_TYPE_DEPTHis enforced consistently.Componentdecoration (VUID-StandaloneSpirv-Component-04920): RejectsOpTypeMatrixinterface variables/members with nonzeroComponentinstead of silently accepting them.Verification
python3 -I tests/test_spirv_interface.py -v: 43/43 pass (2/2 fail againstmain).python3 -I tests/test_shader_link_check.py -v: 50/50 pass.python3 -I scripts/check_no_game_data.py tools/spirv_interface.py tests/test_spirv_interface.py: clean.python3 -m compileall -q tools/spirv_interface.py tests/test_spirv_interface.py: clean.Claimed in the coordination issue as: OLD-7434 (#14)
AI-assisted: yes (Gemini)
@abnalstlll-byte on GitHub · 2026-11-24 14:52 UTC · original · approved these changes
Audited and verified. Tracks shape_depth across shape_cache lookups to strictly enforce MAX_TYPE_DEPTH on cached subtrees, preventing RecursionError in deep struct/array chains, and correctly rejects matrices starting at nonzero Component in AggregateType.location_masks. Unit tests in ests/test_spirv_interface.py pass cleanly. Approved.
@KernelSmoker on GitHub · 2026-11-24 14:52 UTC · original · approved these changes
Reviewed exact head
3ccd1ac39700f6f85c83d5255b52fb8b9883bde3against base8f05e09e224656740e8a53f5047e1338d7a52588. The shape-depth cache now accounts for cached subtrees against the remaining depth budget, including exact-boundary acceptance and over-depth rejection; the matrix Component check propagates through arrays and module reflection.python3 -I tests/test_spirv_interface.py -vpasses 43/43, Python compilation andgit diff --checkpass. CPU-only; no game data or GPU used. Hosted checks were still pending at review time.@abnalstlll-byte on GitHub · 2026-11-24 14:53 UTC · original · approved these changes
Clean-Room Audit & Compiler Verification — PR #867 (
OLD-7434)Essential recursive depth protection and SPIR-V matrix layout validation.
Technical Verification
spirv_interface.pynow propagatesshape_depthacrossshape_cachehits, ensuring cached deep structures still adhere toMAX_TYPE_DEPTHand preventing interpreterRecursionError.Component.Verdict: APPROVED
@QemmHD on GitHub · 2026-11-24 21:03 UTC · original
Merging.
Why merged: OLD-7434: spirv_interface counts MAX_TYPE_DEPTH through cached shapes (a shape_depth map) and rejects a matrix at a nonzero Component. KernelSmoker approved this exact head.
Why it's good: Pure Python logic. Own tests: 43 passed.
Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main
66d4f5aa3. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests) gives 573 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main0b45fdc21: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls, new env vars or build/CI changes.AI-assisted (Claude Code, Claude Opus 5.5).