[PR #215] test(runtime): distinguish wrong V# addresses from a broken draw #266

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/215
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: old-pr/9950


📝 Commits (1)

  • 30b664d test(runtime): distinguish wrong V# addresses from a broken draw

📊 Changes

1 file changed (+37 additions, -6 deletions)

View changed files

📝 runtime/test/d3d12_translated_draw_test.cpp (+37 -6)

📄 Description

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


🔄 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/215 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-pr/9950` --- ### 📝 Commits (1) - [`30b664d`](https://github.com/ubiquitarianism/leonida/commit/30b664d0d76ceb5d3b4ca23497b36f12d46d044d) test(runtime): distinguish wrong V# addresses from a broken draw ### 📊 Changes **1 file changed** (+37 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `runtime/test/d3d12_translated_draw_test.cpp` (+37 -6) </details> ### 📄 Description > 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` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#266
No description provided.