d3d12: respect sparse buffer memory types when sharing tile heaps (D3D12-SPARSE-BUFFER-HEAP) #2645

Closed
lixonik wants to merge 9 commits from upstream-pr/2645 into main
lixonik commented 2026-11-29 21:04:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-29T21:04:24Z.


What and why

Supersedes #2405 with the original author's approval. Carries pepefroge's original commits and Intel Arc result, plus the two fixture updates requested in review. Coordination claim (D3D12-SPARSE-BUFFER-HEAP).

  • Use the per-resource Vulkan memory type mask before sharing the sparse arena. Reuse compatible dedicated backing already present on the heap ahead of the arena path, and reject a request that excludes that backing's type.
  • Exercise the mixed 0x02 --> 0x12 and incompatible 0x10 masks in a CPU test. Exercise a valid reserved texture and read back both its unbound tile and the unchanged buffer tile after the rejected mapping. Wait for the fence before resetting the command allocator.

Tested

Tested b7ee121c51 with main 7bbc1d22, Windows 10 22H2, RTX 5070 (610.88), MSVC 19.44, Khronos Vulkan validation and synchronization validation enabled.

  • d3d12_buffer_tiles, d3d12_buffer_tiles_heap_policy, and d3d12_texture_tiles: 3/3 passed. The reserved-texture subcase ran, and the buffer fixture matched all three native D3D12 readbacks.
  • Negative control: testing the arena before reusing the existing allocation fails the 0x12 CPU assertion. The production order passes.
  • No-game-data scan and git diff --check passed.

The original author checked Intel Arc Pro B60 (32.0.101.9150) and reported 0/12 mapped Vulkan buffer tiles before the fix and 12/12 with it. That hardware result covers the original fix. Original test report

AI-assisted.

Independent verification

On Windows, RTX 4090 matched the Vulkan and native D3D12 readbacks and exercised the rejected image mapping. On Wine, RTX 4070 SUPER and AMD Raphael each passed the buffer cases 3/3. A separate RADV A/B forced a mixed software mask while keeping the real allocation valid: the dedicated-first order returned the expected tile 3/3 and arena-first returned zero 3/3. The Wine/RADV texture-reference run hit device loss in VKD3D-Proton, while the project's Vulkan texture cases passed 3/3 with that reference disabled. Windows report · Wine and RADV report

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5555102374 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2645). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-29T21:04:24Z. --- ### What and why Supersedes #2405 with [the original author's approval](https://github.com/ProjectLeonida/mandy/pull/2405#issuecomment-7259109211). Carries pepefroge's original commits and Intel Arc result, plus the two fixture updates requested in review. [Coordination claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7262571025) (`D3D12-SPARSE-BUFFER-HEAP`). - Use the per-resource Vulkan memory type mask before sharing the sparse arena. Reuse compatible dedicated backing already present on the heap ahead of the arena path, and reject a request that excludes that backing's type. - Exercise the mixed `0x02 --> 0x12` and incompatible `0x10` masks in a CPU test. Exercise a valid reserved texture and read back both its unbound tile and the unchanged buffer tile after the rejected mapping. Wait for the fence before resetting the command allocator. ### Tested Tested `b7ee121c51` with `main` `7bbc1d22`, Windows 10 22H2, RTX 5070 (610.88), MSVC 19.44, Khronos Vulkan validation and synchronization validation enabled. - `d3d12_buffer_tiles`, `d3d12_buffer_tiles_heap_policy`, and `d3d12_texture_tiles`: 3/3 passed. The reserved-texture subcase ran, and the buffer fixture matched all three native D3D12 readbacks. - Negative control: testing the arena before reusing the existing allocation fails the `0x12` CPU assertion. The production order passes. - No-game-data scan and `git diff --check` passed. The original author checked Intel Arc Pro B60 (32.0.101.9150) and reported 0/12 mapped Vulkan buffer tiles before the fix and 12/12 with it. That hardware result covers the original fix. [Original test report](https://github.com/ProjectLeonida/mandy/pull/2405) AI-assisted. ### Independent verification On Windows, RTX 4090 matched the Vulkan and native D3D12 readbacks and exercised the rejected image mapping. On Wine, RTX 4070 SUPER and AMD Raphael each passed the buffer cases 3/3. A separate RADV A/B forced a mixed software mask while keeping the real allocation valid: the dedicated-first order returned the expected tile 3/3 and arena-first returned zero 3/3. The Wine/RADV texture-reference run hit device loss in VKD3D-Proton, while the project's Vulkan texture cases passed 3/3 with that reference disabled. [Windows report](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7264022466) · [Wine and RADV report](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7263007738)
merzleckeier commented 2026-11-29 21:36:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T21:36:22Z.


Independent synthetic retest of b7ee121c51 (GitHub merge 703e15527 onto 7bbc1d223). Win64 clang-cl Release (/MD) under Wine 11.22, DXVK a78a467c and VKD3D-Proton 71cae091. RTX 4070 SUPER (620.73.04) and Radeon Raphael (RADV 26.3.1). Vulkan validation was disabled for these runs.

  • MEASURED, exact tree. --heap-policy passed 3/3. d3d12_buffer_tiles passed 3/3 on each GPU. Each run reached the third-buffer alias, the refused image mapping with B preserved, and the twelve full-tile readbacks. RADV also matched all three reference readbacks through VKD3D-Proton. NVIDIA covered the Mandy Vulkan path.
  • MEASURED, texture reference. All four Vulkan cases, including the COPY-to-DIRECT handoff, passed in 3/3 NVIDIA runs. On RADV with the comparison enabled, the first reference case matched and VKD3D-Proton then returned VK_ERROR_DEVICE_LOST at wait_done(2) for the 256×240 case (3/3). Selecting a nonmatching LEONIDA_HOST_ADAPTER skipped that reference in the same executable and all four Mandy Vulkan cases passed 3/3 on RADV.
  • MEASURED, RADV allocation-order A/B. The driver returned 0x2d for A and B. A local probe removed only arena bit 3 from A's software mask (0x25) before allocation, leaving B at 0x2d. A allocated dedicated type 0 and B reused it with the PR ordering (3/3). In the same probe executable, forcing the arena decision before dedicated reuse left B unmapped, reading zero instead of 0x23456789 (3/3). Type 0 was valid for both driver masks throughout.

Synthetic fixtures only. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7263007738 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7263007738). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-29T21:36:22Z. --- Independent synthetic retest of `b7ee121c51` (GitHub merge `703e15527` onto `7bbc1d223`). Win64 clang-cl Release (`/MD`) under Wine 11.22, DXVK `a78a467c` and VKD3D-Proton `71cae091`. RTX 4070 SUPER (620.73.04) and Radeon Raphael (RADV 26.3.1). Vulkan validation was disabled for these runs. - **MEASURED, exact tree.** `--heap-policy` passed 3/3. `d3d12_buffer_tiles` passed 3/3 on each GPU. Each run reached the third-buffer alias, the refused image mapping with B preserved, and the twelve full-tile readbacks. RADV also matched all three reference readbacks through VKD3D-Proton. NVIDIA covered the Mandy Vulkan path. - **MEASURED, texture reference.** All four Vulkan cases, including the COPY-to-DIRECT handoff, passed in 3/3 NVIDIA runs. On RADV with the comparison enabled, the first reference case matched and VKD3D-Proton then returned `VK_ERROR_DEVICE_LOST` at `wait_done(2)` for the 256×240 case (3/3). Selecting a nonmatching `LEONIDA_HOST_ADAPTER` skipped that reference in the same executable and all four Mandy Vulkan cases passed 3/3 on RADV. - **MEASURED, RADV allocation-order A/B.** The driver returned `0x2d` for A and B. A local probe removed only arena bit 3 from A's software mask (`0x25`) before allocation, leaving B at `0x2d`. A allocated dedicated type 0 and B reused it with the PR ordering (3/3). In the same probe executable, forcing the arena decision before dedicated reuse left B unmapped, reading zero instead of `0x23456789` (3/3). Type 0 was valid for both driver masks throughout. Synthetic fixtures only. AI-assisted with OpenAI Codex.
fiestorra commented 2026-11-29 22:52:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-29T22:52:55Z.


Verified on main 452d1d1b6, Windows 11, Ninja + RelWithDebInfo, RTX 4090:

git merge-tree origin/main refs/pull/2645/head   -> clean
cherry-pick of the 6 non-merge commits           -> clean
cmake --build … --target d3d12_buffer_tiles_test -> built
d3d12_buffer_tiles_test.exe                      -> exit 0 twice

The test is substantive rather than a smoke check, and it printed what it checked:

Mixed mask: an image on the buffer-only heap was refused and B's tile is unchanged
Mixed mask: live buffers reused the same tile
Vulkan replay: 12 full tiles matched across aliased, skipped, unmapped, reused and remapped ranges
A rejected update left all tile mappings intact
Native D3D12: NVIDIA GeForce RTX 4090 (the layer's adapter), tiled resources tier 4

So the heap-policy work is exercised on both paths here - the Vulkan replay and native D3D12 with tiled resources tier 4 - and the rejection case is covered alongside the happy one (+239/-2 in that test file).

One practical note before merging: the branch contains merge commits from main into the review branch (a55c9c8f, b7ee121c5). They are harmless to GitHub's merge, but they make a cherry-pick of the whole range conflict in the middle, which is how I found them - anyone replaying this branch by hand should take the non-merge commits (--no-merges), and a rebase before merging would drop the noise.

Not tested: a buffer larger than this machine's memory (sparse buffers are the point of the change and the test uses synthetic sizes), and any run of the title.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7264022466 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7264022466). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-29T22:52:55Z. --- Verified on `main` `452d1d1b6`, Windows 11, Ninja + RelWithDebInfo, RTX 4090: ``` git merge-tree origin/main refs/pull/2645/head -> clean cherry-pick of the 6 non-merge commits -> clean cmake --build … --target d3d12_buffer_tiles_test -> built d3d12_buffer_tiles_test.exe -> exit 0 twice ``` The test is substantive rather than a smoke check, and it printed what it checked: ``` Mixed mask: an image on the buffer-only heap was refused and B's tile is unchanged Mixed mask: live buffers reused the same tile Vulkan replay: 12 full tiles matched across aliased, skipped, unmapped, reused and remapped ranges A rejected update left all tile mappings intact Native D3D12: NVIDIA GeForce RTX 4090 (the layer's adapter), tiled resources tier 4 ``` So the heap-policy work is exercised on **both** paths here - the Vulkan replay and native D3D12 with tiled resources tier 4 - and the rejection case is covered alongside the happy one (`+239/-2` in that test file). **One practical note before merging:** the branch contains **merge commits** from `main` into the review branch (`a55c9c8f`, `b7ee121c5`). They are harmless to GitHub's merge, but they make a cherry-pick of the whole range conflict in the middle, which is how I found them - anyone replaying this branch by hand should take the non-merge commits (`--no-merges`), and a rebase before merging would drop the noise. **Not tested:** a buffer larger than this machine's memory (sparse buffers are the point of the change and the test uses synthetic sizes), and any run of the title. Written with an AI assistant.
ammonium231 commented 2026-11-30 05:30:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ammonium231 on 2026-11-30T05:30:01Z.


RTX 3090 / 621.40, validation on, b7ee121c5 merged onto main 40e7fe69d: d3d12_buffer_tiles, d3d12_buffer_tiles_heap_policy and d3d12_texture_tiles pass (main 2/2; heap_policy is new). Tiled resources tier 4, no validation errors.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7269726296 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7269726296). Originally posted by [ammonium231](https://github.com/ammonium231) on 2026-11-30T05:30:01Z. --- RTX 3090 / 621.40, validation on, b7ee121c5 merged onto main 40e7fe69d: d3d12_buffer_tiles, d3d12_buffer_tiles_heap_policy and d3d12_texture_tiles pass (main 2/2; heap_policy is new). Tiled resources tier 4, no validation errors.
fiestorra commented 2026-11-30 05:37:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T05:37:46Z.


Independent verification on this machine (Windows 11, MSVC 19.44.35226, RTX 4090), and the result is "applies, builds, passes, but the usual negative control is impossible by construction" - which I would rather state than dress up.

1. It applies. merge-tree clean. Six non-merge commits (the branch also carries two merges of main, so --no-merges is required); all six cherry-pick onto main 1d22590b9 without a conflict. Five files, 298 insertions(+), 6 deletions(-).

2. It builds and passes, three times:

cmake --build runtime/build-ninja --target d3d12_buffer_tiles_test   -> linked
d3d12_buffer_tiles_test.exe                                          -> exit 0, 0, 0

3. The negative control cannot run, and here is exactly how far it gets. I tried three reverts:

what I reverted result
the new header runtime/src/sparse_buffer_backing.h does not compile: d3d12_buffer_tiles_test.cpp(3): fatal error C1083, the include is new
the header + d3d12_vulkan_device.cpp same
only d3d12_vulkan_device.cpp, header kept does not compile: d3d12_buffer_tiles_test.cpp(301): error C2039 and C3861, the test calls symbols this PR adds

So the test cannot exist against main's code, and "revert the source and watch it fail" is not available here. What that proves is that the test exercises the new paths; it does not prove the new policy is right.

A measurement error I caught twice in a row: the exit 0, 0, 0 from those failed builds came from the previous binary, because a failed compile leaves the old executable in place. Comparing the .exe timestamp is what exposes it, and the numbers in the table above are compile failures, not passing runs. I nearly published "still passes" from an old binary in the previous pull request I verified, and the same trap was waiting here.

What I did not test: the behaviour itself - that a sparse buffer whose WDDM1_…/WDDM2_… memory type does not match stops sharing the tile arena, and that two buffers with the same mask still reuse an allocation. Those need the title's sparse resource traffic; the test builds the objects and drives the entry points, which is the closest this machine gets.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7269849311 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7269849311). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T05:37:46Z. --- Independent verification on this machine (Windows 11, MSVC 19.44.35226, RTX 4090), and the result is **"applies, builds, passes, but the usual negative control is impossible by construction"** - which I would rather state than dress up. **1. It applies.** `merge-tree` clean. Six non-merge commits (the branch also carries two merges of `main`, so `--no-merges` is required); all six cherry-pick onto `main` `1d22590b9` without a conflict. Five files, `298 insertions(+), 6 deletions(-)`. **2. It builds and passes, three times:** ``` cmake --build runtime/build-ninja --target d3d12_buffer_tiles_test -> linked d3d12_buffer_tiles_test.exe -> exit 0, 0, 0 ``` **3. The negative control cannot run, and here is exactly how far it gets.** I tried three reverts: | what I reverted | result | |---|---| | the new header `runtime/src/sparse_buffer_backing.h` | **does not compile**: `d3d12_buffer_tiles_test.cpp(3): fatal error C1083`, the include is new | | the header + `d3d12_vulkan_device.cpp` | same | | only `d3d12_vulkan_device.cpp`, header kept | **does not compile**: `d3d12_buffer_tiles_test.cpp(301): error C2039` and `C3861`, the test calls symbols this PR adds | So the test cannot exist against `main`'s code, and "revert the source and watch it fail" is not available here. What that proves is that the test exercises the new paths; it does not prove the new policy is right. **A measurement error I caught twice in a row:** the `exit 0, 0, 0` from those failed builds came from the **previous binary**, because a failed compile leaves the old executable in place. Comparing the `.exe` timestamp is what exposes it, and the numbers in the table above are compile failures, not passing runs. I nearly published "still passes" from an old binary in the previous pull request I verified, and the same trap was waiting here. **What I did not test:** the behaviour itself - that a sparse buffer whose `WDDM1_…`/`WDDM2_…` memory type does not match stops sharing the tile arena, and that two buffers with the same mask still reuse an allocation. Those need the title's sparse resource traffic; the test builds the objects and drives the entry points, which is the closest this machine gets. Written with an AI assistant.
lixonik commented 2026-11-30 05:58:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-30T05:58:20Z.


@fiestorra Thanks for verifying the build and catching the stale executable. There is a synthetic negative control for the allocation-order behavior on this exact PR head, separate from removing the new test's API. In the RADV A/B above, merzleckeier excluded only the arena bit from buffer A's software mask and held both driver masks and buffer B fixed. With the PR order B reused A's dedicated allocation and read the expected tile. Reversing just the order left B unmapped and reading zero, 3/3 in both arms. This covers the controlled mixed-mask case. The natural frequency of such a split in the title remains unmeasured by that probe.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7270178623 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7270178623). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-30T05:58:20Z. --- @fiestorra Thanks for verifying the build and catching the stale executable. There is a synthetic negative control for the allocation-order behavior on this exact PR head, separate from removing the new test's API. In [the RADV A/B above](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7263007738), merzleckeier excluded only the arena bit from buffer A's software mask and held both driver masks and buffer B fixed. With the PR order B reused A's dedicated allocation and read the expected tile. Reversing just the order left B unmapped and reading zero, 3/3 in both arms. This covers the controlled mixed-mask case. The natural frequency of such a split in the title remains unmeasured by that probe. AI-assisted.
KelboLive commented 2026-11-30 16:40:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T16:40:36Z.


Independent check on Windows/NVIDIA (not the author), at b7ee121c5.

  • Built d3d12_buffer_tiles_test and ran it on the RTX 4070 Ti SUPER: exit 0.
    • Mixed mask: buffer-only heap image refused, B's tile unchanged; live buffers reused the same tile.
    • Vulkan replay: 12 full tiles matched across aliased, skipped, unmapped, reused and remapped ranges.
    • A rejected update left all mappings intact.
    • Native D3D12: NVIDIA GeForce RTX 4070 Ti SUPER, tiled resources tier 4; all three GPU readbacks matched.

Environment: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Windows 11 Pro 10.0.26200.9711.

AI-assisted: yes (opencode).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7285053422 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7285053422). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-30T16:40:36Z. --- Independent check on Windows/NVIDIA (not the author), at `b7ee121c5`. - Built `d3d12_buffer_tiles_test` and ran it on the RTX 4070 Ti SUPER: **exit 0**. - Mixed mask: buffer-only heap image refused, B's tile unchanged; live buffers reused the same tile. - Vulkan replay: 12 full tiles matched across aliased, skipped, unmapped, reused and remapped ranges. - A rejected update left all mappings intact. - Native D3D12: NVIDIA GeForce RTX 4070 Ti SUPER, tiled resources tier 4; all three GPU readbacks matched. Environment: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Windows 11 Pro 10.0.26200.9711. AI-assisted: yes (opencode).
lixonik commented 2026-12-01 04:13:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-01T04:13:20Z.


Re-verified #2645 (b7ee121c5) merged cleanly onto current main (a596adfac, local merge 4ddea0d79) on Windows 10 Pro 22H2 + NVIDIA GeForce RTX 5070 12 GB (driver 621.40, MSVC 19.44):

  1. Unit / GPU tile tests (LEONIDA_VK_VALIDATION=1, VK_VALIDATE_SYNC=1, MEASURED):
    • d3d12_buffer_tiles_test: passed (exit 0, 0 validation errors).
    • d3d12_texture_tiles_test: passed (exit 0, 0 validation errors; native D3D12 matched all verified pixels across all 4 subcases).
    • Runtime log confirmed on RTX 5070 / 621.40: sparse buffers on this device expose no host-visible coherent memory type (memoryTypeBits=0x2).
  2. Vulkan game boot A/B (main a596adfac vs main + #2645, MEASURED, n=1 per arm, 120 s each):
    • Both arms reached first-run UI / menu with 0 device losses, 0 faults, and 0 failed list writes (same).
    • Scope note: UpdateTileMappings / CreateReservedResource were not invoked during this 120 s first-run UI / menu boot (count=0; built with LEONIDA_SDL3=OFF, no watchdog KICK), so this verifies no boot regression on current main (a596adfac) alongside the driver 621.40 GPU tile tests above; a longer world-streaming Vulkan run exercising live UpdateTileMappings is still open.
RUN 2645-A-vk | 2026-12-01 UTC | lixonik | AI-assisted: Antigravity
BASE:        a596adfac (main) | shaders: make_game.py --stages shaders --wave64-emulate auto (--wave64-emulate --no-ftz32, llvm-mc 21.1.8; 29,280 SPIR-V modules)
MACHINE:     NVIDIA GeForce RTX 5070, 12 GB, desktop | 621.40 | Windows 10 Pro 22H2 (build 19045) | 64 GiB RAM | Ryzen 9 5950X
RECIPE:      documented (docs/running.md "Windows, NVIDIA" + recommended vars) + DEVIATIONS: LEONIDA_SDL3=OFF, LEONIDA_DEVICE_TYPE=6, LEONIDA_ARENA_MB=1024, LEONIDA_SUBMIT_ASYNC=4, LEONIDA_ASYNC_PIPELINES=1, LEONIDA_ASYNC_MIN_BYTES=2097152, LEONIDA_ASYNC_MIN_BYTES_GRAPHICS=0, LEONIDA_RT_AS=off, LEONIDA_DEVICE_FAULT=2, LEONIDA_SKIP_INT3=1 | precompile: no (warm pso cache)
OS/DRIVER:   TdrDelay=default, no Resizable BAR
TARGET:      Vulkan boot stability (first-run UI / menu) | PREDICTED (written before the run): clean boot, 0 device losses
MEASURED:    first-run UI / menu (120 s): 22.1 -> 123.1 -> 92.3 fps across 10 s submit windows, 62,392 list writes (62,385 landed, 0 failed), 9,324 waits met, arena peak 506.9 / 1,024.0 MiB (non-sparse fallback, memoryTypeBits=0x2), 0 device lost, 0 UpdateTileMappings calls | duration 123.3 s
END:         time limit (120 s)
CACHES:      warm: pso dir (calibrated adaptive compile gate on 621.40) | RUN 1 of 1
INSTRUMENTS: standard runtime stderr log
VERDICT:     prediction held
RUN 2645-B-vk | 2026-12-01 UTC | lixonik | AI-assisted: Antigravity
BASE:        a596adfac + #2645 (b7ee121c5, merged locally 4ddea0d79) | shaders: same (29,280 SPIR-V modules)
MACHINE:     NVIDIA GeForce RTX 5070, 12 GB, desktop | 621.40 | Windows 10 Pro 22H2 (build 19045) | 64 GiB RAM | Ryzen 9 5950X
RECIPE:      same as 2645-A-vk | precompile: no (warm pso cache)
OS/DRIVER:   TdrDelay=default, no Resizable BAR
TARGET:      Vulkan boot stability (first-run UI / menu) | PREDICTED (written before the run): same as A, 0 regressions
MEASURED:    first-run UI / menu (120 s): 20.7 -> 125.1 -> 68.9 fps across 10 s submit windows, 59,504 list writes (59,497 landed, 0 failed), 9,721 waits met, arena peak 18.8 / 1,024.0 MiB (non-sparse fallback, memoryTypeBits=0x2), 0 device lost, 0 UpdateTileMappings calls | duration 123.3 s
END:         time limit (120 s)
CACHES:      warm: pso dir | RUN 1 of 1
INSTRUMENTS: standard runtime stderr log
VERDICT:     prediction held (same; 0 regressions; UpdateTileMappings not triggered in menu boot)

AI-assisted: Antigravity.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7300505026 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7300505026). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-01T04:13:20Z. --- Re-verified `#2645` (`b7ee121c5`) merged cleanly onto current `main` (`a596adfac`, local merge `4ddea0d79`) on Windows 10 Pro 22H2 + NVIDIA GeForce RTX 5070 12 GB (driver **621.40**, MSVC 19.44): 1. **Unit / GPU tile tests (`LEONIDA_VK_VALIDATION=1`, `VK_VALIDATE_SYNC=1`, `MEASURED`):** - `d3d12_buffer_tiles_test`: passed (exit 0, 0 validation errors). - `d3d12_texture_tiles_test`: passed (exit 0, 0 validation errors; native D3D12 matched all verified pixels across all 4 subcases). - Runtime log confirmed on RTX 5070 / `621.40`: `sparse buffers on this device expose no host-visible coherent memory type (memoryTypeBits=0x2)`. 2. **Vulkan game boot A/B (`main a596adfac` vs `main + #2645`, `MEASURED`, n=1 per arm, 120 s each):** - Both arms reached `first-run UI / menu` with 0 device losses, 0 faults, and 0 failed list writes (`same`). - Scope note: `UpdateTileMappings` / `CreateReservedResource` were not invoked during this 120 s first-run UI / menu boot (`count=0`; built with `LEONIDA_SDL3=OFF`, no watchdog KICK), so this verifies no boot regression on current `main` (`a596adfac`) alongside the driver `621.40` GPU tile tests above; a longer world-streaming Vulkan run exercising live `UpdateTileMappings` is still open. ```text RUN 2645-A-vk | 2026-12-01 UTC | lixonik | AI-assisted: Antigravity BASE: a596adfac (main) | shaders: make_game.py --stages shaders --wave64-emulate auto (--wave64-emulate --no-ftz32, llvm-mc 21.1.8; 29,280 SPIR-V modules) MACHINE: NVIDIA GeForce RTX 5070, 12 GB, desktop | 621.40 | Windows 10 Pro 22H2 (build 19045) | 64 GiB RAM | Ryzen 9 5950X RECIPE: documented (docs/running.md "Windows, NVIDIA" + recommended vars) + DEVIATIONS: LEONIDA_SDL3=OFF, LEONIDA_DEVICE_TYPE=6, LEONIDA_ARENA_MB=1024, LEONIDA_SUBMIT_ASYNC=4, LEONIDA_ASYNC_PIPELINES=1, LEONIDA_ASYNC_MIN_BYTES=2097152, LEONIDA_ASYNC_MIN_BYTES_GRAPHICS=0, LEONIDA_RT_AS=off, LEONIDA_DEVICE_FAULT=2, LEONIDA_SKIP_INT3=1 | precompile: no (warm pso cache) OS/DRIVER: TdrDelay=default, no Resizable BAR TARGET: Vulkan boot stability (first-run UI / menu) | PREDICTED (written before the run): clean boot, 0 device losses MEASURED: first-run UI / menu (120 s): 22.1 -> 123.1 -> 92.3 fps across 10 s submit windows, 62,392 list writes (62,385 landed, 0 failed), 9,324 waits met, arena peak 506.9 / 1,024.0 MiB (non-sparse fallback, memoryTypeBits=0x2), 0 device lost, 0 UpdateTileMappings calls | duration 123.3 s END: time limit (120 s) CACHES: warm: pso dir (calibrated adaptive compile gate on 621.40) | RUN 1 of 1 INSTRUMENTS: standard runtime stderr log VERDICT: prediction held ``` ```text RUN 2645-B-vk | 2026-12-01 UTC | lixonik | AI-assisted: Antigravity BASE: a596adfac + #2645 (b7ee121c5, merged locally 4ddea0d79) | shaders: same (29,280 SPIR-V modules) MACHINE: NVIDIA GeForce RTX 5070, 12 GB, desktop | 621.40 | Windows 10 Pro 22H2 (build 19045) | 64 GiB RAM | Ryzen 9 5950X RECIPE: same as 2645-A-vk | precompile: no (warm pso cache) OS/DRIVER: TdrDelay=default, no Resizable BAR TARGET: Vulkan boot stability (first-run UI / menu) | PREDICTED (written before the run): same as A, 0 regressions MEASURED: first-run UI / menu (120 s): 20.7 -> 125.1 -> 68.9 fps across 10 s submit windows, 59,504 list writes (59,497 landed, 0 failed), 9,721 waits met, arena peak 18.8 / 1,024.0 MiB (non-sparse fallback, memoryTypeBits=0x2), 0 device lost, 0 UpdateTileMappings calls | duration 123.3 s END: time limit (120 s) CACHES: warm: pso dir | RUN 1 of 1 INSTRUMENTS: standard runtime stderr log VERDICT: prediction held (same; 0 regressions; UpdateTileMappings not triggered in menu boot) ``` AI-assisted: Antigravity.
merzleckeier commented 2026-12-01 14:01:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T14:01:47Z.


I reran the sparse tile tests with Khronos validation on 7dc9454f merged onto 9f27ba2e (tree 58810dbd), against a separate build of main. Wine 11.22, AMD Raphael (RADV 26.3.1) and RTX 4070 SUPER (NVIDIA 620.73.04), Win64 clang-cl Release. The later main commit 3e7b34a5 only changes translator wording and comments.

  • Both trees passed the Vulkan buffer and texture checks on both GPUs, with and without VK_LAYER_KHRONOS_validation 1.4.363. The buffer test matched 12 full tiles, and the texture test ran all four cases including the COPY-to-DIRECT handoff. The PR also passed its CPU heap policy, third-buffer alias, and incompatible-image rejection checks on the relevant paths.
  • With validate_sync=true, all eight runs still returned 0. No synchronization hazard appeared. Each run did report the same device-creation VUID 01387 on both trees, for VK_EXT_external_memory_dma_buf being enabled without its required VK_KHR_external_memory_fd. This validation run therefore has one pre-existing diagnostic per case.

The Vulkan readbacks were checked against the fixture's expected values. The native D3D12 reference was intentionally skipped in these Wine runs. No game files. MEASURED, AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7313578108 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2645#issuecomment-7313578108). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-01T14:01:47Z. --- I reran the sparse tile tests with Khronos validation on `7dc9454f` merged onto `9f27ba2e` (tree `58810dbd`), against a separate build of `main`. Wine 11.22, AMD Raphael (RADV 26.3.1) and RTX 4070 SUPER (NVIDIA 620.73.04), Win64 clang-cl Release. The later `main` commit `3e7b34a5` only changes translator wording and comments. - Both trees passed the Vulkan buffer and texture checks on both GPUs, with and without `VK_LAYER_KHRONOS_validation` 1.4.363. The buffer test matched 12 full tiles, and the texture test ran all four cases including the COPY-to-DIRECT handoff. The PR also passed its CPU heap policy, third-buffer alias, and incompatible-image rejection checks on the relevant paths. - With `validate_sync=true`, all eight runs still returned 0. No synchronization hazard appeared. Each run did report the same device-creation VUID `01387` on both trees, for `VK_EXT_external_memory_dma_buf` being enabled without its required `VK_KHR_external_memory_fd`. This validation run therefore has one pre-existing diagnostic per case. The Vulkan readbacks were checked against the fixture's expected values. The native D3D12 reference was intentionally skipped in these Wine runs. No game files. MEASURED, AI-assisted (Codex).
aslan2142 commented 2026-12-01 16:46:20 +00:00 (Migrated from github.com)

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


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