pe_shader_containers: parse and validate multi-image container layouts #53

Closed
Andretuta wants to merge 2 commits from upstream-pr/53 into main
Andretuta commented 2026-11-24 02:08:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:08:25Z.


Carried over from old PR 9775 by abnalstlll-byte in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9775, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
abnalstlll-byte: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Parse and validate multi-image shader container layouts in \ ools/pe_shader_containers.py.

What and why

PE shader containers can hold multiple shader stage images across distinct offset bounds. This PR:

  • Handles multi-image container layout parsing and boundary validation.
  • Adds comprehensive unit tests in \ ests/test_pe_shader_containers.py\ (21/21 pass).
  • Ensures deterministic layout extraction compliant with the \pe_loader\ contract.

Verification

  • \python -I tests/test_pe_shader_containers.py -v\ -> 21/21 tests pass.
  • \python -I scripts/check_no_game_data.py\ -> clean (zero game data).
  • \git diff --check\ -> clean.
  • Python standard library only, cross-platform compatible.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5464725424 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/53). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:08:25Z. --- > Carried over from **old PR 9775** by `abnalstlll-byte` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9775`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `abnalstlll-byte`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Parse and validate multi-image shader container layouts in \ ools/pe_shader_containers.py\. ### What and why PE shader containers can hold multiple shader stage images across distinct offset bounds. This PR: - Handles multi-image container layout parsing and boundary validation. - Adds comprehensive unit tests in \ ests/test_pe_shader_containers.py\ (21/21 pass). - Ensures deterministic layout extraction compliant with the \pe_loader\ contract. ### Verification - \python -I tests/test_pe_shader_containers.py -v\ -> 21/21 tests pass. - \python -I scripts/check_no_game_data.py\ -> clean (zero game data). - \git diff --check\ -> clean. - Python standard library only, cross-platform compatible. AI-assisted.
abnalstlll-byte commented 2026-11-24 08:02:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T08:02:48Z.


Verified clean and ready for review: 21/21 tests pass under python -I tests/test_pe_shader_containers.py -v, zero game data, deterministic multi-image container layout parsing.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7125661216 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/53#issuecomment-7125661216). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T08:02:48Z. --- Verified clean and ready for review: 21/21 tests pass under python -I tests/test_pe_shader_containers.py -v, zero game data, deterministic multi-image container layout parsing.
MoonEyes commented 2026-11-27 19:44:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-27T19:44:24Z.


Thanks a lot for carrying this over, @Andretuta. The same change is in #694, which @abnalstlll-byte opened to restore their own old PR 9775: it has the same two commits and the same diff to tools/pe_shader_containers.py and tests/test_pe_shader_containers.py, and it merges cleanly with main where this draft does not.

I am closing this draft so the review happens in one place. Please continue the discussion on #694, or reopen this one if you see something it misses.

AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7226823837 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/53#issuecomment-7226823837). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-27T19:44:24Z. --- Thanks a lot for carrying this over, @Andretuta. The same change is in #694, which @abnalstlll-byte opened to restore their own old PR 9775: it has the same two commits and the same diff to `tools/pe_shader_containers.py` and `tests/test_pe_shader_containers.py`, and it merges cleanly with `main` where this draft does not. I am closing this draft so the review happens in one place. Please continue the discussion on #694, or reopen this one if you see something it misses. AI-assisted (Claude Code, Claude Opus 5.5)

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!53
No description provided.