runtime/vulkan: unified per-frame perf pack (bindless 0-alloc, view/descriptor/format tables) #113

Closed
leonida/mandy
Andretuta wants to merge 0 commits from old-pr/9846 into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

Andretuta commented 2026-11-24 02:20:45 +00:00

Carried over from old PR 9846 by TG0000 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9846, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
TG0000: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Consolidated per-frame Vulkan runtime performance pack replacing closed PRs #8021, #8042, #8159, and #8180 (all previously independently verified across multiple GPUs including RX 9070 XT, RX 7800 XT, RX 6800, RTX 5070 Ti, RTX 5070, RTX 3070 Ti, RTX 2080, and Intel UHD 770).

What this combines

  1. GFX10 descriptor format table indexing (was #8021): compile-time indexed lookup instead of linear scan (~20x faster: 111 -> 5 ns).
  2. Hashed attachment-view cache indexed by image (was #8042): 2x–4.5x faster lookup and up to 460x faster image destroy (0.67 ms -> 3.4 us).
  3. Hashed border-color table & address-keyed replaced views (was #8159): removes O(N) scans under descriptor_mutex (5x–62.5x border colors, 3.3x–22.1x replaced views).
  4. Flat per-binding pending-write arrays & memchr free-index scan in vulkan_bindless.h (was #8180): 0 heap allocations per frame (was 2,811), 4x faster (206 -> 48 us/frame).

Testing

  • Built on Windows 11 (Ryzen 9 5900X, AMD Radeon RX 6800 gfx1030, clang++/Ninja/CMake 4.5.1, -DLEONIDA_BUILD_WINDOWS_RUNTIME=OFF, RelWithDebInfo): 158/158 targets, 0 warnings.
  • All 7 touched Vulkan tests pass (gfx10_tiling, image_view_cache, descriptor_tables, bindless_sizing, bindless_queue, gfx10_descriptors, gfx10_format_bench_selftest); 73/74 full CTest pass (the only failure is vk_queue_query_sync, which fails identically on bare origin/main on RX 6800).
  • git diff --check and scripts/check_no_game_data.py clean. No game data used.

AI-assisted (Claude Opus 5.5).

> Carried over from **old PR 9846** by `TG0000` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9846`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `TG0000`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Consolidated per-frame Vulkan runtime performance pack replacing closed PRs `#8021`, `#8042`, `#8159`, and `#8180` (all previously independently verified across multiple GPUs including RX 9070 XT, RX 7800 XT, RX 6800, RTX 5070 Ti, RTX 5070, RTX 3070 Ti, RTX 2080, and Intel UHD 770). ### What this combines 1. **GFX10 descriptor format table indexing** (was `#8021`): compile-time indexed lookup instead of linear scan (~20x faster: `111 -> 5 ns`). 2. **Hashed attachment-view cache indexed by image** (was `#8042`): `2x–4.5x` faster lookup and up to `460x` faster image destroy (`0.67 ms -> 3.4 us`). 3. **Hashed border-color table & address-keyed replaced views** (was `#8159`): removes O(N) scans under `descriptor_mutex` (`5x–62.5x` border colors, `3.3x–22.1x` replaced views). 4. **Flat per-binding pending-write arrays & `memchr` free-index scan in `vulkan_bindless.h`** (was `#8180`): `0` heap allocations per frame (was 2,811), `4x` faster (`206 -> 48 us/frame`). ### Testing - Built on Windows 11 (Ryzen 9 5900X, AMD Radeon RX 6800 gfx1030, clang++/Ninja/CMake 4.5.1, `-DLEONIDA_BUILD_WINDOWS_RUNTIME=OFF`, RelWithDebInfo): 158/158 targets, **0 warnings**. - All 7 touched Vulkan tests pass (`gfx10_tiling`, `image_view_cache`, `descriptor_tables`, `bindless_sizing`, `bindless_queue`, `gfx10_descriptors`, `gfx10_format_bench_selftest`); 73/74 full CTest pass (the only failure is `vk_queue_query_sync`, which fails identically on bare `origin/main` on RX 6800). - `git diff --check` and `scripts/check_no_game_data.py` clean. No game data used. AI-assisted (Claude Opus 5.5).
MoonEyes commented 2026-11-30 18:51:39 +00:00

Not merge-ready: this carried-over patch spans 12 runtime/test files (about 1,850 additions), is still a draft, conflicts with main, has no valid CI results, and has no current claim in coordination issue #2570. Given the stale conflicting base and breadth, a substantive review needs to be performed against an updated diff; I am not calling it obsolete without that evidence. Please claim the work, rebase/refresh it against current main, and rerun required CI before requesting merge. No merge until all criteria are satisfied.

Not merge-ready: this carried-over patch spans 12 runtime/test files (about 1,850 additions), is still a draft, conflicts with main, has no valid CI results, and has no current claim in coordination issue #2570. Given the stale conflicting base and breadth, a substantive review needs to be performed against an updated diff; I am not calling it obsolete without that evidence. Please claim the work, rebase/refresh it against current main, and rerun required CI before requesting merge. No merge until all criteria are satisfied.
aslan2142 reviewed 2026-12-01 11:15:25 +00:00
aslan2142 left a comment
No description provided.
This carried-over 12-file Vulkan perf pack remains a draft, has merge conflicts with `main`, and has cancelled CI runs with no current owner or claim. Because it bundles several independent subsystems (`vulkan_bindless.h`, `descriptor_tables.h`, `gfx10_descriptors.h`, `image_view_cache.h`, `d3d12_vulkan_device.cpp`), re-introducing the still-relevant pieces as smaller, rebased, CI-verified PRs against current `main` (or rebasing and marking ready if an owner picks it up) is recommended. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 12:08:39 +00:00

Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.

(AI-assisted triage.)

Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review. *(AI-assisted triage.)*
aslan2142 commented 2026-12-01 16:21:49 +00:00

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.

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.
Sign in to join this conversation.
No description provided.