runtime: keep present dump capture buffer across splash handoff #1738

Closed
IlyassRS3 wants to merge 1 commit from upstream-pr/1738 into main
IlyassRS3 commented 2026-11-25 10:28:29 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by IlyassRS3 on 2026-11-25T10:28:29Z.


Item ID: RT-PRESENT-DUMP-SPLASH-HANDOFF
Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7159613942
Addresses finding: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7157589788 (LEONIDA_PRESENT_DUMP access violation in ucrtbase.dll when the splash hands off to the first title frame)

Root cause

VulkanPresenter::present_splash() (runtime/src/vulkan_present_splash.h:16) sets splash_capture_only_ = enable_capture() when capture_ was false. On the first non-black title frame (show_title == true), VulkanPresenter::submit_now() (runtime/src/vulkan_present.h:648-655) unconditionally called release_capture() while dump_.enabled() was still true, setting capture_ptr_ = nullptr while leaving capture_size_ non-zero.

On the next dump_.due(shown - 1) frame (including the handoff frame itself if it falls on the interval, or the first post-handoff interval frame such as frame 150 at ,30 or 300 at ,150), dump_.save(..., capture_ptr_, size_t(capture_size_)) passed (nullptr, nullptr + capture_size_) to std::vector<std::uint8_t>, crashing with an access violation reading address 0 inside ucrtbase.dll (memcpy).

In addition, when !dump_.enabled(), release_capture() ran after finish_startup_frame() had waited only on the current ring slot's frame.done fence, without waiting on the other in-flight slot in frames_.

Changes

  • runtime/src/present_dump.h:
    • Added should_release_capture_after_splash(bool splash_capture_only, bool dump_enabled) (splash_capture_only && !dump_enabled).
    • Added overflow-safe valid_frame_buffer(extent, format, src, size, &needed).
    • Updated PresentDump::save() to validate via valid_frame_buffer() before copying src .. src + needed, disabling cleanly instead of dereferencing null or reading past size.
  • runtime/src/vulkan_present.h:
    • Keep capture_buffer_ / capture_ptr_ alive across splash handoff when dump_.enabled() is true (still clearing splash_capture_only_ and capture_ so only due dump frames copy via finish_image()).
    • When releasing the capture buffer after splash (!dump_.enabled()), wait on all frames_ fences before calling release_capture().
    • Reset capture_size_ = 0 in release_capture() and on vkCreateBuffer failure, and guard !capture_ptr_ || !capture_size_ before dump_.save().
  • runtime/test/present_dump_test.cpp & runtime/CMakeLists.txt:
    • Added portable CPU test present_dump_test covering should_release_capture_after_splash, valid_frame_buffer edge/overflow cases, and PresentDump::save() valid PNG + null/truncated/overflow/invalid-format guards.
  • runtime/test/vk_present_dump_test.cpp & runtime/CMakeLists.txt:
    • Added --splash mode (vk_present_dump_splash) exercising present_splash() -> present_blank() -> non-black title handoff present() on a due frame -> present_blank() -> present_planes(), checking validation_errors() == 0 and all 3 PNG outputs.

Verification

  • AI-assisted: yes
  • GPUs tested: none (developed on macOS without Windows SDK or Vulkan SDK)
  • Tested locally:
    • Compiled and ran runtime/test/present_dump_test.cpp with clang++ -std=c++20 -Wall -Wextra -Werror -O1 -g -fsanitize=address,undefined against a temporary local VkFormat/VkExtent2D stub (not committed): PASS.
    • Mutation test against main:runtime/src/present_dump.h passing (nullptr, 16) to PresentDump::save(): reproduced UBSan null-pointer arithmetic + ASan SEGV reading 0x0 (exit 134).
    • python3 -I scripts/check_no_game_data.py runtime/src/present_dump.h runtime/src/vulkan_present.h runtime/test/present_dump_test.cpp runtime/test/vk_present_dump_test.cpp runtime/CMakeLists.txt: PASS.
    • python3 -I tests/test_text_write_line_endings.py: 3/3 OK.
  • Not tested locally: runtime/src/vulkan_present.h and runtime/test/vk_present_dump_test.cpp (vk_present_dump_splash) are Win32/Vulkan and were not compiled or executed on macOS; they require Windows CI / a Vulkan GPU run.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5489542771 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1738). Originally posted by [IlyassRS3](https://github.com/IlyassRS3) on 2026-11-25T10:28:29Z. --- Item ID: `RT-PRESENT-DUMP-SPLASH-HANDOFF` Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7159613942 Addresses finding: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7157589788 (`LEONIDA_PRESENT_DUMP` access violation in `ucrtbase.dll` when the splash hands off to the first title frame) ## Root cause `VulkanPresenter::present_splash()` (`runtime/src/vulkan_present_splash.h:16`) sets `splash_capture_only_ = enable_capture()` when `capture_` was false. On the first non-black title frame (`show_title == true`), `VulkanPresenter::submit_now()` (`runtime/src/vulkan_present.h:648-655`) unconditionally called `release_capture()` while `dump_.enabled()` was still true, setting `capture_ptr_ = nullptr` while leaving `capture_size_` non-zero. On the next `dump_.due(shown - 1)` frame (including the handoff frame itself if it falls on the interval, or the first post-handoff interval frame such as frame 150 at `,30` or 300 at `,150`), `dump_.save(..., capture_ptr_, size_t(capture_size_))` passed `(nullptr, nullptr + capture_size_)` to `std::vector<std::uint8_t>`, crashing with an access violation reading address `0` inside `ucrtbase.dll` (`memcpy`). In addition, when `!dump_.enabled()`, `release_capture()` ran after `finish_startup_frame()` had waited only on the current ring slot's `frame.done` fence, without waiting on the other in-flight slot in `frames_`. ## Changes - **`runtime/src/present_dump.h`**: - Added `should_release_capture_after_splash(bool splash_capture_only, bool dump_enabled)` (`splash_capture_only && !dump_enabled`). - Added overflow-safe `valid_frame_buffer(extent, format, src, size, &needed)`. - Updated `PresentDump::save()` to validate via `valid_frame_buffer()` before copying `src .. src + needed`, disabling cleanly instead of dereferencing null or reading past `size`. - **`runtime/src/vulkan_present.h`**: - Keep `capture_buffer_` / `capture_ptr_` alive across splash handoff when `dump_.enabled()` is true (still clearing `splash_capture_only_` and `capture_` so only due dump frames copy via `finish_image()`). - When releasing the capture buffer after splash (`!dump_.enabled()`), wait on all `frames_` fences before calling `release_capture()`. - Reset `capture_size_ = 0` in `release_capture()` and on `vkCreateBuffer` failure, and guard `!capture_ptr_ || !capture_size_` before `dump_.save()`. - **`runtime/test/present_dump_test.cpp` & `runtime/CMakeLists.txt`**: - Added portable CPU test `present_dump_test` covering `should_release_capture_after_splash`, `valid_frame_buffer` edge/overflow cases, and `PresentDump::save()` valid PNG + null/truncated/overflow/invalid-format guards. - **`runtime/test/vk_present_dump_test.cpp` & `runtime/CMakeLists.txt`**: - Added `--splash` mode (`vk_present_dump_splash`) exercising `present_splash()` -> `present_blank()` -> non-black title handoff `present()` on a due frame -> `present_blank()` -> `present_planes()`, checking `validation_errors() == 0` and all 3 PNG outputs. ## Verification - **AI-assisted**: yes - **GPUs tested**: none (developed on macOS without Windows SDK or Vulkan SDK) - **Tested locally**: - Compiled and ran `runtime/test/present_dump_test.cpp` with `clang++ -std=c++20 -Wall -Wextra -Werror -O1 -g -fsanitize=address,undefined` against a temporary local `VkFormat`/`VkExtent2D` stub (not committed): **PASS**. - Mutation test against `main:runtime/src/present_dump.h` passing `(nullptr, 16)` to `PresentDump::save()`: reproduced UBSan null-pointer arithmetic + ASan SEGV reading `0x0` (`exit 134`). - `python3 -I scripts/check_no_game_data.py runtime/src/present_dump.h runtime/src/vulkan_present.h runtime/test/present_dump_test.cpp runtime/test/vk_present_dump_test.cpp runtime/CMakeLists.txt`: **PASS**. - `python3 -I tests/test_text_write_line_endings.py`: **3/3 OK**. - **Not tested locally**: `runtime/src/vulkan_present.h` and `runtime/test/vk_present_dump_test.cpp` (`vk_present_dump_splash`) are Win32/Vulkan and were not compiled or executed on macOS; they require Windows CI / a Vulkan GPU run.
copilot-pull-request-reviewer[bot] commented 2026-11-25 10:28:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T10:28:45Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6055855300 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1738#pullrequestreview-6055855300). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-11-25T10:28:45Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
lixonik commented 2026-11-25 10:34:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-25T10:34:33Z.

Review: COMMENTED


Independent native Windows A/B at 336e4ede against merge base 57ba40bd. I built the same PR vk_present_dump_test harness against both runtime trees and ran it through a real Vulkan swapchain. With --splash, the base wrote the splash PNG and then exited with 0xC0000005. The PR exited 0 and its PNG checks passed for all three captures, including the handoff. The standard, --default, and --invalid Vulkan cases and the CPU present_dump_test also passed on the PR.

AI-assisted testing. Synthetic textures only on one local Windows Vulkan setup.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6055947695 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1738#pullrequestreview-6055947695). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-25T10:34:33Z. **Review:** COMMENTED --- Independent native Windows A/B at `336e4ede` against merge base `57ba40bd`. I built the same PR `vk_present_dump_test` harness against both runtime trees and ran it through a real Vulkan swapchain. With `--splash`, the base wrote the splash PNG and then exited with `0xC0000005`. The PR exited 0 and its PNG checks passed for all three captures, including the handoff. The standard, `--default`, and `--invalid` Vulkan cases and the CPU `present_dump_test` also passed on the PR. AI-assisted testing. Synthetic textures only on one local Windows Vulkan setup.
abnalstlll-byte commented 2026-11-25 10:55:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-25T10:55:55Z.

Review: APPROVED


### Clean-Room & Technical Verification

  • Mergeability: 3-way merge against upstream main (bcaa13dad) is 100% clean with zero merge conflicts.
  • Clean-Room Compliance: 100% clean-room. Vulkan presenter lifecycle logic and synthetic tests only; zero retail files, game data, or keys (check_no_game_data.py clean).
  • Technical Rigor & Root Cause Fix:
    • VulkanPresenter::submit_now() previously unconditionally called release_capture() upon the first non-black title frame when splash_capture_only_ was set, leaving capture_ptr_ = nullptr while capture_size_ remained non-zero. Subsequent frame dumps dereferenced null into std::vector, triggering an access violation in ucrtbase.dll.
    • Added should_release_capture_after_splash(splash_capture_only, dump_.enabled()), ensuring capture_buffer_ and capture_ptr_ remain valid across splash dismissal whenever LEONIDA_PRESENT_DUMP is active.
    • Added overflow-safe buffer validation valid_frame_buffer().
    • Added portable CPU test present_dump_test and Vulkan lifecycle test vk_present_dump_test --splash.
    • Verified by independent native Vulkan A/B run (exited 0, all 3 PNGs matched).

LGTM! Approved.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6056274360 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1738#pullrequestreview-6056274360). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-25T10:55:55Z. **Review:** APPROVED --- ### Clean-Room & Technical Verification - **Mergeability**: 3-way merge against upstream `main` (`bcaa13dad`) is 100% clean with zero merge conflicts. - **Clean-Room Compliance**: 100% clean-room. Vulkan presenter lifecycle logic and synthetic tests only; zero retail files, game data, or keys (`check_no_game_data.py` clean). - **Technical Rigor & Root Cause Fix**: - `VulkanPresenter::submit_now()` previously unconditionally called `release_capture()` upon the first non-black title frame when `splash_capture_only_` was set, leaving `capture_ptr_ = nullptr` while `capture_size_` remained non-zero. Subsequent frame dumps dereferenced null into `std::vector`, triggering an access violation in `ucrtbase.dll`. - Added `should_release_capture_after_splash(splash_capture_only, dump_.enabled())`, ensuring `capture_buffer_` and `capture_ptr_` remain valid across splash dismissal whenever `LEONIDA_PRESENT_DUMP` is active. - Added overflow-safe buffer validation `valid_frame_buffer()`. - Added portable CPU test `present_dump_test` and Vulkan lifecycle test `vk_present_dump_test --splash`. - Verified by independent native Vulkan A/B run (exited 0, all 3 PNGs matched). LGTM! Approved.
Tyrannys commented 2026-11-27 18:49:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tyrannys on 2026-11-27T18:49:00Z.


Tested on Windows with a GPU, since the PR says the Vulkan parts were not compiled or run. @kevincommits found the same crash today (item 1 of https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7225370093), and this PR already fixes it. I withdrew my claim on that item in favour of this one. Thanks @IlyassRS3.

Setup: profile M, NVIDIA GeForce RTX 4070 SUPER, 12 GB, driver 621.01, Windows 11. This branch was merged locally onto current main (43a9d562d) with no conflicts; nothing was pushed.

  • vk_present_dump_test --splash with LEONIDA_VK_VALIDATION=1: passes 3/3 runs. It writes present_000001/3/5.png, with 0 validation errors.
  • The same test with only src/present_dump.h and src/vulkan_present.h reverted to main: SIGSEGV on all 3 runs, right after frame 1 is dumped. So the new test reproduces the crash, and the fix removes it.
  • ctest -R "present|splash": 13/14 pass. These include vk_present_dump, _default, _invalid, _splash, present_dump, vk_presenter_sync, vk_presenter_sparse_capture, d3d12_present, xs_present_lazy and package_splash. The failure is xbox_present, which also fails on main unchanged on this machine.

One small gap, which kevincommits also pointed out and which could go here or in a follow-up: in recreate(), if (capture_ && stride != 4) return false; returns after swapchain_/extent_/format_ already describe the new swapchain, but the capture buffer still has the old extent's size. release_capture() before that return false would leave nothing stale behind. Today the presenter stops after a failed recreate, and valid_frame_buffer() in save() refuses a too-small buffer, so I don't see a crash from it. It would only be for consistency.

The branch shows as mergeable. A merge from main would refresh its CI.

AI-assisted (Claude Code)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7225901341 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1738#issuecomment-7225901341). Originally posted by [Tyrannys](https://github.com/Tyrannys) on 2026-11-27T18:49:00Z. --- Tested on Windows with a GPU, since the PR says the Vulkan parts were not compiled or run. @kevincommits found the same crash today (item 1 of https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7225370093), and this PR already fixes it. I withdrew my claim on that item in favour of this one. Thanks @IlyassRS3. Setup: profile M, NVIDIA GeForce RTX 4070 SUPER, 12 GB, driver 621.01, Windows 11. This branch was merged locally onto current `main` (`43a9d562d`) with no conflicts; nothing was pushed. - `vk_present_dump_test --splash` with `LEONIDA_VK_VALIDATION=1`: passes 3/3 runs. It writes `present_000001/3/5.png`, with 0 validation errors. - The same test with only `src/present_dump.h` and `src/vulkan_present.h` reverted to `main`: SIGSEGV on all 3 runs, right after frame 1 is dumped. So the new test reproduces the crash, and the fix removes it. - `ctest -R "present|splash"`: 13/14 pass. These include `vk_present_dump`, `_default`, `_invalid`, `_splash`, `present_dump`, `vk_presenter_sync`, `vk_presenter_sparse_capture`, `d3d12_present`, `xs_present_lazy` and `package_splash`. The failure is `xbox_present`, which also fails on `main` unchanged on this machine. One small gap, which kevincommits also pointed out and which could go here or in a follow-up: in `recreate()`, `if (capture_ && stride != 4) return false;` returns after `swapchain_`/`extent_`/`format_` already describe the new swapchain, but the capture buffer still has the old extent's size. `release_capture()` before that `return false` would leave nothing stale behind. Today the presenter stops after a failed recreate, and `valid_frame_buffer()` in `save()` refuses a too-small buffer, so I don't see a crash from it. It would only be for consistency. The branch shows as mergeable. A merge from `main` would refresh its CI. AI-assisted (Claude Code)
zmasi commented 2026-11-29 01:00:07 +00:00 (Migrated from github.com)

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


Windows 11 + MSVC 19.44 + RTX 3090 Verification — PASS (336e4edec8)

Verified 336e4edec8 merged onto origin/main (e66c65b950 / 16f5053047, 0 conflicts, plus a 5-way combined merge alongside #1146, #988, #955, and #2544) on native Windows 11 (10.0.26200.9974) with MSVC 19.44.35228, NVIDIA GeForce RTX 3090, and VK_LAYER_KHRONOS_validation 1.4.363.1.

Checks Run

  • Red (vk_present_dump_test --splash against origin/main headers on NVIDIA GeForce RTX 3090):
    • Compiled #1738's vk_present_dump_test.cpp against unpatched origin/main runtime/src/vulkan_present.h and runtime/src/present_dump.h and ran --splash: crashed with 0xc0000005 (STATUS_ACCESS_VIOLATION) after dumping frame 1 (present_000001.png), when frame 3's launch-splash dismissal freed capture_buffer_ (capture_ptr_ == nullptr) while LEONIDA_PRESENT_DUMP remained active.
  • Green (#1738 + origin/main):
    • present_dump_test.exe (/W4 /WX, CPU unit suite): compiled with 0 warnings under /W4 /WX and passed (rc=0), verifying should_release_capture_after_splash, overflow-safe valid_frame_buffer, needed-bounded byte slicing, and null/short/overflow disable guards.
    • vk_present_dump_test.exe across all 4 CTest modes on NVIDIA GeForce RTX 3090 (LEONIDA_VK_VALIDATION=1):
      • vk_present_dump_test (interval 2): rc=0, 0 VUID- errors.
      • vk_present_dump_test --default (interval 60): rc=0, 0 VUID- errors.
      • vk_present_dump_test --invalid (interval 0): rc=0, 0 VUID- errors.
      • vk_present_dump_test --splash (blue splash frame 1 -> orange handoff frame 3 -> composed orange/black frame 5): rc=0, all 3 PNGs verified pixel-for-pixel, 0 VUID- errors.
  • Registration gates: tests/test_ctest_registration.py and tests/test_ci_registration.py passed (rc=0).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248492933 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1738#issuecomment-7248492933). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T01:00:07Z. --- ## Windows 11 + MSVC `19.44` + RTX 3090 Verification — PASS (`336e4edec8`) Verified `336e4edec8` merged onto `origin/main` (`e66c65b950` / `16f5053047`, `0` conflicts, plus a 5-way combined merge alongside `#1146`, `#988`, `#955`, and `#2544`) on native Windows 11 (`10.0.26200.9974`) with MSVC `19.44.35228`, **NVIDIA GeForce RTX 3090**, and `VK_LAYER_KHRONOS_validation` `1.4.363.1`. ### Checks Run - **Red (`vk_present_dump_test --splash` against `origin/main` headers on NVIDIA GeForce RTX 3090)**: - Compiled `#1738`'s `vk_present_dump_test.cpp` against unpatched `origin/main` `runtime/src/vulkan_present.h` and `runtime/src/present_dump.h` and ran `--splash`: crashed with **`0xc0000005` (`STATUS_ACCESS_VIOLATION`)** after dumping frame 1 (`present_000001.png`), when frame 3's launch-splash dismissal freed `capture_buffer_` (`capture_ptr_ == nullptr`) while `LEONIDA_PRESENT_DUMP` remained active. - **Green (`#1738 + origin/main`)**: - **`present_dump_test.exe` (`/W4 /WX`, CPU unit suite)**: compiled with **`0` warnings under `/W4 /WX`** and passed (`rc=0`), verifying `should_release_capture_after_splash`, overflow-safe `valid_frame_buffer`, `needed`-bounded byte slicing, and null/short/overflow disable guards. - **`vk_present_dump_test.exe` across all 4 CTest modes on NVIDIA GeForce RTX 3090 (`LEONIDA_VK_VALIDATION=1`)**: - `vk_present_dump_test` (interval `2`): **`rc=0`**, `0` `VUID-` errors. - `vk_present_dump_test --default` (interval `60`): **`rc=0`**, `0` `VUID-` errors. - `vk_present_dump_test --invalid` (interval `0`): **`rc=0`**, `0` `VUID-` errors. - `vk_present_dump_test --splash` (blue splash frame 1 -> orange handoff frame 3 -> composed orange/black frame 5): **`rc=0`**, all 3 PNGs verified pixel-for-pixel, `0` `VUID-` errors. - **Registration gates**: `tests/test_ctest_registration.py` and `tests/test_ci_registration.py` passed (`rc=0`). AI-assisted.
enlight3d commented 2026-11-29 09:02:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T09:02:59Z.


RUN #1738 | head 336e4edec8, merged cleanly with main 54b2a81e95 (local merge, not pushed)

Commands (from the repository root, in a worktree):

git fetch origin pull/1738/head:pr-1738
git checkout --detach origin/main && git merge --no-edit --no-ff pr-1738
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
cmake --build runtime/build -j 8 --target gta6rt present_dump_test vk_present_dump_test vk_presenter_sync_test xbox_present_test d3d12_boot_movie_test
ctest -C RelWithDebInfo -R "^(present_dump|vk_present_dump|vk_present_dump_default|vk_present_dump_invalid|vk_present_dump_splash|vk_presenter_sync|vk_presenter_sparse_capture|xbox_present|d3d12_boot_movie)$" --output-on-failure -j1

Green (merged tree, GPU tests one at a time): present_dump, vk_present_dump, vk_present_dump_default, vk_present_dump_invalid, vk_present_dump_splash (new), vk_presenter_sync, vk_presenter_sparse_capture pass. d3d12_boot_movie is skipped (reports skip). xbox_present fails (present failed (VkResult -11), 4 of 4 runs), and it fails the same way on plain main 54b2a81e9 (rebuilt and run there), so it is pre-existing and not caused by this pull request.

Red, three ways, each with the PR's tests kept and only the non-test source changed:

  • Both runtime/src/present_dump.h and runtime/src/vulkan_present.h reverted to main: present_dump_test does not build (new API should_release_capture_after_splash missing, build failure only), and vk_present_dump_splash builds and crashes (SegFault). This is the crash the pull request describes.
  • Behavioural, API kept: only the validation in PresentDump::save() removed (the new helpers stay): present_dump crashes (SegFault).
  • Behavioural, API kept: only vulkan_present.h reverted (PR's present_dump.h kept): vk_present_dump_splash fails, with the dump disabled ("buffer is missing or smaller than the frame") and the third PNG missing; the other three vk_present_dump* tests still pass.

Link: no new imports vs main (gta6rt.exe, 723 DLL!symbol entries, same list as the baseline built from main).

Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, Vulkan SDK 1.4.363.1.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253501440 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1738#issuecomment-7253501440). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T09:02:59Z. --- RUN #1738 | head 336e4edec844628c8cb35e1321f02e6e51911090, merged cleanly with main 54b2a81e95c470c953ddee6177fd6255cbaf041d (local merge, not pushed) Commands (from the repository root, in a worktree): ``` git fetch origin pull/1738/head:pr-1738 git checkout --detach origin/main && git merge --no-edit --no-ff pr-1738 cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON cmake --build runtime/build -j 8 --target gta6rt present_dump_test vk_present_dump_test vk_presenter_sync_test xbox_present_test d3d12_boot_movie_test ctest -C RelWithDebInfo -R "^(present_dump|vk_present_dump|vk_present_dump_default|vk_present_dump_invalid|vk_present_dump_splash|vk_presenter_sync|vk_presenter_sparse_capture|xbox_present|d3d12_boot_movie)$" --output-on-failure -j1 ``` Green (merged tree, GPU tests one at a time): `present_dump`, `vk_present_dump`, `vk_present_dump_default`, `vk_present_dump_invalid`, `vk_present_dump_splash` (new), `vk_presenter_sync`, `vk_presenter_sparse_capture` pass. `d3d12_boot_movie` is skipped (reports skip). `xbox_present` fails (`present failed (VkResult -11)`, 4 of 4 runs), and it fails the same way on plain main 54b2a81e9 (rebuilt and run there), so it is pre-existing and not caused by this pull request. Red, three ways, each with the PR's tests kept and only the non-test source changed: - Both `runtime/src/present_dump.h` and `runtime/src/vulkan_present.h` reverted to main: `present_dump_test` does not build (new API `should_release_capture_after_splash` missing, build failure only), and `vk_present_dump_splash` builds and crashes (SegFault). This is the crash the pull request describes. - Behavioural, API kept: only the validation in `PresentDump::save()` removed (the new helpers stay): `present_dump` crashes (SegFault). - Behavioural, API kept: only `vulkan_present.h` reverted (PR's `present_dump.h` kept): `vk_present_dump_splash` fails, with the dump disabled ("buffer is missing or smaller than the frame") and the third PNG missing; the other three `vk_present_dump*` tests still pass. Link: no new imports vs main (gta6rt.exe, 723 DLL!symbol entries, same list as the baseline built from main). Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, Vulkan SDK 1.4.363.1.
aslan2142 commented 2026-12-01 16:37:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:37: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:7317925378 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1738#issuecomment-7317925378). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:37: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!1738
No description provided.