vulkan_present: the capture buffer is made of host-cached memory (RT-PRESENT-CAPTURE-CACHED) #1694

Closed
DadaCap wants to merge 1 commit from upstream-pr/1694 into main
DadaCap commented 2026-11-25 08:30:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-25T08:30:11Z.


Claimed in the coordination issue as: RT-PRESENT-CAPTURE-CACHED (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7157004451)

What and why

VulkanPresenter::make_capture_buffer took the first memory type that is host visible and coherent. On NVIDIA the first such type is uncached (flags 0x6 on this RTX 5080; the cached one, 0xe, comes after it), and a host read of uncached memory is many times slower than of cached memory.

That did not matter much while the buffer was read once per capture. Since the launch splash (#939), finish_startup_frame reads the whole buffer on the CPU for every frame the title presents before its first non-black one, with the submit and tracker locks held. On a large window that scan takes over the boot:

  • one title thread sits in the scan at 97 % CPU (29 of 30 samples of an external sampler, and the same frame in two LEONIDA_STACKS dumps 20 s apart: submit_now -> present -> PresentX);
  • the other submissions starve: device-stall: could not sample the submit lock for 15 s; submitted ticket 424, last observed retired ticket 328;
  • the title's game state stays 2, it never accepts A, and its hang watchdog ends the run at the landing screen.

The change: choose a host-cached, non-device-local type first and fall back to the first host-visible coherent one, exactly as probe_read_source in the same file already does. One function, 11 lines.

Measured

Native Windows 11, RTX 5080 16 GB, NVIDIA 621.24, 64 GB, own 1.0.2.1, MSVC RelWithDebInfo with SDL3. Window client area 3824x1841 when the first frame is presented. Every run: keyboard pad with A every 5 s from 30 s, LEONIDA_SKIP_INT3=1, LEONIDA_PEEK=0x7446510,0x98f828c, an existing save, shaders from main's translator.

tree switches game state 3 A accepted (session d) how the run ends
main 3f81d46ac LEONIDA_TITLE_WINDOWS_MB=4096 LEONIDA_ARENA_MB=4096 LEONIDA_DEVICE_FAULT=1 never never title's hang watchdog at 125.8 s, still at the landing screen; fewer than 1,500 presents in the whole run
main + #1558 + #1631 LEONIDA_ARENA_MB=2048 never never watchdog at 107.8 s; a second run was still at the landing screen at its 160 s limit
main + #1558 + #1631, LEONIDA_WINDOW=960x540 (no code change, 14 times fewer texels to scan) LEONIDA_ARENA_MB=2048 95 s 105 s reaches the world phase
main + #1558 + #1631 + this change LEONIDA_ARENA_MB=2048 25 s 35 s reaches the world phase; 1,501 presents by about 22 s
main + this change only (this branch) same as the first row 25 s 35 s story load reads from about 35 s to 90 s, then the world phase; the run ends at 179.8 s on the title's hang watchdog there, which is the stop already described in #1537, not this one

So on this machine the first and last rows differ only by this commit. Before #939 (main 3ff2a2adc) the same launcher passed the landing screen every time, which is how I found it.

It probably costs time on smaller windows too, in proportion to the texel count: the report on #939 of 182 to 362 PresentX in 51 to 74 s on an RTX 4070 SUPER is a few presents a second. I have not measured another machine.

Tested

  • The ten presenter tests of runtime/ pass on this branch on the same GPU: xbox_present_readback_size, vk_presenter_capture_colour, present_window, xs_present_lazy, vk_present_dump, vk_present_dump_default, vk_present_dump_invalid, vk_presenter_sync, d3d12_present, xbox_present.
  • The real boot, as in the table. No new test: which memory type a driver lists first is a property of the device, and the effect only shows with a real swapchain and the title presenting black frames.

Not done, not tested

  • The scan itself still runs under the submit and tracker locks; this only makes it fast. Moving it out of the locks, or ending it earlier, is a separate change I am not claiming.
  • AMD, Intel, Linux: not run. On a device whose first host-visible coherent type is already cached, nothing changes.
  • I did not time the scan in isolation; the evidence is the thread samples and the before/after boots.
  • #1223 adds a guard in the same function, a few lines above; the two do not overlap.

Counters, switch names and addresses of the executable only; no game data. AI-assisted (Claude Code).

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5487835134 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1694). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-25T08:30:11Z. --- Claimed in the coordination issue as: RT-PRESENT-CAPTURE-CACHED (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7157004451) ### What and why `VulkanPresenter::make_capture_buffer` took the first memory type that is host visible and coherent. On NVIDIA the first such type is uncached (flags `0x6` on this RTX 5080; the cached one, `0xe`, comes after it), and a host read of uncached memory is many times slower than of cached memory. That did not matter much while the buffer was read once per capture. Since the launch splash (#939), `finish_startup_frame` reads the whole buffer on the CPU for **every frame the title presents before its first non-black one**, with the submit and tracker locks held. On a large window that scan takes over the boot: - one title thread sits in the scan at 97 % CPU (29 of 30 samples of an external sampler, and the same frame in two `LEONIDA_STACKS` dumps 20 s apart: `submit_now` -> `present` -> `PresentX`); - the other submissions starve: `device-stall: could not sample the submit lock for 15 s; submitted ticket 424, last observed retired ticket 328`; - the title's game state stays 2, it never accepts A, and its hang watchdog ends the run at the landing screen. The change: choose a host-cached, non-device-local type first and fall back to the first host-visible coherent one, exactly as `probe_read_source` in the same file already does. One function, 11 lines. ### Measured Native Windows 11, RTX 5080 16 GB, NVIDIA 621.24, 64 GB, own 1.0.2.1, MSVC RelWithDebInfo with SDL3. Window client area 3824x1841 when the first frame is presented. Every run: keyboard pad with A every 5 s from 30 s, `LEONIDA_SKIP_INT3=1`, `LEONIDA_PEEK=0x7446510,0x98f828c`, an existing save, shaders from `main`'s translator. | tree | switches | game state 3 | A accepted (session `d`) | how the run ends | |---|---|---|---|---| | `main` 3f81d46ac | `LEONIDA_TITLE_WINDOWS_MB=4096 LEONIDA_ARENA_MB=4096 LEONIDA_DEVICE_FAULT=1` | never | never | title's hang watchdog at 125.8 s, still at the landing screen; fewer than 1,500 presents in the whole run | | `main` + #1558 + #1631 | `LEONIDA_ARENA_MB=2048` | never | never | watchdog at 107.8 s; a second run was still at the landing screen at its 160 s limit | | `main` + #1558 + #1631, `LEONIDA_WINDOW=960x540` (no code change, 14 times fewer texels to scan) | `LEONIDA_ARENA_MB=2048` | 95 s | 105 s | reaches the world phase | | `main` + #1558 + #1631 + **this change** | `LEONIDA_ARENA_MB=2048` | 25 s | 35 s | reaches the world phase; 1,501 presents by about 22 s | | `main` + **this change only** (this branch) | same as the first row | 25 s | 35 s | story load reads from about 35 s to 90 s, then the world phase; the run ends at 179.8 s on the title's hang watchdog there, which is the stop already described in #1537, not this one | So on this machine the first and last rows differ only by this commit. Before #939 (`main` 3ff2a2adc) the same launcher passed the landing screen every time, which is how I found it. It probably costs time on smaller windows too, in proportion to the texel count: the report on #939 of 182 to 362 PresentX in 51 to 74 s on an RTX 4070 SUPER is a few presents a second. I have not measured another machine. ### Tested - The ten presenter tests of `runtime/` pass on this branch on the same GPU: `xbox_present_readback_size`, `vk_presenter_capture_colour`, `present_window`, `xs_present_lazy`, `vk_present_dump`, `vk_present_dump_default`, `vk_present_dump_invalid`, `vk_presenter_sync`, `d3d12_present`, `xbox_present`. - The real boot, as in the table. No new test: which memory type a driver lists first is a property of the device, and the effect only shows with a real swapchain and the title presenting black frames. ### Not done, not tested - The scan itself still runs under the submit and tracker locks; this only makes it fast. Moving it out of the locks, or ending it earlier, is a separate change I am not claiming. - AMD, Intel, Linux: not run. On a device whose first host-visible coherent type is already cached, nothing changes. - I did not time the scan in isolation; the evidence is the thread samples and the before/after boots. - #1223 adds a guard in the same function, a few lines above; the two do not overlap. Counters, switch names and addresses of the executable only; no game data. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kawaii-shakal commented 2026-11-25 09:45:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kawaii-shakal on 2026-11-25T09:45:38Z.

Review: COMMENTED


Review (read-only, not run). Correct and minimal. The buffer is only read on the CPU, so host-cached system memory is the right first choice. The two-pass search mirrors probe_read_source. Requiring HOST_COHERENT in both passes means no vkInvalidateMappedMemoryRanges is needed before the reads. On a driver whose only cached type is non-coherent, it falls back to the old choice rather than becoming incorrect.

Nit: the same two-pass search now exists twice in vulkan_present.h. A small pick_host_read_type(requirements) helper would keep them from drifting apart.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6055211126 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1694#pullrequestreview-6055211126). Originally posted by [kawaii-shakal](https://github.com/kawaii-shakal) on 2026-11-25T09:45:38Z. **Review:** COMMENTED --- Review (read-only, not run). Correct and minimal. The buffer is only read on the CPU, so host-cached system memory is the right first choice. The two-pass search mirrors `probe_read_source`. Requiring `HOST_COHERENT` in both passes means no `vkInvalidateMappedMemoryRanges` is needed before the reads. On a driver whose only cached type is non-coherent, it falls back to the old choice rather than becoming incorrect. Nit: the same two-pass search now exists twice in `vulkan_present.h`. A small `pick_host_read_type(requirements)` helper would keep them from drifting apart. AI-assisted review (Claude Code, Claude Opus 5.5).
DadaCap commented 2026-11-25 10:34:04 +00:00 (Migrated from github.com)

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


@kawaii-shakal thank you for the review. On the helper: I agree the two searches should not drift apart, and I would do it as a follow-up once this and #1223 are in. #1223 adds its guard directly above the vkGetPhysicalDeviceMemoryProperties_ call in make_capture_buffer, which is the line a shared pick_host_read_type would take out of that function, so folding it in here would put the two pull requests in conflict for a nit. If a maintainer prefers it in this one, I will add it and help rebase #1223. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7159872484 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1694#issuecomment-7159872484). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-25T10:34:04Z. --- @kawaii-shakal thank you for the review. On the helper: I agree the two searches should not drift apart, and I would do it as a follow-up once this and #1223 are in. #1223 adds its guard directly above the `vkGetPhysicalDeviceMemoryProperties_` call in `make_capture_buffer`, which is the line a shared `pick_host_read_type` would take out of that function, so folding it in here would put the two pull requests in conflict for a nit. If a maintainer prefers it in this one, I will add it and help rebase #1223. AI-assisted (Claude Code).
adrianmjim commented 2026-11-25 11:24:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by adrianmjim on 2026-11-25T11:24:34Z.


Tested 3768be502 applied onto main 42537e7b6 on AMD: Radeon RX 7900 XT, AMD driver 32.0.32029.2010 (26.11.2), no Resizable BAR, Windows 11 build 26300, VS 2022 RelWithDebInfo. No game files.

What the change picks here. In this driver's memory-type list, type 1 is HOST_VISIBLE | HOST_COHERENT in system memory and comes first, so main takes it. Type 3 adds HOST_CACHED in the same heap, and this PR takes it.

I measured CPU reads from each host-visible type with a small standalone Vulkan program. It maps a 3840x2160x4 buffer (33 MB) and memcpys it out 10 times:

type flags heap one 3840x2160x4 read
1 (main) 0x006 coherent, uncached system 114 ms (291 MB/s)
3 (this PR) 0x00e coherent, cached system 1.5 ms (22,040 MB/s)
2 0x007 device-local (BAR window) BAR 114 ms
6, 10, 14 0x0c7 / 0x007 device-local (BAR window) BAR 114 ms
5, 9, 13 0x0c6 / 0x006 uncached variants system 114 ms
7, 11, 15 0x0ce / 0x00e cached variants system 1.4–1.6 ms

(0x0c6/0x0c7/0x0ce add AMD's device-coherent/uncached bits. They are allocated here without enabling deviceCoherentMemory, for reference only. Neither main nor this PR picks them.)

So the order is the same as on your RTX 5080 (uncached 0x6 first, cached 0xe later), and on AMD the uncached type is about 75 times slower to read. That is the raw read speed of each memory type, measured outside leonida, not the presenter's scan itself, which the description says was not timed. From it, a full scan of a 4K capture should take about 114 ms on main and about 2 ms with this PR on this card. It scales with the window's texel count. I did not time the scan itself or boot the title on AMD, so this is an estimate from the read speed.

Tests, main and this PR:

  • xbox_present, xbox_present_readback_size, vk_presenter_capture_colour, present_window, xs_present_lazy, vk_present_dump*, vk_presenter_sync, d3d12_present and package_splash: 11 of 11 pass on both.
  • xbox_present, vk_present_dump and vk_presenter_sync with --repeat until-fail:10: no failure on either. xbox_present reuses one capture buffer while the colour changes between frames, so a stale cached read would show up there.
  • Whole ctest -j 6: 399 of 402 with this PR, with the same three failures as main 42537e7b6 (d3d12_texture_tiles, d3d12_clear, d3d12_geometry_views), none of them presenter tests.

I didn't run a retail boot.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7161007748 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1694#issuecomment-7161007748). Originally posted by [adrianmjim](https://github.com/adrianmjim) on 2026-11-25T11:24:34Z. --- Tested `3768be502` applied onto `main` `42537e7b6` on AMD: Radeon RX 7900 XT, AMD driver 32.0.32029.2010 (26.11.2), no Resizable BAR, Windows 11 build 26300, VS 2022 RelWithDebInfo. No game files. **What the change picks here.** In this driver's memory-type list, type 1 is `HOST_VISIBLE | HOST_COHERENT` in system memory and comes first, so `main` takes it. Type 3 adds `HOST_CACHED` in the same heap, and this PR takes it. I measured CPU reads from each host-visible type with a small standalone Vulkan program. It maps a 3840x2160x4 buffer (33 MB) and `memcpy`s it out 10 times: | type | flags | heap | one 3840x2160x4 read | |---|---|---|---| | 1 (`main`) | `0x006` coherent, uncached | system | **114 ms** (291 MB/s) | | 3 (this PR) | `0x00e` coherent, cached | system | **1.5 ms** (22,040 MB/s) | | 2 | `0x007` device-local (BAR window) | BAR | 114 ms | | 6, 10, 14 | `0x0c7` / `0x007` device-local (BAR window) | BAR | 114 ms | | 5, 9, 13 | `0x0c6` / `0x006` uncached variants | system | 114 ms | | 7, 11, 15 | `0x0ce` / `0x00e` cached variants | system | 1.4–1.6 ms | (`0x0c6`/`0x0c7`/`0x0ce` add AMD's device-coherent/uncached bits. They are allocated here without enabling `deviceCoherentMemory`, for reference only. Neither `main` nor this PR picks them.) So the order is the same as on your RTX 5080 (uncached `0x6` first, cached `0xe` later), and on AMD the uncached type is about 75 times slower to read. That is the raw read speed of each memory type, measured outside leonida, not the presenter's scan itself, which the description says was not timed. From it, a full scan of a 4K capture should take about 114 ms on `main` and about 2 ms with this PR on this card. It scales with the window's texel count. I did not time the scan itself or boot the title on AMD, so this is an estimate from the read speed. **Tests, `main` and this PR:** - `xbox_present`, `xbox_present_readback_size`, `vk_presenter_capture_colour`, `present_window`, `xs_present_lazy`, `vk_present_dump*`, `vk_presenter_sync`, `d3d12_present` and `package_splash`: 11 of 11 pass on both. - `xbox_present`, `vk_present_dump` and `vk_presenter_sync` with `--repeat until-fail:10`: no failure on either. `xbox_present` reuses one capture buffer while the colour changes between frames, so a stale cached read would show up there. - Whole `ctest -j 6`: 399 of 402 with this PR, with the same three failures as `main` `42537e7b6` (`d3d12_texture_tiles`, `d3d12_clear`, `d3d12_geometry_views`), none of them presenter tests. I didn't run a retail boot.
DadaCap commented 2026-11-25 12:31:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-25T12:31:17Z.


Thanks, that is a useful second vendor: the same memory-type order and a 75 times slower uncached read on the RX 7900 XT. I agree the 114 ms per 4K capture on main is an estimate from the read speed, not a timed scan. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7162485820 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1694#issuecomment-7162485820). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-25T12:31:17Z. --- Thanks, that is a useful second vendor: the same memory-type order and a 75 times slower uncached read on the RX 7900 XT. I agree the 114 ms per 4K capture on `main` is an estimate from the read speed, not a timed scan. AI-assisted (Claude Code).
OreoFR commented 2026-11-27 19:04:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-27T19:04:18Z.


Merge test for the #2464 campaign on an 8 GB laptop (profile M), done for the author. Main ec91d695c was merged without conflict, in one tree together with #1705, #1694 and #1284, which touch different code. The numbers were recomputed from the raw logs. AI-assisted (Claude Code, Claude Opus 5.5).

RUN dada3 | 2026-11-27 | OreoFR | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        main ec91d695c + #1705 (abe3f2042) + #1694 (3768be502) + #1284 (7358f3261), merged cleanly | shaders: main translation + #2447 (one-lane) pack
MACHINE:     RTX 4070 Laptop 8 GB, laptop (profile M) | NVIDIA 621.40 | Windows 11 | 40 GB
RECIPE:      documented + DEVIATIONS: ASYNC_PIPELINES=1 ASYNC_MIN_BYTES=1048576 VALUE_WAIT_TIMEOUT_MS=30000 MAP_READBACK=1 DEVICE_TYPE=6 ARENA_MB=4095 DEVICE_FAULT=1
OS/DRIVER:   TdrDelay 60
TARGET:      regression check against regA (main ec91d695c, same recipe and caches) | PREDICTED: world reached, no loss
MEASURED:    world entry ~237 s (regA 223 s) | 0 device lost, 0 exceptions (regA 0 / 0) | gpu-stall lines 2 (regA 10)
END:         stopped by our script 56 s after world entry (t=293 s): the known display stop after world entry is the same on main
CACHES:      warm | RUN 1 of 1
VERDICT:     no regression seen (n=1)
  • No test in this PR. The run above covers it: present and capture paths, with no exception and no device lost.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7226158845 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1694#issuecomment-7226158845). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-27T19:04:18Z. --- Merge test for the #2464 campaign on an 8 GB laptop (profile M), done for the author. Main ec91d695c was merged without conflict, in one tree together with #1705, #1694 and #1284, which touch different code. The numbers were recomputed from the raw logs. AI-assisted (Claude Code, Claude Opus 5.5). ``` RUN dada3 | 2026-11-27 | OreoFR | AI-assisted: Claude Code (Claude Opus 5.5) BASE: main ec91d695c + #1705 (abe3f2042) + #1694 (3768be502) + #1284 (7358f3261), merged cleanly | shaders: main translation + #2447 (one-lane) pack MACHINE: RTX 4070 Laptop 8 GB, laptop (profile M) | NVIDIA 621.40 | Windows 11 | 40 GB RECIPE: documented + DEVIATIONS: ASYNC_PIPELINES=1 ASYNC_MIN_BYTES=1048576 VALUE_WAIT_TIMEOUT_MS=30000 MAP_READBACK=1 DEVICE_TYPE=6 ARENA_MB=4095 DEVICE_FAULT=1 OS/DRIVER: TdrDelay 60 TARGET: regression check against regA (main ec91d695c, same recipe and caches) | PREDICTED: world reached, no loss MEASURED: world entry ~237 s (regA 223 s) | 0 device lost, 0 exceptions (regA 0 / 0) | gpu-stall lines 2 (regA 10) END: stopped by our script 56 s after world entry (t=293 s): the known display stop after world entry is the same on main CACHES: warm | RUN 1 of 1 VERDICT: no regression seen (n=1) ``` - No test in this PR. The run above covers it: present and capture paths, with no exception and no device lost.
DadaCap commented 2026-11-27 23:08:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-27T23:08:04Z.


Retest status on the new code: this head (3768be502) still merges cleanly with main d44285197. That merge changed nothing under runtime/, and this pull request touches only runtime/src/vulkan_present.h, which #2509 did not change either. It has no unit test of its own; OreoFR's merge-test run above is its latest in-game check.

This comment was AI-assisted (Claude Code, Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7229898040 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1694#issuecomment-7229898040). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-27T23:08:04Z. --- Retest status on the new code: this head (3768be502) still merges cleanly with `main` d44285197. That merge changed nothing under `runtime/`, and this pull request touches only `runtime/src/vulkan_present.h`, which #2509 did not change either. It has no unit test of its own; OreoFR's merge-test run above is its latest in-game check. This comment was AI-assisted (Claude Code, Opus 5.5).
zmasi commented 2026-11-29 01:25:51 +00:00 (Migrated from github.com)

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


Windows 11 + MSVC 19.44 + RTX 3090 Verification — PASS (3768be5020)

Verified 3768be5020 (RT-PRESENT-CAPTURE-CACHED) merged onto origin/main (5825b02ff8 / 53b77df14f, 0 conflicts) 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 -> Green memory-type selection on NVIDIA GeForce RTX 3090:
    • Queried vkGetBufferMemoryRequirements on a 1920 x 1080 x 4 VK_BUFFER_USAGE_TRANSFER_DST_BIT capture buffer and vkGetPhysicalDeviceMemoryProperties on NVIDIA GeForce RTX 3090:
      • Red (origin/main single-pass loop): selected memory type 3 (propertyFlags = 0x6: HOST_VISIBLE | HOST_COHERENT, uncached HOST_CACHED == 0).
      • Green (#1694 two-pass HOST_CACHED && !DEVICE_LOCAL loop): selected memory type 4 (propertyFlags = 0xe: HOST_VISIBLE | HOST_COHERENT | HOST_CACHED, HOST_CACHED == 1).
  • End-to-end presenter capture & dump suites on NVIDIA GeForce RTX 3090 (LEONIDA_VK_VALIDATION=1):
    • vk_present_dump_test.exe: rc=0, 0 VUID- / validation errors.
    • vk_presenter_sync_test.exe (default & --sparse-capture): rc=0, 0 VUID- / validation errors.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248777250 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1694#issuecomment-7248777250). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T01:25:51Z. --- ## Windows 11 + MSVC `19.44` + RTX 3090 Verification — PASS (`3768be5020`) Verified `3768be5020` (`RT-PRESENT-CAPTURE-CACHED`) merged onto `origin/main` (`5825b02ff8` / `53b77df14f`, `0` conflicts) 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 -> Green memory-type selection on NVIDIA GeForce RTX 3090**: - Queried `vkGetBufferMemoryRequirements` on a `1920 x 1080 x 4` `VK_BUFFER_USAGE_TRANSFER_DST_BIT` capture buffer and `vkGetPhysicalDeviceMemoryProperties` on **NVIDIA GeForce RTX 3090**: - **Red (`origin/main` single-pass loop)**: selected **memory type `3`** (`propertyFlags = 0x6`: `HOST_VISIBLE | HOST_COHERENT`, **uncached** `HOST_CACHED == 0`). - **Green (`#1694` two-pass `HOST_CACHED && !DEVICE_LOCAL` loop)**: selected **memory type `4`** (`propertyFlags = 0xe`: `HOST_VISIBLE | HOST_COHERENT | HOST_CACHED`, **`HOST_CACHED == 1`**). - **End-to-end presenter capture & dump suites on NVIDIA GeForce RTX 3090 (`LEONIDA_VK_VALIDATION=1`)**: - `vk_present_dump_test.exe`: **`rc=0`**, `0` `VUID-` / validation errors. - `vk_presenter_sync_test.exe` (default & `--sparse-capture`): **`rc=0`**, `0` `VUID-` / validation errors. AI-assisted.
OreoFR commented 2026-11-29 23:24:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T23:24:10Z.


Verified by OreoFR on the Runtime workflow of his fork (GitHub windows-latest, MSVC), main 452d1d1b6, PR head 3768be502. MEASURED. This PR has no test of its own, so there is no red; the comparison is main alone vs main + this PR, with the Windows job limit raised to 120 min on the fork branches only.

So the change builds and breaks no runtime test on Windows. Not covered: the host-cached memory choice and its read-back speed, which no test exercises (needs a GPU run).

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7264433105 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1694#issuecomment-7264433105). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T23:24:10Z. --- Verified by OreoFR on the Runtime workflow of his fork (GitHub `windows-latest`, MSVC), main 452d1d1b6, PR head 3768be502. MEASURED. This PR has no test of its own, so there is no red; the comparison is main alone vs main + this PR, with the Windows job limit raised to 120 min on the fork branches only. - **main alone**, https://github.com/OreoFR/leonida/actions/runs/46318842801: `windows` ctest 513/514, 2 disabled; the one failure is `display_white_cache` ("the first get() has no value yet"), a threaded timing test of `src/display_white_cache.h` that this PR does not touch. - **main + this PR** (`merge --no-ff`), https://github.com/OreoFR/leonida/actions/runs/46318840575: `windows` ctest **514/514 passed**, 2 disabled (`gameinput`, `gameinput_script`), out of 516. `linux-gpu-tools` passed. `macos` fails at "GPU tests on MoltenVK", as on upstream `main`'s own latest Runtime runs. Wine jobs not covered. So the change builds and breaks no runtime test on Windows. Not covered: the host-cached memory choice and its read-back speed, which no test exercises (needs a GPU run). AI-assisted: Claude Code
aslan2142 commented 2026-12-01 16:36:58 +00:00 (Migrated from github.com)

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


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