test(runtime): distinguish wrong V# addresses from a broken draw #215

Closed
Andretuta wants to merge 1 commit from upstream-pr/215 into main
Andretuta commented 2026-11-24 02:45:58 +00:00 (Migrated from github.com)

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


Carried over from old PR 9950 by guimsolutions in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9950, 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.
guimsolutions: 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):

Scope

Claim: https://github.com/ItsNotRexed/Leonida/issues/7496#issuecomment-7107971737 (new test-only item).
Related to the D3D-696 discussion and #7218, but no dependency: this builds and runs on main without either slot 133 implementation.

Run the existing M1.5 translated draw with the original vertex V#s, then change only the V# bases to point at in-bounds degenerate vertices in the same arena allocation. The pipeline, constants, draw calls, target, and readback are unchanged. The second frame must match the clear value in all 4,096 pixels. Restore the original V#s and require the original image bit for bit. The synthetic mapped-guest test keeps its original behavior.

This supplies a safe control for shader address diagnosis: no unmapped GPU pointer is dereferenced. It does not implement XMem mapping, decide how slot 133 is visible to shaders, test the sparse cross-queue path, or diagnose the retail black frames by itself.

Validation

  • Windows 11 / MSVC 19.44 RelWithDebInfo, RTX 4090 / NVIDIA 621.01, LEONIDA_VK_VALIDATION=1.
  • 4 passed, 0 failed, 0 skipped: d3d12_translated_draw, d3d12_translated_draw_guest, d3d12_m2_textured, d3d12_m3_frame. No validation errors reported.
  • Fault injection: deliberately left the redirect on the original in-bounds V# bases. The new pixel assertion failed; restoring the redirect made it pass.
  • git diff --check and scripts/check_no_game_data.py passed. Synthetic only, no game files.

AI-assisted (OpenAI Codex).

Previous contribution: #7565

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465113409 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/215). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:45:58Z. --- > Carried over from **old PR 9950** by `guimsolutions` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9950`, 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. > `guimsolutions`: 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): ## Scope Claim: https://github.com/ItsNotRexed/Leonida/issues/7496#issuecomment-7107971737 (new test-only item). Related to the D3D-696 discussion and `#7218`, but no dependency: this builds and runs on main without either slot 133 implementation. Run the existing M1.5 translated draw with the original vertex V#s, then change only the V# bases to point at in-bounds degenerate vertices in the same arena allocation. The pipeline, constants, draw calls, target, and readback are unchanged. The second frame must match the clear value in all 4,096 pixels. Restore the original V#s and require the original image bit for bit. The synthetic mapped-guest test keeps its original behavior. This supplies a safe control for shader address diagnosis: no unmapped GPU pointer is dereferenced. It does not implement XMem mapping, decide how slot 133 is visible to shaders, test the sparse cross-queue path, or diagnose the retail black frames by itself. ## Validation - Windows 11 / MSVC 19.44 RelWithDebInfo, RTX 4090 / NVIDIA 621.01, `LEONIDA_VK_VALIDATION=1`. - 4 passed, 0 failed, 0 skipped: `d3d12_translated_draw`, `d3d12_translated_draw_guest`, `d3d12_m2_textured`, `d3d12_m3_frame`. No validation errors reported. - Fault injection: deliberately left the redirect on the original in-bounds V# bases. The new pixel assertion failed; restoring the redirect made it pass. - `git diff --check` and `scripts/check_no_game_data.py` passed. Synthetic only, no game files. AI-assisted (OpenAI Codex). Previous contribution: `#7565`
aslan2142 commented 2026-12-01 12:13:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:13:54Z.


Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.

(AI-assisted triage.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7310837390 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/215#issuecomment-7310837390). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T12:13:54Z. --- Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review. *(AI-assisted triage.)*
aslan2142 commented 2026-12-01 16:28:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:28:54Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317677475 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/215#issuecomment-7317677475). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:28:54Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

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!215
No description provided.