perf(runtime): reuse rendering scopes across compatible draws #1877

Open
github-bot wants to merge 7 commits from github-bot/gh-1877 into main AGit
Owner

@⁠cheltyi on GitHub · 2026-11-25 13:53 UTC · original
cheltyi:perf/replay-draw-scopes → main · +1429 −50 · 7 files · 7 commits · open

Claimed in the coordination issue as: D3D-REPLAY-DRAW-SCOPE-RUNS — claim; D3D-REPLAY-SCOPE-METRICS — claim.

Depends on: #1062 — the documentation edits overlap in section 4.3; the runtime code has no dependency on its render-pass API implementation.

What and why

The Vulkan replay currently starts and ends dynamic rendering for every resolved draw, with attachment dependencies between those scopes. For 10,000 consecutive draws sharing a color/depth target, this emits 10,000 begins, 10,000 ends and 20,000 attachment barriers.

Keep one scope across consecutive compatible direct draws. Compatibility requires the same prepared graphics pipeline, attachment slots/images/views/subresource ranges/layouts, render area and layer count. Close before all other commands, skipped or indirect draws, statistics endpoints and GPU helpers, and before list cleanup. Each draw still emits its own state, descriptors, push constants and arguments. Fixed-function depth/stencil/blend ordering remains Vulkan rasterization order within the scope. The compatible 10,000-draw case now has one begin/end and two attachment dependencies.

The scope-lifetime optimization is independent of #1062's COM render-pass API; its section 4.3 documentation overlap is declared above.

LEONIDA_RENDERING_SCOPE_STATS=1 now reports aggregate emitted/eligible/indirect/skipped draw commands, application scopes, shared draws, maximum run, a run-length histogram and scope-end reasons. The cached opt-in selects a template once per list; the default specialization has no per-draw counter updates. The instrumented path collects locally and merges once per list, including with device-fault checkpoints enabled. Reports contain fixed labels and totals only, at powers of two emitted lists and normal exit. Counts describe CPU replay attempts, including repeated lists or work that may not complete on the GPU.

The existing GPU fixture gains --bench-mixed: runs of 2/3 draws separated by UAV barriers, actual pipeline changes, target changes or single indirect draws, plus a repeating mixed sequence. Every pass checks both targets' pixels/depth and rendering scope counts. The default correctness run includes the mixed sequence. The renderer implementation is not duplicated.

Measured frame cost

Ryzen 5 5600 + Radeon RX 6700 XT, RADV Mesa 26.2.5-arch3.1, Arch Linux. The new hand-authored fixture draws 10,000 scissored triangles into a 32×32 RGBA32F/D32 target, with changing push constants, depth testing/writes and alpha blending. Global UAV barriers split the compatible runs. Every color/depth texel is independently calculated on the CPU and checked after every frame.

Compatible run length Before frame (ms) After frame (ms) Change
4 43.67 20.12 −54%
16 43.29 12.90 −70%
64 42.83 9.88 −77%
10,000 42.94 8.10 −81%

These are medians of two alternating before/after process medians, each with three warmups and seven measured frames, without validation. In the full compatible case, CPU emit was 10.97 → 3.29 ms and the GPU replay interval 31.62 → 4.53 ms. Pipeline creation and preparation are outside timing; serialized frame cost includes command recording, submission, readback and waiting for completion. This is synthetic runtime frame time; retail-game FPS and the distribution of compatible run lengths have not been measured.

The singleton control (a UAV barrier between every draw) used a longer check: CPU affinity, 30 warmups + 30 samples, five quiet alternating pairs. Median 10,000-draw frame time was 48.72 → 48.86 ms (+0.29%); CPU emit 13.043 → 13.023 ms. A separate cheap-stub CPU benchmark found about 5% added untracked singleton overhead (roughly 0.10 ms/10,000 draws), without reproducing a frame regression on the GPU. This optimization benefits compatible runs; it retains the existing work at boundaries.

Additional mixed-workload measurements

GCC 16.2.1, -O3 -DNDEBUG, RADV NAVI22, Mesa 26.2.5. Five alternating before/after process pairs pinned to CPU 4; each process uses three warm-up and seven measured passes per case. Validation and scope diagnostics are disabled for timings. Values below are medians of the five process medians at 10,000 draw commands. The baseline uses the main replay header at db1a22d29; all other runtime sources and the synthetic workload match. Its only fixture change is the expected per-draw scope count. Both versions pass pixel/depth/blend checks.

Boundary / direct run Scopes after (before: 10,000) Before frame ms After frame ms Change
UAV barrier / 2 5,000 46.95 30.18 -35.7%
UAV barrier / 3 3,334 45.74 23.49 -48.6%
Pipeline / 2 5,000 47.41 31.39 -33.8%
Pipeline / 3 3,334 46.16 25.60 -44.6%
Targets / 2 5,000 45.16 29.82 -34.0%
Targets / 3 3,334 46.90 25.56 -45.5%
Single indirect / 2 6,667 49.64 36.65 -26.2%
Single indirect / 3 5,000 47.05 30.60 -35.0%
Mixed / variable 5,000 52.11 34.22 -34.3%

These are serialized synthetic frame costs, including recording/submission/readback/waiting. They do not establish a retail FPS gain or fix the black screen. The unsuccessful retail FPS comparison is recorded below.

A separate five alternating process pairs compare #1877 without this follow-up against this follow-up with diagnostics disabled. The 10,000-command mixed case changes from 32.5534 to 32.7262 ms frame (+0.53%), and 8.7039 to 8.7131 ms CPU emit (+0.11%). Across the nine 10,000-command cases, frame medians range from -3.44% to +7.12%, CPU emit from -5.98% to +6.00%; these runs do not establish zero overhead in every workload.

Tested

  • Full portable Release runtime build and CTest: 100 passed, 0 failed, 2 skipped (retail shader corpus unset; sync-validation self-test requires explicit opt-in).
  • Explicit validation + scope statistics: vk_rendering_scope, vk_sync_validation, replay_rendering_scope, replay_rendering_scope_stats all pass. The sync-validation self-test detects its deliberately missing barrier; rendering-scope fixture reports zero validation errors. Baseline fixture also passes validation.
  • CPU fixture covers every histogram edge, boundary reasons, skipped/indirect/helper/statistics draws, exclusion of internal clear scopes, repeated/empty lists and per-draw device-fault checkpoints. Exact environment opt-in checked with unset/0/1/true/10.
  • All 20 benchmark processes pass pixel/depth/blend and scope checks, at both 1,000 and 10,000 commands.
  • Translator suite: 491 files, 6,312 tests, no failures. compileall, make_game.py --help, text line-ending tests, no-game-data check and git diff --check pass.

GPUs tested: AMD Radeon RX 6700 XT (RADV NAVI22), Mesa/vulkan-radeon 26.2.5, CachyOS kernel 7.3.1-1-cachyos. Vulkan validation layer 1.4.363. Windows/MSVC was not run locally for the added diagnostics/mixed cases. Independent Windows reviews in this PR apply to the original 47e177df6 revision.

AI-assisted: yes.

After merging current main (a224b5d14) for final HEAD 5d58dde1c, CMake confirms the portable build is up to date, and the seven focused rendering/query/indirect tests pass with validation and scope diagnostics enabled. Runtime replay sources and semantic tests are unchanged by that final main merge.

Retail boot limit (2026-11-25)

Two offline, network-isolated retail boot checks on CachyOS 7.3.1, RADV/Mesa 26.2.5 did not yield a verified first world frame. HEAD 47e177df6 ran for 12 minutes through setup/loading before its time limit. Baseline 77baf9062 ran for 6 minutes 43 seconds before an AMD GPU fault and successful GPU reset.

The baseline used a copy of the completed first-run settings from the HEAD run, so these are not a matched frame-time/FPS pair. No retail FPS gain is established. The baseline fault shows that a GPU reset can occur without this optimization; it does not establish the cause of the earlier desktop freeze or show that this PR fixes it. The synthetic results above remain synthetic frame costs.

Checklist

  • Based on current main (a224b5d14) and merges cleanly.
  • One topic: rendering-scope reuse, its diagnostics and validation.
  • No game data, keys or decryption, including quoted logs/reports; shaders are hand-authored synthetic fixtures.
  • No new translator rule; the runtime replay behavior is documented in docs/d3d12_vulkan.md.
**@⁠cheltyi** on GitHub · 2026-11-25 13:53 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1877) `cheltyi:perf/replay-draw-scopes` → `main` · +1429 −50 · 7 files · 7 commits · open Claimed in the coordination issue as: **D3D-REPLAY-DRAW-SCOPE-RUNS** — [claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608); **D3D-REPLAY-SCOPE-METRICS** — [claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608). Depends on: #1062 — the documentation edits overlap in section 4.3; the runtime code has no dependency on its render-pass API implementation. ### What and why The Vulkan replay currently starts and ends dynamic rendering for every resolved draw, with attachment dependencies between those scopes. For 10,000 consecutive draws sharing a color/depth target, this emits 10,000 begins, 10,000 ends and 20,000 attachment barriers. Keep one scope across consecutive compatible direct draws. Compatibility requires the same prepared graphics pipeline, attachment slots/images/views/subresource ranges/layouts, render area and layer count. Close before all other commands, skipped or indirect draws, statistics endpoints and GPU helpers, and before list cleanup. Each draw still emits its own state, descriptors, push constants and arguments. Fixed-function depth/stencil/blend ordering remains Vulkan rasterization order within the scope. The compatible 10,000-draw case now has one begin/end and two attachment dependencies. The scope-lifetime optimization is independent of #1062's COM render-pass API; its section 4.3 documentation overlap is declared above. `LEONIDA_RENDERING_SCOPE_STATS=1` now reports aggregate emitted/eligible/indirect/skipped draw commands, application scopes, shared draws, maximum run, a run-length histogram and scope-end reasons. The cached opt-in selects a template once per list; the default specialization has no per-draw counter updates. The instrumented path collects locally and merges once per list, including with device-fault checkpoints enabled. Reports contain fixed labels and totals only, at powers of two emitted lists and normal exit. Counts describe CPU replay attempts, including repeated lists or work that may not complete on the GPU. The existing GPU fixture gains `--bench-mixed`: runs of 2/3 draws separated by UAV barriers, actual pipeline changes, target changes or single indirect draws, plus a repeating mixed sequence. Every pass checks both targets' pixels/depth and rendering scope counts. The default correctness run includes the mixed sequence. The renderer implementation is not duplicated. ### Measured frame cost Ryzen 5 5600 + Radeon RX 6700 XT, RADV Mesa 26.2.5-arch3.1, Arch Linux. The new hand-authored fixture draws 10,000 scissored triangles into a 32×32 RGBA32F/D32 target, with changing push constants, depth testing/writes and alpha blending. Global UAV barriers split the compatible runs. Every color/depth texel is independently calculated on the CPU and checked after every frame. | Compatible run length | Before frame (ms) | After frame (ms) | Change | |---|---:|---:|---:| | 4 | 43.67 | 20.12 | −54% | | 16 | 43.29 | 12.90 | −70% | | 64 | 42.83 | 9.88 | −77% | | 10,000 | 42.94 | 8.10 | −81% | These are medians of two alternating before/after process medians, each with three warmups and seven measured frames, without validation. In the full compatible case, CPU emit was 10.97 → 3.29 ms and the GPU replay interval 31.62 → 4.53 ms. Pipeline creation and preparation are outside timing; serialized frame cost includes command recording, submission, readback and waiting for completion. This is synthetic runtime frame time; retail-game FPS and the distribution of compatible run lengths have not been measured. The singleton control (a UAV barrier between every draw) used a longer check: CPU affinity, 30 warmups + 30 samples, five quiet alternating pairs. Median 10,000-draw frame time was 48.72 → 48.86 ms (+0.29%); CPU emit 13.043 → 13.023 ms. A separate cheap-stub CPU benchmark found about 5% added untracked singleton overhead (roughly 0.10 ms/10,000 draws), without reproducing a frame regression on the GPU. This optimization benefits compatible runs; it retains the existing work at boundaries. ### Additional mixed-workload measurements GCC 16.2.1, `-O3 -DNDEBUG`, RADV NAVI22, Mesa 26.2.5. Five alternating before/after process pairs pinned to CPU 4; each process uses three warm-up and seven measured passes per case. Validation and scope diagnostics are disabled for timings. Values below are medians of the five process medians at 10,000 draw commands. The baseline uses the `main` replay header at `db1a22d29`; all other runtime sources and the synthetic workload match. Its only fixture change is the expected per-draw scope count. Both versions pass pixel/depth/blend checks. | Boundary / direct run | Scopes after (before: 10,000) | Before frame ms | After frame ms | Change | |---|---:|---:|---:|---:| | UAV barrier / 2 | 5,000 | 46.95 | 30.18 | -35.7% | | UAV barrier / 3 | 3,334 | 45.74 | 23.49 | -48.6% | | Pipeline / 2 | 5,000 | 47.41 | 31.39 | -33.8% | | Pipeline / 3 | 3,334 | 46.16 | 25.60 | -44.6% | | Targets / 2 | 5,000 | 45.16 | 29.82 | -34.0% | | Targets / 3 | 3,334 | 46.90 | 25.56 | -45.5% | | Single indirect / 2 | 6,667 | 49.64 | 36.65 | -26.2% | | Single indirect / 3 | 5,000 | 47.05 | 30.60 | -35.0% | | Mixed / variable | 5,000 | 52.11 | 34.22 | -34.3% | These are serialized synthetic frame costs, including recording/submission/readback/waiting. They do not establish a retail FPS gain or fix the black screen. The unsuccessful retail FPS comparison is recorded below. A separate five alternating process pairs compare #1877 without this follow-up against this follow-up with diagnostics disabled. The 10,000-command mixed case changes from 32.5534 to 32.7262 ms frame (+0.53%), and 8.7039 to 8.7131 ms CPU emit (+0.11%). Across the nine 10,000-command cases, frame medians range from -3.44% to +7.12%, CPU emit from -5.98% to +6.00%; these runs do not establish zero overhead in every workload. ### Tested - Full portable Release runtime build and CTest: 100 passed, 0 failed, 2 skipped (retail shader corpus unset; sync-validation self-test requires explicit opt-in). - Explicit validation + scope statistics: `vk_rendering_scope`, `vk_sync_validation`, `replay_rendering_scope`, `replay_rendering_scope_stats` all pass. The sync-validation self-test detects its deliberately missing barrier; rendering-scope fixture reports zero validation errors. Baseline fixture also passes validation. - CPU fixture covers every histogram edge, boundary reasons, skipped/indirect/helper/statistics draws, exclusion of internal clear scopes, repeated/empty lists and per-draw device-fault checkpoints. Exact environment opt-in checked with unset/0/1/true/10. - All 20 benchmark processes pass pixel/depth/blend and scope checks, at both 1,000 and 10,000 commands. - Translator suite: 491 files, 6,312 tests, no failures. `compileall`, `make_game.py --help`, text line-ending tests, no-game-data check and `git diff --check` pass. GPUs tested: AMD Radeon RX 6700 XT (RADV NAVI22), Mesa/vulkan-radeon 26.2.5, CachyOS kernel 7.3.1-1-cachyos. Vulkan validation layer 1.4.363. Windows/MSVC was not run locally for the added diagnostics/mixed cases. Independent Windows reviews in this PR apply to the original `47e177df6` revision. AI-assisted: yes. After merging current `main` (`a224b5d14`) for final HEAD `5d58dde1c`, CMake confirms the portable build is up to date, and the seven focused rendering/query/indirect tests pass with validation and scope diagnostics enabled. Runtime replay sources and semantic tests are unchanged by that final main merge. ### Retail boot limit (2026-11-25) Two offline, network-isolated retail boot checks on CachyOS 7.3.1, RADV/Mesa 26.2.5 did not yield a verified first world frame. HEAD `47e177df6` ran for 12 minutes through setup/loading before its time limit. Baseline `77baf9062` ran for 6 minutes 43 seconds before an AMD GPU fault and successful GPU reset. The baseline used a copy of the completed first-run settings from the HEAD run, so these are not a matched frame-time/FPS pair. No retail FPS gain is established. The baseline fault shows that a GPU reset can occur without this optimization; it does not establish the cause of the earlier desktop freeze or show that this PR fixes it. The synthetic results above remain synthetic frame costs. ### Checklist - [x] Based on current `main` (`a224b5d14`) and merges cleanly. - [x] One topic: rendering-scope reuse, its diagnostics and validation. - [x] No game data, keys or decryption, including quoted logs/reports; shaders are hand-authored synthetic fixtures. - [x] No new translator rule; the runtime replay behavior is documented in `docs/d3d12_vulkan.md`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:09:36 +00:00
Author
Owner

@⁠madvillain91 on GitHub · 2026-11-25 14:50 UTC · original · reviewed

Reviewed diff and independently verified commit 47e177df6 on native Windows 11 + MSVC + NVIDIA Ampere GPU (filling in the MSVC / Windows GPU coverage noted as untested in the PR description, against main 71a769d7d):

Environment

  • OS: Windows 11 26H2 (build 26300.9711)
  • Compiler: VS 2022 Build Tools (MSVC 19.44.35230.0, Ninja, RelWithDebInfo)
  • Vulkan SDK: 1.4.363.0
  • GPU: NVIDIA GeForce RTX 3070 Ti (Ampere, 8192 MiB), driver 617.14, Vulkan 1.4.351

Checks run

  • git diff --check across both commits (5b6f721f5, 47e177df6): clean
  • Built replay_rendering_scope_test and vk_rendering_scope_test cleanly on MSVC 19.44 (confirming the far macro fix in 47e177df6 builds with 0 errors)
  • replay_rendering_scope_test: PASS (replay rendering scopes: PASS (synthetic CPU recording))
  • vk_rendering_scope_test (LEONIDA_VK_VALIDATION=1): PASS, 0 VUIDs (4096 draws in 1/1 and 2/2 scopes, pixel-depth-blend=PASS)
  • vk_rendering_scope_test --bench (no validation, all pixel/depth/blend checks PASS):
Draws Compatible run length Scopes emit_ms frame_ms gpu_ms
1,000 1 1,000/1,000 2.5744 4.6146 1.6786
1,000 4 250/250 1.0230 1.6058 0.4370
1,000 16 63/63 0.4872 0.7776 0.1178
1,000 64 16/16 0.4934 0.6860 0.0505
1,000 1,000 1/1 0.3402 0.4923 0.0241
10,000 1 10,000/10,000 25.9645 41.1634 14.5399
10,000 4 2,500/2,500 12.0409 16.2448 3.7579
10,000 16 625/625 7.0434 8.3995 1.0035
10,000 64 157/157 5.8968 6.6715 0.4236
10,000 10,000 1/1 5.3109 5.8224 0.2000

Diff notes

  • same_rendering_scope() conservatively checks pipeline/graphics identity, render area, layer count, and all color/depth attachment IDs, views, images, resolved layouts, and subresource ranges.
  • keep_rendering and the pre-dispatch end_rendering() cleanly close any open scope before queries, barriers, copies, clears, indirect/skipped/helper draws, statistics endpoints, and command-buffer end/predication teardown.

Not checked

  • Full ctest suite and retail-game frame profiling.

LGTM from this Windows 11 + MSVC + NVIDIA RTX 3070 Ti verification (AI-assisted verification; synthetic test fixtures only, no game data).

**@⁠madvillain91** on GitHub · 2026-11-25 14:50 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1877#pullrequestreview-6059872443) · **reviewed** Reviewed diff and independently verified commit `47e177df6` on native Windows 11 + MSVC + NVIDIA Ampere GPU (filling in the MSVC / Windows GPU coverage noted as untested in the PR description, against `main` `71a769d7d`): ### Environment - OS: Windows 11 26H2 (build 26300.9711) - Compiler: VS 2022 Build Tools (MSVC `19.44.35230.0`, Ninja, `RelWithDebInfo`) - Vulkan SDK: `1.4.363.0` - GPU: NVIDIA GeForce RTX 3070 Ti (Ampere, 8192 MiB), driver `617.14`, Vulkan `1.4.351` ### Checks run - `git diff --check` across both commits (`5b6f721f5`, `47e177df6`): clean - Built `replay_rendering_scope_test` and `vk_rendering_scope_test` cleanly on MSVC 19.44 (confirming the `far` macro fix in `47e177df6` builds with 0 errors) - `replay_rendering_scope_test`: **PASS** (`replay rendering scopes: PASS (synthetic CPU recording)`) - `vk_rendering_scope_test` (`LEONIDA_VK_VALIDATION=1`): **PASS, 0 VUIDs** (`4096` draws in `1/1` and `2/2` scopes, `pixel-depth-blend=PASS`) - `vk_rendering_scope_test --bench` (no validation, all pixel/depth/blend checks `PASS`): | Draws | Compatible run length | Scopes | `emit_ms` | `frame_ms` | `gpu_ms` | |---:|---:|---:|---:|---:|---:| | 1,000 | 1 | 1,000/1,000 | 2.5744 | 4.6146 | 1.6786 | | 1,000 | 4 | 250/250 | 1.0230 | 1.6058 | 0.4370 | | 1,000 | 16 | 63/63 | 0.4872 | 0.7776 | 0.1178 | | 1,000 | 64 | 16/16 | 0.4934 | 0.6860 | 0.0505 | | 1,000 | 1,000 | 1/1 | 0.3402 | 0.4923 | 0.0241 | | 10,000 | 1 | 10,000/10,000 | 25.9645 | 41.1634 | 14.5399 | | 10,000 | 4 | 2,500/2,500 | 12.0409 | 16.2448 | 3.7579 | | 10,000 | 16 | 625/625 | 7.0434 | 8.3995 | 1.0035 | | 10,000 | 64 | 157/157 | 5.8968 | 6.6715 | 0.4236 | | 10,000 | 10,000 | 1/1 | 5.3109 | 5.8224 | 0.2000 | ### Diff notes - `same_rendering_scope()` conservatively checks pipeline/graphics identity, render area, layer count, and all color/depth attachment IDs, views, images, resolved layouts, and subresource ranges. - `keep_rendering` and the pre-dispatch `end_rendering()` cleanly close any open scope before queries, barriers, copies, clears, indirect/skipped/helper draws, statistics endpoints, and command-buffer end/predication teardown. ### Not checked - Full `ctest` suite and retail-game frame profiling. LGTM from this Windows 11 + MSVC + NVIDIA RTX 3070 Ti verification (AI-assisted verification; synthetic test fixtures only, no game data).
Author
Owner

@⁠moffington on GitHub · 2026-11-25 15:20 UTC · original

Independently reviewed and reproduced at 47e177df6 on NVIDIA GeForce RTX 3060 (driver 615.78.08, Vulkan 1.4.363, Omarchy/Arch Linux).

Correctness

  • Full CTest: 95 passed, 0 failed, 1 expected skip (shader_library_corpus).
  • Rendering-scope CPU and GPU fixtures passed with zero Vulkan validation errors.
  • Both merge-base and PR HEAD passed pixel, depth and blending verification, with the expected rendering scope counts.
  • Audited scope termination around barriers, queries, statistics segments, indirect/skipped draws, helper dispatches, checkpoints and command-list boundaries. No actionable defects found.

Independent performance measurements

Exact merge-base 77baf9062 versus PR HEAD 47e177df6, identical workload and Release build configurations, GCC 16.2.1. Validation disabled for timing. Medians of five CPU-pinned alternating pairs, each with three warmups and seven measured samples.

10,000 draws:

Compatible run length CPU emit (ms) Frame (ms) GPU (ms) Frame reduction
1 16.68 → 16.93 31.35 → 31.25 14.48 → 14.27 0.3%
4 15.42 → 6.28 30.42 → 10.18 14.73 → 3.71 66.5%
16 14.92 → 3.46 29.74 → 4.51 14.52 → 0.88 84.9%
64 14.88 → 2.68 29.55 → 3.21 14.27 → 0.41 89.1%
10,000 14.94 → 2.52 29.99 → 2.87 14.77 → 0.25 90.4%

The singleton control showed a 1.4% increase in CPU emit time but essentially unchanged total frame time.

These results independently corroborate the author's AMD RADV measurements on NVIDIA hardware. Synthetic benchmark only; retail-game performance was not measured.

No actionable defects found. Advisory approval.

AI-assisted review.

**@⁠moffington** on GitHub · 2026-11-25 15:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1877#issuecomment-7166695491) Independently reviewed and reproduced at `47e177df6` on NVIDIA GeForce RTX 3060 (driver 615.78.08, Vulkan 1.4.363, Omarchy/Arch Linux). ### Correctness - Full CTest: 95 passed, 0 failed, 1 expected skip (`shader_library_corpus`). - Rendering-scope CPU and GPU fixtures passed with zero Vulkan validation errors. - Both merge-base and PR HEAD passed pixel, depth and blending verification, with the expected rendering scope counts. - Audited scope termination around barriers, queries, statistics segments, indirect/skipped draws, helper dispatches, checkpoints and command-list boundaries. No actionable defects found. ### Independent performance measurements Exact merge-base `77baf9062` versus PR HEAD `47e177df6`, identical workload and Release build configurations, GCC 16.2.1. Validation disabled for timing. Medians of five CPU-pinned alternating pairs, each with three warmups and seven measured samples. 10,000 draws: | Compatible run length | CPU emit (ms) | Frame (ms) | GPU (ms) | Frame reduction | |---:|---:|---:|---:|---:| | 1 | 16.68 → 16.93 | 31.35 → 31.25 | 14.48 → 14.27 | 0.3% | | 4 | 15.42 → 6.28 | 30.42 → 10.18 | 14.73 → 3.71 | 66.5% | | 16 | 14.92 → 3.46 | 29.74 → 4.51 | 14.52 → 0.88 | 84.9% | | 64 | 14.88 → 2.68 | 29.55 → 3.21 | 14.27 → 0.41 | 89.1% | | 10,000 | 14.94 → 2.52 | 29.99 → 2.87 | 14.77 → 0.25 | 90.4% | The singleton control showed a 1.4% increase in CPU emit time but essentially unchanged total frame time. These results independently corroborate the author's AMD RADV measurements on NVIDIA hardware. Synthetic benchmark only; retail-game performance was not measured. No actionable defects found. Advisory approval. AI-assisted review.
Author
Owner

@⁠Timon360SB on GitHub · 2026-11-25 15:25 UTC · original

Independent verification — Turing and Blackwell

  • Base: 77baf906275d7b695664adbf0b33f3c2b306a1dc
  • Head: 47e177df6a6f07ea036c60c36aace6ba489e47f9

Environment

GPU Windows 11 build
RTX 5070 (Blackwell) 26200
RTX 2060 SUPER (Turing) 28000

NVIDIA 621.14, Vulkan SDK 1.4.363.0,
MSVC 19.44.35230, Ninja RelWithDebInfo.

Three repetitions per GPU, revision and validation mode.

Results

Test Base Head
d3d12_draw 12/12 12/12
d3d12_depth24_draw 12/12 12/12
d3d12_bundle 12/12 12/12
d3d12_graphics_direct_heaps 12/12 12/12
replay_rendering_scope N/A 12/12
vk_rendering_scope N/A 12/12
Total 48/48 72/72

120 executions: 120 passed, 0 failed, 0 CTest skips.

Findings

The new GPU fixture consistently reported:

Draws Run length Scope begins/ends Result
4096 4096 1/1 PASS
4096 2048 2/2 PASS

All 24 workload executions passed pixel, depth and
blending checks across both GPUs and validation modes.

The synthetic CPU recording test also passed every run.

No VUID diagnostics were found in the captured logs.
Validation-layer feature-adjustment warnings were present.
Six internal native D24 depthBiasClamp cases were skipped
per depth24_draw execution on both revisions.

No regressions observed. Rendering-scope reuse is
independently verified on Turing and Blackwell under
native Windows/MSVC.

The dedicated --bench mode and comparative BASE/HEAD
performance measurements were not included.

Synthetic tests only. No game files used.
AI-assisted: yes.

**@⁠Timon360SB** on GitHub · 2026-11-25 15:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1877#issuecomment-7166824067) ## Independent verification — Turing and Blackwell - **Base:** `77baf906275d7b695664adbf0b33f3c2b306a1dc` - **Head:** `47e177df6a6f07ea036c60c36aace6ba489e47f9` ### Environment | GPU | Windows 11 build | |---|---| | RTX 5070 (Blackwell) | 26200 | | RTX 2060 SUPER (Turing) | 28000 | NVIDIA 621.14, Vulkan SDK 1.4.363.0, MSVC 19.44.35230, Ninja RelWithDebInfo. Three repetitions per GPU, revision and validation mode. ### Results | Test | Base | Head | |---|---:|---:| | `d3d12_draw` | 12/12 | 12/12 | | `d3d12_depth24_draw` | 12/12 | 12/12 | | `d3d12_bundle` | 12/12 | 12/12 | | `d3d12_graphics_direct_heaps` | 12/12 | 12/12 | | `replay_rendering_scope` | N/A | 12/12 | | `vk_rendering_scope` | N/A | 12/12 | | **Total** | **48/48** | **72/72** | 120 executions: 120 passed, 0 failed, 0 CTest skips. ### Findings The new GPU fixture consistently reported: | Draws | Run length | Scope begins/ends | Result | |---:|---:|---:|---| | 4096 | 4096 | 1/1 | PASS | | 4096 | 2048 | 2/2 | PASS | All 24 workload executions passed pixel, depth and blending checks across both GPUs and validation modes. The synthetic CPU recording test also passed every run. No VUID diagnostics were found in the captured logs. Validation-layer feature-adjustment warnings were present. Six internal native D24 depthBiasClamp cases were skipped per depth24_draw execution on both revisions. No regressions observed. Rendering-scope reuse is independently verified on Turing and Blackwell under native Windows/MSVC. The dedicated --bench mode and comparative BASE/HEAD performance measurements were not included. Synthetic tests only. No game files used. AI-assisted: yes.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1877/head:github-bot/gh-1877'
git switch 'github-bot/gh-1877'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1877'
git switch 'github-bot/gh-1877'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1877'
git switch 'github-bot/gh-1877'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1877'
git switch 'main'
git merge --squash 'github-bot/gh-1877'
git switch 'main'
git merge --ff-only 'github-bot/gh-1877'
git switch 'main'
git merge 'github-bot/gh-1877'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.