[PR #867] [MERGED] OLD-7434: spirv_interface: enforce MAX_TYPE_DEPTH across shape_cache and reject matrix nonzero Component #905

Closed
opened 2026-11-26 20:19:27 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/867
Author: @narekshaghoyandev
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: ubiq-spirv-interface-depth-and-matrix-component


📝 Commits (1)

  • 3ccd1ac spirv_interface: enforce MAX_TYPE_DEPTH across shape_cache and reject matrix nonzero Component

📊 Changes

2 files changed (+59 additions, -0 deletions)

View changed files

📝 tests/test_spirv_interface.py (+49 -0)
📝 tools/spirv_interface.py (+10 -0)

📄 Description

Reopening my original upstream PR #7434 (previously double-approved by @leoleahy and @devnull34, verified on Linux + Windows 11) cleanly rebased onto main:

  1. Enforce MAX_TYPE_DEPTH across shape_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 bypass MAX_TYPE_DEPTH. Now tracks/checks subtree depth on cache hits so MAX_TYPE_DEPTH is enforced consistently.
  2. Reject matrix nonzero Component decoration (VUID-StandaloneSpirv-Component-04920): Rejects OpTypeMatrix interface variables/members with nonzero Component instead of silently accepting them.

Verification

  • python3 -I tests/test_spirv_interface.py -v: 43/43 pass (2/2 fail against main).
  • 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 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135007136)
AI-assisted: yes (Gemini)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/867 **Author:** [@narekshaghoyandev](https://github.com/narekshaghoyandev) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `ubiq-spirv-interface-depth-and-matrix-component` --- ### 📝 Commits (1) - [`3ccd1ac`](https://github.com/ubiquitarianism/leonida/commit/3ccd1ac39700f6f85c83d5255b52fb8b9883bde3) spirv_interface: enforce MAX_TYPE_DEPTH across shape_cache and reject matrix nonzero Component ### 📊 Changes **2 files changed** (+59 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_spirv_interface.py` (+49 -0) 📝 `tools/spirv_interface.py` (+10 -0) </details> ### 📄 Description Reopening my original upstream PR #7434 (previously double-approved by `@leoleahy` and `@devnull34`, verified on Linux + Windows 11) cleanly rebased onto `main`: 1. **Enforce `MAX_TYPE_DEPTH` across `shape_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 bypass `MAX_TYPE_DEPTH`. Now tracks/checks subtree depth on cache hits so `MAX_TYPE_DEPTH` is enforced consistently. 2. **Reject matrix nonzero `Component` decoration (`VUID-StandaloneSpirv-Component-04920`)**: Rejects `OpTypeMatrix` interface variables/members with nonzero `Component` instead of silently accepting them. ### Verification - `python3 -I tests/test_spirv_interface.py -v`: 43/43 pass (2/2 fail against `main`). - `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 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135007136) AI-assisted: yes (Gemini) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:27 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#905
No description provided.