tests: launch the draw and scene guests with PC command lists (TEST-GUEST-DRAW-LIST-ABI) #1541

Closed
Rain156 wants to merge 1 commit from upstream-pr/1541 into main
Rain156 commented 2026-11-25 03:56:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Rain156 on 2026-11-25T03:56:05Z.


Claimed in the coordination issue as: TEST-GUEST-DRAW-LIST-ABI. Claim

Depends on: #984 (merged).

What and why

Both render launchers run tiny_guest_draw.exe, built against the Windows SDK. On current main they start the loader with its default Xbox command-list method order. The first frame calls the wrong methods and Close() returns E_INVALIDARG. The native in-process draw already selects the matching interface.

Set the existing LEONIDA_D3D12_LISTS=pc in the CMake single-draw launcher and in the child environment of the Python scene runner. This scopes the setting to the fixture process and records it in the Python run report.

Tested

Windows 11 x64, MSVC RelWithDebInfo, NVIDIA GeForce RTX 5070 Ti, driver 617.42, main bfef489cb. All scene inputs are synthetic.

  • Before the change, CTests d3d12_translated_draw_guest and d3d12_guest_scene both failed on frame 1 when the fixture closed its list. Supplying the matching ABI in the parent made both pass.
  • Ran both updated launchers with the parent explicitly requesting the console list order. The single draw passed its 4,096-pixel check. The scene completed all 600 frames, reproduced the saved run on resume, and rejected both a corrupted scene and a corrupted checkpoint. The frame-chain digest was 424a0ed99442a42a.
  • The six guest-scene reference tests and the changed-file game-data check passed. The translator suite on the shared base passed all 6,279 tests in 487 files.

AI-assisted: Yes (Codex).

The claim linked above was posted before this PR. Issue #14 reached GitHub's 2,500-comment limit before the completion notice could be posted.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5484883941 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1541). Originally posted by [Rain156](https://github.com/Rain156) on 2026-11-25T03:56:05Z. --- Claimed in the coordination issue as: TEST-GUEST-DRAW-LIST-ABI. [Claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7152211519) Depends on: #984 (merged). ### What and why Both render launchers run `tiny_guest_draw.exe`, built against the Windows SDK. On current main they start the loader with its default Xbox command-list method order. The first frame calls the wrong methods and `Close()` returns `E_INVALIDARG`. The native in-process draw already selects the matching interface. Set the existing `LEONIDA_D3D12_LISTS=pc` in the CMake single-draw launcher and in the child environment of the Python scene runner. This scopes the setting to the fixture process and records it in the Python run report. ### Tested Windows 11 x64, MSVC RelWithDebInfo, NVIDIA GeForce RTX 5070 Ti, driver 617.42, main `bfef489cb`. All scene inputs are synthetic. - Before the change, CTests `d3d12_translated_draw_guest` and `d3d12_guest_scene` both failed on frame 1 when the fixture closed its list. Supplying the matching ABI in the parent made both pass. - Ran both updated launchers with the parent explicitly requesting the console list order. The single draw passed its 4,096-pixel check. The scene completed all 600 frames, reproduced the saved run on resume, and rejected both a corrupted scene and a corrupted checkpoint. The frame-chain digest was `424a0ed99442a42a`. - The six guest-scene reference tests and the changed-file game-data check passed. The translator suite on the shared base passed all 6,279 tests in 487 files. AI-assisted: Yes (Codex). The claim linked above was posted before this PR. Issue #14 reached GitHub's 2,500-comment limit before the completion notice could be posted.
PierreEbele commented 2026-11-25 15:38:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T15:38:35Z.


Reviewed 6824246: this is a code-reading review; I could not execute the guest draw here (no MSVC/Vulkan GPU/cmake). I confirmed the shim side (unset LEONIDA_D3D12_LISTS wraps lists in the console vtable) and that the guest is compiled against the Windows SDK headers, so both launchers need pc lists, the same fix check_tiny_frame.py already has on main. run_guest_scene.py imports and arg-parses identically before/after (--help 0, no-args 2). One follow-up: runtime/README.md's guest-draw Wine example still lacks LEONIDA_D3D12_LISTS=pc.

AI-assisted review.

Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7167157840 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1541#issuecomment-7167157840). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T15:38:35Z. --- Reviewed 6824246: this is a code-reading review; I could not execute the guest draw here (no MSVC/Vulkan GPU/cmake). I confirmed the shim side (unset LEONIDA_D3D12_LISTS wraps lists in the console vtable) and that the guest is compiled against the Windows SDK headers, so both launchers need pc lists, the same fix check_tiny_frame.py already has on main. run_guest_scene.py imports and arg-parses identically before/after (--help 0, no-args 2). One follow-up: runtime/README.md's guest-draw Wine example still lacks LEONIDA_D3D12_LISTS=pc. AI-assisted review. **Recommendation:** Merge
plamea commented 2026-11-26 15:56:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by plamea on 2026-11-26T15:56:06Z.


Reproduced on Windows 11 (build 26300), RTX 3050 Laptop GPU (4 GiB), NVIDIA 621.24, MSVC RelWithDebInfo, SDL 3.4.20, main fbf100b1b.

  • Unmodified d3d12_translated_draw_guest and d3d12_guest_scene failed at the first command list's Close(). run_tiny_first_run_ui and the in-process d3d12_translated_draw passed.
  • With the two launcher changes from 6824246d applied to fbf100b1b and the parent shell explicitly set to LEONIDA_D3D12_LISTS=console, the single-frame launcher passed its pixel checks. The headless scene runner passed all 600 frames, save/resume equivalence, and both negative controls. Its report recorded LEONIDA_D3D12_LISTS=pc in all five child runs.

All inputs for these tests were synthetic. AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7196949936 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1541#issuecomment-7196949936). Originally posted by [plamea](https://github.com/plamea) on 2026-11-26T15:56:06Z. --- Reproduced on Windows 11 (build 26300), RTX 3050 Laptop GPU (4 GiB), NVIDIA 621.24, MSVC RelWithDebInfo, SDL 3.4.20, `main` `fbf100b1b`. - Unmodified `d3d12_translated_draw_guest` and `d3d12_guest_scene` failed at the first command list's `Close()`. `run_tiny_first_run_ui` and the in-process `d3d12_translated_draw` passed. - With the two launcher changes from `6824246d` applied to `fbf100b1b` and the parent shell explicitly set to `LEONIDA_D3D12_LISTS=console`, the single-frame launcher passed its pixel checks. The headless scene runner passed all 600 frames, save/resume equivalence, and both negative controls. Its report recorded `LEONIDA_D3D12_LISTS=pc` in all five child runs. All inputs for these tests were synthetic. AI-assisted (Codex).
OreoFR commented 2026-11-28 21:52:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:52:12Z.


Verified by OreoFR

  • Base: main 3408969a7 + PR head 6824246d9; green run in a merge package of 3 PRs, no new ctest failure vs main
  • Test: package ctest; python -I tests/test_run_guest_scene.py
  • Red on main: not run
  • Green with the PR: package ctest with no new failure, test_run_guest_scene (from #352) 3 OK
  • Verdict: NO RED (only sets LEONIDA_D3D12_LISTS=pc for d3d12_translated_draw_guest and d3d12_guest_scene, opt-in tests that launch gta6rt: not run here)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246332623 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1541#issuecomment-7246332623). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:52:12Z. --- **Verified by OreoFR** - Base: main `3408969a7` + PR head `6824246d9`; green run in a merge package of 3 PRs, no new ctest failure vs main - Test: `package ctest; python -I tests/test_run_guest_scene.py` - Red on main: not run - Green with the PR: package ctest with no new failure, test_run_guest_scene (from #352) 3 OK - Verdict: NO RED (only sets LEONIDA_D3D12_LISTS=pc for d3d12_translated_draw_guest and d3d12_guest_scene, opt-in tests that launch gta6rt: not run here) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
zmasi commented 2026-11-29 01:49:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T01:49:48Z.


#1541 | head 6824246d9b (merged cleanly onto origin/main 59e65849b0) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes

Independent Verification (Windows 11)

  • Diff & safety audit: Inspected 100% of the diff across runtime/test/run_guest_draw.cmake (set(ENV{LEONIDA_D3D12_LISTS} pc)) and scripts/run_guest_scene.py ("LEONIDA_D3D12_LISTS": "pc" in Session.run). python -I scripts/check_no_game_data.py runtime/test/run_guest_draw.cmake scripts/run_guest_scene.py passed (rc=0).
  • Red -> Green on Windows 11:
    • Red (origin/main 59e65849b0): scripts/run_guest_scene.py's Session.run(...) omitted LEONIDA_D3D12_LISTS (None) from the launched process environment.
    • Green (#1541 + origin/main):
      • Session.run(...) sets LEONIDA_D3D12_LISTS="pc" in both the child process env and the recorded run metadata.
      • python -I tests/test_run_guest_scene_wine.py -> 8 ran, OK (skipped=5)
      • python -I tests/test_ctest_registration.py -> 7/7 passed (OK).
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7249040451 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1541#issuecomment-7249040451). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T01:49:48Z. --- #1541 | head 6824246d9b861954814b15905eae228065a9fb90 (merged cleanly onto origin/main 59e65849b0) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes ### Independent Verification (Windows 11) - **Diff & safety audit**: Inspected 100% of the diff across `runtime/test/run_guest_draw.cmake` (`set(ENV{LEONIDA_D3D12_LISTS} pc)`) and `scripts/run_guest_scene.py` (`"LEONIDA_D3D12_LISTS": "pc"` in `Session.run`). `python -I scripts/check_no_game_data.py runtime/test/run_guest_draw.cmake scripts/run_guest_scene.py` passed (`rc=0`). - **Red -> Green on Windows 11**: - **Red (`origin/main` `59e65849b0`)**: `scripts/run_guest_scene.py`'s `Session.run(...)` omitted `LEONIDA_D3D12_LISTS` (`None`) from the launched process environment. - **Green (`#1541 + origin/main`)**: - `Session.run(...)` sets `LEONIDA_D3D12_LISTS="pc"` in both the child process `env` and the recorded run metadata. - `python -I tests/test_run_guest_scene_wine.py` -> `8 ran, OK (skipped=5)` - `python -I tests/test_ctest_registration.py` -> `7/7` passed (`OK`).
Rain156 commented 2026-11-29 06:26:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Rain156 on 2026-11-29T06:26:14Z.


I don’t have time to continue working on this PR. If another contributor would like to take it over, please feel free. I’ll leave this PR open for reference.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7251853674 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1541#issuecomment-7251853674). Originally posted by [Rain156](https://github.com/Rain156) on 2026-11-29T06:26:14Z. --- I don’t have time to continue working on this PR. If another contributor would like to take it over, please feel free. I’ll leave this PR open for reference.
TheGeogeo commented 2026-11-29 14:17:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T14:17:46Z.


Ready for testing: merges cleanly with main 3535eb5c4. Not in main yet: git cherry finds 1 commit(s) not there, and 1 of the 5 lines it adds are already present. No duplicate found: its claim TEST-GUEST-DRAW-LIST-ABI appears in no other open pull request and in no main commit.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257192309 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1541#issuecomment-7257192309). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T14:17:46Z. --- Ready for testing: merges cleanly with `main` `3535eb5c4`. Not in `main` yet: `git cherry` finds 1 commit(s) not there, and 1 of the 5 lines it adds are already present. No duplicate found: its claim `TEST-GUEST-DRAW-LIST-ABI` appears in no other open pull request and in no `main` commit. AI-assisted (Claude Code).
enlight3d commented 2026-11-29 15:51:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T15:51:24Z.


RUN report for #1541 (TEST-GUEST-DRAW-LIST-ABI)

Heads: PR head 6824246d9, based on bfef489cb; origin/main 91bab934d (merged locally with git merge --no-ff, clean, 2 files).

Scope: the PR changes only runtime/test/run_guest_draw.cmake and scripts/run_guest_scene.py, and adds no test. Its two consumers, CTests d3d12_translated_draw_guest and d3d12_guest_scene, launch gta6rt --run with the guest fixture. I did not run them (no gta6rt launch on this machine), so I cannot confirm the first-frame Close() failure or its fix here.

What I ran instead (no loader, no GPU):

  1. Python regression tests, one process each: python -I -B tests/<file> for test_guest_scene_reference.py, test_dev_guest_scene.py, test_dev_discovery.py, test_docs_cli_flags.py, test_docs_env_vars.py. All OK at the PR head and merged into main.
  2. Python probe (ad hoc, not part of the PR): load scripts/run_guest_scene.py, call Session.run with subprocess.run mocked, check the child env and the run record. Child env and run record carry LEONIDA_D3D12_LISTS=pc.
  3. CMake probe (ad hoc): cmake -DGTA6RT=<stand-in .bat> -DGUEST=<empty file> -DFIXTURE=<synthetic folder with empty index/fssm files> -P runtime/test/run_guest_draw.cmake. The stand-in prints the marker and the factory line only when LEONIDA_D3D12_LISTS=pc is in its environment, otherwise exits 3.

Results:

  • RED (non-test changes reverted to the PR base bfef489cb; behavioural, env-propagation only): Python probe prints LEONIDA_D3D12_LISTS = None, exit 1; CMake probe fails (exit 1, stand-in saw no pc). The existing Python tests stay green in this state (they do not look at the variable).
  • GREEN at PR head: both probes pass; 5 of 5 Python test files OK.
  • GREEN merged into origin/main: both probes pass; 5 of 5 Python test files OK.
  • Not covered: the real fixture draw and the 600-frame scene need gta6rt plus the synthetic fixture; the red/green of the actual fixture is the author's.

Machine: Windows 11 Pro x64, RTX 3090 24 GB, NVIDIA 621.40, Python 3.13.12 (python -I), CMake from VS 2022 Build Tools.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7258421753 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1541#issuecomment-7258421753). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T15:51:24Z. --- RUN report for #1541 (TEST-GUEST-DRAW-LIST-ABI) Heads: PR head `6824246d9`, based on `bfef489cb`; origin/main `91bab934d` (merged locally with `git merge --no-ff`, clean, 2 files). Scope: the PR changes only `runtime/test/run_guest_draw.cmake` and `scripts/run_guest_scene.py`, and adds no test. Its two consumers, CTests `d3d12_translated_draw_guest` and `d3d12_guest_scene`, launch `gta6rt --run` with the guest fixture. I did not run them (no `gta6rt` launch on this machine), so I cannot confirm the first-frame `Close()` failure or its fix here. What I ran instead (no loader, no GPU): 1. Python regression tests, one process each: `python -I -B tests/<file>` for `test_guest_scene_reference.py`, `test_dev_guest_scene.py`, `test_dev_discovery.py`, `test_docs_cli_flags.py`, `test_docs_env_vars.py`. All OK at the PR head and merged into main. 2. Python probe (ad hoc, not part of the PR): load `scripts/run_guest_scene.py`, call `Session.run` with `subprocess.run` mocked, check the child env and the run record. Child env and run record carry `LEONIDA_D3D12_LISTS=pc`. 3. CMake probe (ad hoc): `cmake -DGTA6RT=<stand-in .bat> -DGUEST=<empty file> -DFIXTURE=<synthetic folder with empty index/fssm files> -P runtime/test/run_guest_draw.cmake`. The stand-in prints the marker and the factory line only when `LEONIDA_D3D12_LISTS=pc` is in its environment, otherwise exits 3. Results: - RED (non-test changes reverted to the PR base `bfef489cb`; behavioural, env-propagation only): Python probe prints `LEONIDA_D3D12_LISTS = None`, exit 1; CMake probe fails (exit 1, stand-in saw no `pc`). The existing Python tests stay green in this state (they do not look at the variable). - GREEN at PR head: both probes pass; 5 of 5 Python test files OK. - GREEN merged into origin/main: both probes pass; 5 of 5 Python test files OK. - Not covered: the real fixture draw and the 600-frame scene need `gta6rt` plus the synthetic fixture; the red/green of the actual fixture is the author's. Machine: Windows 11 Pro x64, RTX 3090 24 GB, NVIDIA 621.40, Python 3.13.12 (`python -I`), CMake from VS 2022 Build Tools.
merzleckeier commented 2026-11-30 07:51:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-30T07:51:44Z.


Both patched test starters in 6824246d9 still work on current main e1fe82f63 (clean merge tree 3e6da1d73). MEASURED on CachyOS with Wine 11.22, static SDL 3.4.20, NVIDIA RTX 4070 SUPER (620.73.04) and AMD Radeon 610M/Raphael (RADV 26.3.1). The loader, guest, and synthetic shader pack were held fixed.

  • Red: stock run_guest_scene.py with the launcher default aborted at the first Close() with E_INVALIDARG on both GPUs.
  • Green with the parent explicitly set to console: the merged Python runner recorded pc for each child, passed the 600-frame pixel oracle, save/resume and both corruption controls on each GPU, and produced frame chain 424a0ed99442a42a.
  • The merged CMake runner passed the single-frame test on both GPUs. A local Wine adapter checked that it received pc from CMake. The native Vulkan shim and the exact-pixel marker both passed.

This rechecks the test-only fix against the current loader. The fixture ran offline on synthetic input. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7272211389 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1541#issuecomment-7272211389). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-30T07:51:44Z. --- Both patched test starters in `6824246d9` still work on current `main` `e1fe82f63` (clean merge tree `3e6da1d73`). **MEASURED** on CachyOS with Wine 11.22, static SDL 3.4.20, NVIDIA RTX 4070 SUPER (620.73.04) and AMD Radeon 610M/Raphael (RADV 26.3.1). The loader, guest, and synthetic shader pack were held fixed. - Red: stock `run_guest_scene.py` with the launcher default aborted at the first `Close()` with `E_INVALIDARG` on both GPUs. - Green with the parent explicitly set to `console`: the merged Python runner recorded `pc` for each child, passed the 600-frame pixel oracle, save/resume and both corruption controls on each GPU, and produced frame chain `424a0ed99442a42a`. - The merged CMake runner passed the single-frame test on both GPUs. A local Wine adapter checked that it received `pc` from CMake. The native Vulkan shim and the exact-pixel marker both passed. This rechecks the test-only fix against the current loader. The fixture ran offline on synthetic input. AI-assisted with OpenAI Codex.
aslan2142 commented 2026-12-01 17:23:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:23:51Z.


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:7319233393 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1541#issuecomment-7319233393). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T17:23:51Z. --- 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!1541
No description provided.