perf(vk): use VK_EXT_descriptor_buffer for game shader descriptors #2948

Open
siantm wants to merge 2 commits from siantm/Longshot:perf/vk-descriptor-buffer into main
Contributor

Summary

On main, game draws rebuild VkWriteDescriptorSet / VkDescriptorBufferInfo / VkDescriptorImageInfo arrays in host memory and push them via vkCmdPushDescriptorSetKHR (or allocate per-draw descriptor sets when exceeding push limits) on nearly every draw. That descriptor translation and driver command-serialization overhead runs on every draw in CPU-bound scenes like Castle Town Market.

This PR adds a VK_EXT_descriptor_buffer path (RX_VK_DESC_BUFFER, default on when VK_EXT_descriptor_buffer, bufferDeviceAddress, and descriptorBufferImageLayoutIgnored are available):

  • Per-recording mapped descriptor buffer ring (RecordingRes::DescBuf): 256 KB chunks keep BAR0 usage modest (~12 MB across 48 slots; 221 KB peak in Market with 0 made on demand) while skipping per-recording vkResetDescriptorPool and descriptor set allocations on the descriptor-buffer path.
  • L1-resident shadow descriptor set (DescWriter::db_shadow): raw hardware descriptors are assembled in cached host memory and copied sequentially into the mapped descriptor buffer via write-combined memcpy (zero WC reads), with UBO-only delta updates (update_ubo_descriptors).
  • Direct VkDeviceAddress propagation: carried through gpu_buffer_bind, mirror pools, recording streams (RecordingRes::Stream), zero_buffer, miss_buf, SimTurfPrivate, and texel_buffer_info (avoiding VkBufferView creation for texel/image buffers).
  • Per-thread L2-sized hardware descriptor caches: 4-way 16-byte UbRawCache (2048×4 = 128 KB), 2-way SbRawCache (1024×2 = 64 KB), 2-way CisRawCache (1024×2 = 64 KB, invalidated on texture/sampler generation changes), and 2-way DbLayoutCache (512×2 = 16 KB) in gpu/vk/vk_draw.cpp.
  • Zero-allocation recorder packet (gpu/vk/vk_recorder.h): by-value pk_vkCmdSetDescriptorBufferOffsetsEXT fast path for single-set binds (setCount == 1) plus pk_vkCmdBindDescriptorBuffersEXT.
  • Game pipelines only: internal helper pipelines (clear, upscaler, temporal, ASTC) stay untouched on the existing path.

Result: +3.27% Avg FPS (67.01 -> 69.20), +3.69% P50 FPS, +3.89% 1% Low (1000/p99), and +4.83% 0.1% Low (1000/p999) in Castle Town Market, plus +3.44% 1% Low (tail mean) and +12.05% 0.1% Low (1000/p999) in game-thread-limited Kokiri Forest.

Read first: gpu/vk/vk_draw.cpp (RecordingRes::DescBuf, DbLayout, UbRawCache/SbRawCache/CisRawCache, build_descriptors, update_ubo_descriptors, bind_descriptors_db), gpu/vk/vk_main.cpp, gpu/vk/vk_recorder.h.

Testing

Tested: Windows 11, NVIDIA GeForce RTX 4060 (driver 621.40, Vulkan 1.4), 1280x720, comparing main @ 4908cc6da (rt-main-4908) against this PR (rt-desc-buf):

  • In-game A/B (Castle Town Market & Kokiri Forest): Uncontended 3-pair × 30 s interleaved timing runs via the job queue (Parity diffs (excluding version): NONE), improving Market Avg/P50/1%/0.1% FPS and Kokiri Forest 1%/0.1% lows.
  • Fine profiler (RX_VK_PROF_FINE=1, Castle Town Market): Confirmed vk: descriptor buffers on (align 0x40, ub 8 sb 16 cis 4 si 4 utb 16 stb 16), bind descriptors 0.23 ms (of it the push call 0.09 ms), desc bufs peak 221 KB (0 made on demand), db sb miss 0.00/draw, and db cis hit ~96.6%.
  • Memory check (RX_VK_MEM_CHECK=1, Kokiri Forest): 33000 submits: take_open 0, collect_open 0, seq_mismatch 0 (0 of 36729 takes not paired); sync_over_gpu: 0 replaced, 2587 same (0 unbound); CPU reads or writes of one left out: 0 so far; 0.0 draws left out; compiled 0.
  • Game-free checks (tests/run_all.py) & mise run lint: 30 targeted checks (test_recorder_sync.py, test_desc_counts.py, test_recording_admission.py, test_draw_stream_visibility.py, test_descriptor_array_census.py, test_draw_binds.py, test_draw_side_effects.py, test_same_bind.py, test_same_draw.py, test_texel_buffer_ownership.py, test_ub_gap.py, test_ub_memo.py, test_ub_threads.py, test_ub_update_batch.py, test_vk_braces.py, test_doc_anchors.py, test_tls_objects.py, test_thinlto_tls.py, test_bind_memo.py, test_direct_buffer_writes.py, test_gpl_cold_library.py, test_gpl_library_cache.py, test_program_stamp_knobs.py, test_dummy_views.py, test_flush_nothing_held.py, test_vram_held_idle.py, test_sim_turf_pools.py, test_device_policy.py, test_vendor_fixes.py, test_desc_clock.py) plus test_recorder_parts.py and test_recorder_own_idle.py passed (0 failed). mise run lint passes on the branch diff (origin/main..HEAD). Pre-existing failures already on main @ 4908cc6da (unrelated to this PR): tests/test_switch_table.py (LONGSHOT_LAUNCHER_STARTUP in host/launcher_startup.h:9), tests/test_log_levels.py (log_tee_write), and tests/test_tex_desc_memo.py (shift_single_word missing from test fixture).

Still to test:

  • @Beanstalk amd: run in-game (Market_Child, Kokiri_Forest) with RX_VK_DESC_BUFFER at its default (1) and RX_VK_DESC_BUFFER=0 on AMD RDNA (Windows and Linux/RADV, including compute mesh fallback), expecting clean visuals and a frame-time win or parity (@Beanstalk amd).
  • @Beanstalk linux: build on Linux and run full mise run test and in-game smoke check, expecting all checks and rendering to pass (@Beanstalk linux).

Measurements

Verdict: Faster in draw-heavy Castle Town Market (+3.27% Avg FPS, +3.69% P50 FPS, +3.89% 1% Low (1000/p99), +3.98% 1% Low (tail mean), +4.83% 0.1% Low (1000/p999), -0.47 ms mean frame time) and cleaner frame pacing in game-thread-limited Kokiri Forest (+3.44% 1% Low tail mean, +12.05% 0.1% Low (1000/p999), Avg FPS within spread at -0.67%). RX_VK_DESC_BUFFER ships on by default (1) when hardware supports VK_EXT_descriptor_buffer, bufferDeviceAddress, and descriptorBufferImageLayoutIgnored.

Setup: Windows 11, NVIDIA GeForce RTX 4060 (driver 621.40, Vulkan 1.4); Market_Child (market-entrance) and Kokiri_Forest (kokiri-forest), 1280x720, uncapped (HOS_FPS_MAX=1000), uncontended 3 interleaved pairs × 30 s each via the job queue (--mode timing), medians reported. Also honors existing RX_VK_PUSH_ALL (default 0, as on main) inside bind_descriptors_db.

Castle Town Market (market-entrance):

Metric Before: main @ 4908cc6da After: this PR @ 24f551717 Δ
Avg FPS 67.01 [67.22 / 67.01 / 66.62] 69.20 [70.47 / 68.87 / 69.20] +3.27%
P50 FPS 68.35 [68.47 / 68.35 / 68.12] 70.87 [71.79 / 70.27 / 70.87] +3.69%
1% Low (1000/p99) 52.95 [52.95 / 53.00 / 46.16] 55.01 [55.15 / 55.01 / 54.40] +3.89%
1% Low (tail mean) 46.68 [46.68 / 47.75 / 40.60] 48.53 [52.57 / 48.53 / 46.83] +3.98%
0.1% Low (1000/p999) 39.06 [38.68 / 40.41 / 39.06] 40.95 [48.67 / 40.95 / 38.59] +4.83%
0.1% Low (tail mean) 36.79 [36.26 / 38.06 / 36.79] 36.56 [47.62 / 36.56 / 36.11] -0.62%
Mean frame ms 14.92 [14.88 / 14.92 / 15.01] 14.45 [14.19 / 14.52 / 14.45] -3.17%
main_cpu_ms 4.50 [4.25 / 4.50 / 4.61] 4.32 [4.32 / 4.20 / 4.51] -3.93%
memsync_ms 0.53 [0.53 / 0.52 / 0.54] 0.50 [0.50 / 0.50 / 0.50] -5.12%
desc_ms 3.07 [3.07 / 3.11 / 3.04] 3.60 [3.60 / 3.60 / 3.58] +17.07%

Kokiri Forest (kokiri-forest):

Metric Before: main @ 4908cc6da After: this PR @ 24f551717 Δ
Avg FPS 104.78 [105.59 / 104.78 / 102.82] 104.08 [105.04 / 104.08 / 99.83] -0.67%
P50 FPS 107.18 [107.76 / 107.18 / 105.60] 106.72 [107.30 / 106.72 / 99.26] -0.43%
1% Low (1000/p99) 78.99 [83.17 / 78.99 / 71.28] 79.15 [79.15 / 77.64 / 88.10] +0.20%
1% Low (tail mean) 70.98 [75.32 / 70.98 / 61.63] 73.42 [73.42 / 70.56 / 85.40] +3.44%
0.1% Low (1000/p999) 62.43 [70.26 / 62.43 / 56.37] 69.95 [69.95 / 65.59 / 82.81] +12.05%
0.1% Low (tail mean) 57.88 [57.88 / 60.28 / 47.93] 64.66 [64.66 / 58.48 / 76.57] +11.72%
Mean frame ms 9.54 [9.47 / 9.54 / 9.73] 9.61 [9.52 / 9.61 / 10.02] +0.67%
desc_ms 1.38 [1.38 / 1.37 / 1.38] 1.59 [1.59 / 1.59 / 1.56] +14.95%
# Castle Town Market (3-pair x 30 s interleaved A/B)
Avg FPS               : A=  67.01 [67.22/67.01/66.62] | B=  69.20 [70.47/68.87/69.20] | delta=+3.27%
P50 FPS               : A=  68.35 [68.47/68.35/68.12] | B=  70.87 [71.79/70.27/70.87] | delta=+3.69%
1% Low (1000/p99)     : A=  52.95 [52.95/53.00/46.16] | B=  55.01 [55.15/55.01/54.40] | delta=+3.89%
1% Low (tail mean)    : A=  46.68 [46.68/47.75/40.60] | B=  48.53 [52.57/48.53/46.83] | delta=+3.98%
0.1% Low (1000/p999)  : A=  39.06 [38.68/40.41/39.06] | B=  40.95 [48.67/40.95/38.59] | delta=+4.83%
Parity diffs (excluding version): NONE

# Market RX_VK_PROF_FINE=1 (rt-desc-buf)
[hos host] vk: the recording streams: 48 of 1 MB, the most one held 185 KB (desc bufs peak 221 KB); 0 made on demand (0 MB kept now); c1 stages: at most 84 a recording; 0 descriptor pools made when a recording's own ran out (0 slots' pools made whole); a recording's pool took at most 0 sets (ub 0, sb 0, cis 0, si 0, utb 0, stb 0)
[hos host] vk: a frame (fine): ms: banks 0.23, c1 0.03, user uniform buffers 0.94, storage buffers 0.67, textures 1.22, hazards+pass 0.19, bind pipeline 0.04, bind descriptors 0.23, of it the push call 0.09, push constants 0.09, dynamic state 0.23, vertex+index binds 0.87, draw call 0.09, db ubo write 0.37, db layout 0.22
[hos host] vk: a frame (fine): a draw: sets allocated (over the push limit) 0.00, descriptors in them 0.00, storage buffer descriptors built 1.41, db ub hit 3.60, db ub miss 0.28, db sb hit 1.41, db sb miss 0.00, db cis hit 3.40, db cis miss 0.12, db layout miss 0.19

# Kokiri Forest (3-pair x 30 s interleaved A/B)
Avg FPS               : A= 104.78 [105.59/104.78/102.82] | B= 104.08 [105.04/104.08/99.83] | delta=-0.67%
1% Low (tail mean)    : A=  70.98 [75.32/70.98/61.63] | B=  73.42 [73.42/70.56/85.40] | delta=+3.44%
0.1% Low (1000/p999)  : A=  62.43 [70.26/62.43/56.37] | B=  69.95 [69.95/65.59/82.81] | delta=+12.05%
Parity diffs (excluding version): NONE

Risks

  • Allocates ~12 MB of mapped host-visible/BAR0 descriptor ring memory across 48 slots (48 × 256 KB; 221 KB peak in Market) plus ~272 KB of thread_local raw descriptor caches per recording thread (UbRawCache, SbRawCache, CisRawCache, DbLayoutCache).
  • Shifts ~0.53 ms of CPU work into desc_ms (assembling raw descriptors in db_shadow) in exchange for eliminating per-draw vkCmdPushDescriptorSetKHR driver command-serialization overhead, yielding a net +3.27% Avg FPS win in draw-heavy Market and +0.20% to +12.05% better lows in Kokiri Forest.
  • Requires VK_EXT_descriptor_buffer, bufferDeviceAddress, and descriptorBufferImageLayoutIgnored; drivers/GPUs without them fall back automatically to the push-descriptor path.
  • Kill switch: RX_VK_DESC_BUFFER=0 restores the previous push-descriptor path immediately without changing saves, shader caches, or longshot_options.ini.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def.
  • A check under tests/ that reads changed source is updated, not weakened.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
## Summary On `main`, game draws rebuild `VkWriteDescriptorSet` / `VkDescriptorBufferInfo` / `VkDescriptorImageInfo` arrays in host memory and push them via `vkCmdPushDescriptorSetKHR` (or allocate per-draw descriptor sets when exceeding push limits) on nearly every draw. That descriptor translation and driver command-serialization overhead runs on every draw in CPU-bound scenes like Castle Town Market. This PR adds a `VK_EXT_descriptor_buffer` path (`RX_VK_DESC_BUFFER`, default on when `VK_EXT_descriptor_buffer`, `bufferDeviceAddress`, and `descriptorBufferImageLayoutIgnored` are available): - **Per-recording mapped descriptor buffer ring (`RecordingRes::DescBuf`)**: 256 KB chunks keep BAR0 usage modest (~12 MB across 48 slots; `221 KB` peak in Market with `0` made on demand) while skipping per-recording `vkResetDescriptorPool` and descriptor set allocations on the descriptor-buffer path. - **L1-resident shadow descriptor set (`DescWriter::db_shadow`)**: raw hardware descriptors are assembled in cached host memory and copied sequentially into the mapped descriptor buffer via write-combined `memcpy` (zero WC reads), with UBO-only delta updates (`update_ubo_descriptors`). - **Direct `VkDeviceAddress` propagation**: carried through `gpu_buffer_bind`, mirror pools, recording streams (`RecordingRes::Stream`), `zero_buffer`, `miss_buf`, `SimTurfPrivate`, and `texel_buffer_info` (avoiding `VkBufferView` creation for texel/image buffers). - **Per-thread L2-sized hardware descriptor caches**: 4-way 16-byte `UbRawCache` (2048×4 = 128 KB), 2-way `SbRawCache` (1024×2 = 64 KB), 2-way `CisRawCache` (1024×2 = 64 KB, invalidated on texture/sampler generation changes), and 2-way `DbLayoutCache` (512×2 = 16 KB) in `gpu/vk/vk_draw.cpp`. - **Zero-allocation recorder packet (`gpu/vk/vk_recorder.h`)**: by-value `pk_vkCmdSetDescriptorBufferOffsetsEXT` fast path for single-set binds (`setCount == 1`) plus `pk_vkCmdBindDescriptorBuffersEXT`. - **Game pipelines only**: internal helper pipelines (clear, upscaler, temporal, ASTC) stay untouched on the existing path. **Result:** +3.27% Avg FPS (`67.01 -> 69.20`), +3.69% P50 FPS, +3.89% 1% Low (`1000/p99`), and +4.83% 0.1% Low (`1000/p999`) in Castle Town Market, plus +3.44% 1% Low (tail mean) and +12.05% 0.1% Low (`1000/p999`) in game-thread-limited Kokiri Forest. Read first: `gpu/vk/vk_draw.cpp` (`RecordingRes::DescBuf`, `DbLayout`, `UbRawCache`/`SbRawCache`/`CisRawCache`, `build_descriptors`, `update_ubo_descriptors`, `bind_descriptors_db`), `gpu/vk/vk_main.cpp`, `gpu/vk/vk_recorder.h`. ## Testing **Tested:** Windows 11, NVIDIA GeForce RTX 4060 (driver `621.40`, Vulkan 1.4), `1280x720`, comparing `main @ 4908cc6da` (`rt-main-4908`) against this PR (`rt-desc-buf`): - **In-game A/B (Castle Town Market & Kokiri Forest):** Uncontended 3-pair × 30 s interleaved timing runs via the job queue (`Parity diffs (excluding version): NONE`), improving Market Avg/P50/1%/0.1% FPS and Kokiri Forest 1%/0.1% lows. - **Fine profiler (`RX_VK_PROF_FINE=1`, Castle Town Market):** Confirmed `vk: descriptor buffers on (align 0x40, ub 8 sb 16 cis 4 si 4 utb 16 stb 16)`, `bind descriptors 0.23 ms (of it the push call 0.09 ms)`, `desc bufs peak 221 KB (0 made on demand)`, `db sb miss 0.00/draw`, and `db cis hit ~96.6%`. - **Memory check (`RX_VK_MEM_CHECK=1`, Kokiri Forest):** `33000 submits: take_open 0, collect_open 0, seq_mismatch 0 (0 of 36729 takes not paired); sync_over_gpu: 0 replaced, 2587 same (0 unbound); CPU reads or writes of one left out: 0 so far; 0.0 draws left out; compiled 0`. - **Game-free checks (`tests/run_all.py`) & `mise run lint`:** 30 targeted checks (`test_recorder_sync.py`, `test_desc_counts.py`, `test_recording_admission.py`, `test_draw_stream_visibility.py`, `test_descriptor_array_census.py`, `test_draw_binds.py`, `test_draw_side_effects.py`, `test_same_bind.py`, `test_same_draw.py`, `test_texel_buffer_ownership.py`, `test_ub_gap.py`, `test_ub_memo.py`, `test_ub_threads.py`, `test_ub_update_batch.py`, `test_vk_braces.py`, `test_doc_anchors.py`, `test_tls_objects.py`, `test_thinlto_tls.py`, `test_bind_memo.py`, `test_direct_buffer_writes.py`, `test_gpl_cold_library.py`, `test_gpl_library_cache.py`, `test_program_stamp_knobs.py`, `test_dummy_views.py`, `test_flush_nothing_held.py`, `test_vram_held_idle.py`, `test_sim_turf_pools.py`, `test_device_policy.py`, `test_vendor_fixes.py`, `test_desc_clock.py`) plus `test_recorder_parts.py` and `test_recorder_own_idle.py` passed (`0 failed`). `mise run lint` passes on the branch diff (`origin/main..HEAD`). Pre-existing failures already on `main @ 4908cc6da` (unrelated to this PR): `tests/test_switch_table.py` (`LONGSHOT_LAUNCHER_STARTUP` in `host/launcher_startup.h:9`), `tests/test_log_levels.py` (`log_tee_write`), and `tests/test_tex_desc_memo.py` (`shift_single_word` missing from test fixture). **Still to test:** - `@Beanstalk amd`: run in-game (`Market_Child`, `Kokiri_Forest`) with `RX_VK_DESC_BUFFER` at its default (`1`) and `RX_VK_DESC_BUFFER=0` on AMD RDNA (Windows and Linux/RADV, including compute mesh fallback), expecting clean visuals and a frame-time win or parity (`@Beanstalk amd`). - `@Beanstalk linux`: build on Linux and run full `mise run test` and in-game smoke check, expecting all checks and rendering to pass (`@Beanstalk linux`). ## Measurements **Verdict:** Faster in draw-heavy Castle Town Market (**+3.27% Avg FPS**, **+3.69% P50 FPS**, **+3.89% 1% Low (`1000/p99`)**, **+3.98% 1% Low (tail mean)**, **+4.83% 0.1% Low (`1000/p999`)**, **-0.47 ms mean frame time**) and cleaner frame pacing in game-thread-limited Kokiri Forest (**+3.44% 1% Low tail mean**, **+12.05% 0.1% Low (`1000/p999`)**, Avg FPS within spread at `-0.67%`). `RX_VK_DESC_BUFFER` ships on by default (`1`) when hardware supports `VK_EXT_descriptor_buffer`, `bufferDeviceAddress`, and `descriptorBufferImageLayoutIgnored`. Setup: Windows 11, NVIDIA GeForce RTX 4060 (driver `621.40`, Vulkan 1.4); `Market_Child` (`market-entrance`) and `Kokiri_Forest` (`kokiri-forest`), `1280x720`, uncapped (`HOS_FPS_MAX=1000`), uncontended 3 interleaved pairs × 30 s each via the job queue (`--mode timing`), medians reported. Also honors existing `RX_VK_PUSH_ALL` (default `0`, as on `main`) inside `bind_descriptors_db`. **Castle Town Market (`market-entrance`):** | Metric | Before: main @ 4908cc6da | After: this PR @ 24f551717 | Δ | |---|---:|---:|---:| | Avg FPS | 67.01 [67.22 / 67.01 / 66.62] | 69.20 [70.47 / 68.87 / 69.20] | **+3.27%** | | P50 FPS | 68.35 [68.47 / 68.35 / 68.12] | 70.87 [71.79 / 70.27 / 70.87] | **+3.69%** | | 1% Low (`1000/p99`) | 52.95 [52.95 / 53.00 / 46.16] | 55.01 [55.15 / 55.01 / 54.40] | **+3.89%** | | 1% Low (tail mean) | 46.68 [46.68 / 47.75 / 40.60] | 48.53 [52.57 / 48.53 / 46.83] | **+3.98%** | | 0.1% Low (`1000/p999`) | 39.06 [38.68 / 40.41 / 39.06] | 40.95 [48.67 / 40.95 / 38.59] | **+4.83%** | | 0.1% Low (tail mean) | 36.79 [36.26 / 38.06 / 36.79] | 36.56 [47.62 / 36.56 / 36.11] | -0.62% | | Mean frame ms | 14.92 [14.88 / 14.92 / 15.01] | 14.45 [14.19 / 14.52 / 14.45] | **-3.17%** | | `main_cpu_ms` | 4.50 [4.25 / 4.50 / 4.61] | 4.32 [4.32 / 4.20 / 4.51] | **-3.93%** | | `memsync_ms` | 0.53 [0.53 / 0.52 / 0.54] | 0.50 [0.50 / 0.50 / 0.50] | **-5.12%** | | `desc_ms` | 3.07 [3.07 / 3.11 / 3.04] | 3.60 [3.60 / 3.60 / 3.58] | +17.07% | **Kokiri Forest (`kokiri-forest`):** | Metric | Before: main @ 4908cc6da | After: this PR @ 24f551717 | Δ | |---|---:|---:|---:| | Avg FPS | 104.78 [105.59 / 104.78 / 102.82] | 104.08 [105.04 / 104.08 / 99.83] | -0.67% | | P50 FPS | 107.18 [107.76 / 107.18 / 105.60] | 106.72 [107.30 / 106.72 / 99.26] | -0.43% | | 1% Low (`1000/p99`) | 78.99 [83.17 / 78.99 / 71.28] | 79.15 [79.15 / 77.64 / 88.10] | +0.20% | | 1% Low (tail mean) | 70.98 [75.32 / 70.98 / 61.63] | 73.42 [73.42 / 70.56 / 85.40] | **+3.44%** | | 0.1% Low (`1000/p999`) | 62.43 [70.26 / 62.43 / 56.37] | 69.95 [69.95 / 65.59 / 82.81] | **+12.05%** | | 0.1% Low (tail mean) | 57.88 [57.88 / 60.28 / 47.93] | 64.66 [64.66 / 58.48 / 76.57] | **+11.72%** | | Mean frame ms | 9.54 [9.47 / 9.54 / 9.73] | 9.61 [9.52 / 9.61 / 10.02] | +0.67% | | `desc_ms` | 1.38 [1.38 / 1.37 / 1.38] | 1.59 [1.59 / 1.59 / 1.56] | +14.95% | ```text # Castle Town Market (3-pair x 30 s interleaved A/B) Avg FPS : A= 67.01 [67.22/67.01/66.62] | B= 69.20 [70.47/68.87/69.20] | delta=+3.27% P50 FPS : A= 68.35 [68.47/68.35/68.12] | B= 70.87 [71.79/70.27/70.87] | delta=+3.69% 1% Low (1000/p99) : A= 52.95 [52.95/53.00/46.16] | B= 55.01 [55.15/55.01/54.40] | delta=+3.89% 1% Low (tail mean) : A= 46.68 [46.68/47.75/40.60] | B= 48.53 [52.57/48.53/46.83] | delta=+3.98% 0.1% Low (1000/p999) : A= 39.06 [38.68/40.41/39.06] | B= 40.95 [48.67/40.95/38.59] | delta=+4.83% Parity diffs (excluding version): NONE # Market RX_VK_PROF_FINE=1 (rt-desc-buf) [hos host] vk: the recording streams: 48 of 1 MB, the most one held 185 KB (desc bufs peak 221 KB); 0 made on demand (0 MB kept now); c1 stages: at most 84 a recording; 0 descriptor pools made when a recording's own ran out (0 slots' pools made whole); a recording's pool took at most 0 sets (ub 0, sb 0, cis 0, si 0, utb 0, stb 0) [hos host] vk: a frame (fine): ms: banks 0.23, c1 0.03, user uniform buffers 0.94, storage buffers 0.67, textures 1.22, hazards+pass 0.19, bind pipeline 0.04, bind descriptors 0.23, of it the push call 0.09, push constants 0.09, dynamic state 0.23, vertex+index binds 0.87, draw call 0.09, db ubo write 0.37, db layout 0.22 [hos host] vk: a frame (fine): a draw: sets allocated (over the push limit) 0.00, descriptors in them 0.00, storage buffer descriptors built 1.41, db ub hit 3.60, db ub miss 0.28, db sb hit 1.41, db sb miss 0.00, db cis hit 3.40, db cis miss 0.12, db layout miss 0.19 # Kokiri Forest (3-pair x 30 s interleaved A/B) Avg FPS : A= 104.78 [105.59/104.78/102.82] | B= 104.08 [105.04/104.08/99.83] | delta=-0.67% 1% Low (tail mean) : A= 70.98 [75.32/70.98/61.63] | B= 73.42 [73.42/70.56/85.40] | delta=+3.44% 0.1% Low (1000/p999) : A= 62.43 [70.26/62.43/56.37] | B= 69.95 [69.95/65.59/82.81] | delta=+12.05% Parity diffs (excluding version): NONE ``` ## Risks - Allocates ~12 MB of mapped host-visible/BAR0 descriptor ring memory across 48 slots (`48 × 256 KB`; `221 KB` peak in Market) plus ~272 KB of `thread_local` raw descriptor caches per recording thread (`UbRawCache`, `SbRawCache`, `CisRawCache`, `DbLayoutCache`). - Shifts ~0.53 ms of CPU work into `desc_ms` (assembling raw descriptors in `db_shadow`) in exchange for eliminating per-draw `vkCmdPushDescriptorSetKHR` driver command-serialization overhead, yielding a net +3.27% Avg FPS win in draw-heavy Market and +0.20% to +12.05% better lows in Kokiri Forest. - Requires `VK_EXT_descriptor_buffer`, `bufferDeviceAddress`, and `descriptorBufferImageLayoutIgnored`; drivers/GPUs without them fall back automatically to the push-descriptor path. - Kill switch: `RX_VK_DESC_BUFFER=0` restores the previous push-descriptor path immediately without changing saves, shader caches, or `longshot_options.ini`. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
perf(vk): use VK_EXT_descriptor_buffer for game shader descriptors
Some checks failed
PR description / Title and description (pull_request_target) Successful in 4s
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/nvidia 2/1 fail
beanstalk/windows+nvidia 1/1 fail
beanstalk/windows+amd 2/1 fail
beanstalk/linux+radv 1/1 fail
beanstalk/intel 0/1 pass, 0 running, 1 queued
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
24f551717f
Replace per-draw VkWriteDescriptorSet / vkCmdPushDescriptorSetKHR /
descriptor-pool set translation on game pipelines with
VK_EXT_descriptor_buffer (guarded by RX_VK_DESC_BUFFER=1 when
bufferDeviceAddress and descriptorBufferImageLayoutIgnored hold):

- Per-recording 256 KB mapped descriptor buffer ring (RecordingRes::DescBuf)
  skipping per-recording descriptor pools and vkResetDescriptorPool.
- L1-resident host shadow descriptor set (DescWriter::db_shadow) with
  sequential write-combined memcpy and UBO-only delta updates.
- Direct VkDeviceAddress propagation across gpu_buffer_bind, mirror pools,
  streams, zero_buffer, miss_buf, SimTurfPrivate, and texel_buffer_info.
- Per-thread L2-sized hardware descriptor caches (UbRawCache, SbRawCache,
  CisRawCache, DbLayoutCache).
- Zero-alloc by-value vkCmdSetDescriptorBufferOffsetsEXT and
  vkCmdBindDescriptorBuffersEXT packets in gpu/vk/vk_recorder.h.

Measured on Windows 11 (RTX 4060, driver 621.40, 1280x720, 3x30s A/B):
- Castle Town Market: +3.27% Avg FPS (67.01 -> 69.20), +3.69% P50 FPS,
  +3.89% 1% Low (1000/p99), +4.83% 0.1% Low (1000/p999).
- Kokiri Forest: +3.44% 1% Low (tail mean), +12.05% 0.1% Low (1000/p999),
  Avg FPS within spread (-0.67%).

Assisted-by: Antigravity
Author
Contributor

Tested in game: Windows 11, RTX 4060 (driver 621.40, Vulkan 1.4): uncontended 3-pair x 30s A/B in Castle Town Market (+3.27% Avg FPS, +3.89% 1% Low, +4.83% 0.1% Low) and Kokiri Forest (+12.05% 0.1% Low), Parity diffs: NONE; Kokiri Forest RX_VK_MEM_CHECK=1 (33000 submits, 0 errors, 0 draws left out).

Tested in game: Windows 11, RTX 4060 (driver 621.40, Vulkan 1.4): uncontended 3-pair x 30s A/B in Castle Town Market (+3.27% Avg FPS, +3.89% 1% Low, +4.83% 0.1% Low) and Kokiri Forest (+12.05% 0.1% Low), Parity diffs: NONE; Kokiri Forest RX_VK_MEM_CHECK=1 (33000 submits, 0 errors, 0 draws left out).
Member

Possibly related, for context:

  • PR #2920 perf(vk): add per-thread texture/sampler and read-only SSBO descriptor memos — Descriptor construction caches overlap in vk_draw.cpp
  • PR #2899 perf(vk): add UBO descriptor delta fast path, 8-slot ub_gap_cache, and lock-free invalidate exits — Merged UBO descriptor delta logic shares update path
  • PR #2210 perf(vk): a draw of the program before it keeps its texture and storage descriptors while their bindings stand (RX_VK_DESC_SECTIONS, off) — Open descriptor retention optimization touches same draw code
Possibly related, for context: - PR #2920 perf(vk): add per-thread texture/sampler and read-only SSBO descriptor memos — Descriptor construction caches overlap in vk_draw.cpp - PR #2899 perf(vk): add UBO descriptor delta fast path, 8-slot ub_gap_cache, and lock-free invalidate exits — Merged UBO descriptor delta logic shares update path - PR #2210 perf(vk): a draw of the program before it keeps its texture and storage descriptors while their bindings stand (RX_VK_DESC_SECTIONS, off) — Open descriptor retention optimization touches same draw code
Owner

@review
@beanstalk

@review @beanstalk
Member
Beanstalk test farm · an earlier run: commit 24f5517 (the newer results are in a comment below)

Commit 24f5517 · approved by HumanBean (reviewed) · dashboard

⚠️ Note: On hardware without the required descriptor-buffer features, unset and disabled both use the fallback, so their comparison cannot measure the new path; the disabled cell still checks changes shared with the fallback.
⚠️ Note: The farm does not run the requested Linux test suite or directly measure the claimed 0.1% lows; two starts per side and switch value keep the game runs within the time limit.
⚠️ Note: The scenarios exercise normal gameplay but cannot guarantee that the AMD compute-mesh fallback is reached.

Started at 2026-12-01 15:24 UTC.

Target Result Reports VRAM peak (MB) Crashes
nvidia ❌ fail (an outlier) 2 1 2 — 1 PR run
windows+nvidia ❌ fail (an outlier) 2 1 2 — 1 PR run
windows+amd ❌ fail (an outlier) 2 1 2 — none
linux+radv ❌ fail (an outlier) 2 1 2 — none
intel ⏳ queued 1 1 — 4 PR runs

market-and-forest · frame time p99 (ms)

Target main RX_VK_DESC_BUFFER= RX_VK_DESC_BUFFER=0 (reference)
nvidia 7.1 8.0 (+14%) 7.0
windows+nvidia 10.2 11.4 (+14%) 10.0
windows+amd 39.3 39.5 (+2%) 38.8
linux+radv 9.4 21.3 (+129%) 9.3
intel — — —

Why it failed

  • nvidia: market-and-forest · RX_VK_DESC_BUFFER= (PR only) screenshot.max_diff: 0.7 → 0.2; limit 0.2
  • nvidia: market-and-forest · RX_VK_DESC_BUFFER= (PR only) crash: 1 PR run crashed
  • nvidia: market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) screenshot.max_diff: 0.2 → 0.7; limit 0.2
  • nvidia: market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) market.frametime_1pct_low_ms.max_delta_pct: 10.2 → 15.7 (+54.3%); limit 15.0
  • nvidia: market-and-forest · RX_VK_DESC_BUFFER= (PR only) forest.frametime_p99_ms: RX_VK_DESC_BUFFER= vs RX_VK_DESC_BUFFER=0 (PR): 6.2 → 8.4 (+33.8%); limit 15.0; the PR's own cells: RX_VK_DESC_BUFFER= against RX_VK_DESC_BUFFER=0 (RX_VK_DESC_BUFFER=0 (PR only))
  • windows+nvidia: market-and-forest · RX_VK_DESC_BUFFER= (PR only) crash: 1 PR run crashed
  • windows+nvidia: market-and-forest · RX_VK_DESC_BUFFER= (PR only) screenshot.max_diff: 0.1 → 0.8; limit 0.2
  • windows+nvidia: market-and-forest · RX_VK_DESC_BUFFER= (PR only) market.frametime_p99_ms: RX_VK_DESC_BUFFER= vs RX_VK_DESC_BUFFER=0 (PR): 14.0 → 16.9 (+20.5%); limit 15.0; the PR's own cells: RX_VK_DESC_BUFFER= against RX_VK_DESC_BUFFER=0 (RX_VK_DESC_BUFFER=0 (PR only))
  • and 7 more, in the reports

Couldn't be judged: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own.

  • intel, report 1: Insufficient frame-time evidence for 14 required comparison(s). See rule results.
What was tested

What will be tested · AI plan (gpt-6.1-terra)

Compare the pull request with main in Castle Town Market and Kokiri Forest on NVIDIA, AMD and Intel hardware, including Windows AMD and Linux RADV. Each side runs twice with the descriptor-buffer switch unset and twice with it disabled; each visit includes a still image and a 30-second uncapped frame-time measurement after warm-up. The pull request fails on a crash, a substantial image difference, or a frame-time regression over 15%; the enabled-by-default path is also compared with the disabled path on the pull request.

  • Where: nvidia (1-2 reports), windows+nvidia (1-2 reports), windows+amd (1-2 reports), linux+radv (1-2 reports), intel (1-2 reports).
  • Matrix: 2 cells, each on main and the PR: RX_VK_DESC_BUFFER `` or 0 (PR only).
  • market-and-forest: from the repository's save market-entrance (settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0; switches HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0), then teleport to Market, take the picture market to compare with main, measure market for 30 s (after 10 s warm-up), teleport to Kokiri Forest, take the picture forest to compare with main, measure forest for 30 s (after 10 s warm-up); 2 runs on each side for each of 2 cells (2 game starts a run).
  • Measured: crashes, frame times, stutters and hitches.
  • The PR fails if: it crashes; or the PR's frame time (p99) with RX_VK_DESC_BUFFER= is more than 15% above RX_VK_DESC_BUFFER=0; or a picture differs from main by more than 20%; or median frame time is more than 15% above main; or frame time (p99) is more than 15% above main; or frame time (worst 1%) is more than 15% above main.
  • Time: about 52 min of game runs per tester (8 game starts), plus the two builds.
Measurements on `nvidia`, for the PR description

Verdict: fail on nvidia (2 reports): market-and-forest screenshot.max_diff; market-and-forest crash; market-and-forest market.frametime_1pct_low_ms.max_delta_pct (+54.3%) failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0 AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5070 Ti, 621.40.0 AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM
Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 4908cc6 After: this PR @ 24f5517
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · median frame time (ms) 5.4 5.4 (+0%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · median frame time (ms) 8.7 8.4 (−3%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · frame time (p99) (ms) 6.6 8.0 (+21%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · frame time (p99) (ms) 11.5 11.2 (−3%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · frame time (worst 1%) (ms) 7.1 35.9 (+405%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · frame time (worst 1%) (ms) 15.9 14.5 (−9%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · median frame time (ms) 5.6 5.6 (−1%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · median frame time (ms) 8.8 8.9 (+0%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · frame time (p99) (ms) 7.1 7.0 (−2%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · frame time (p99) (ms) 11.7 11.8 (+1%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · frame time (worst 1%) (ms) 7.7 7.8 (+1%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · frame time (worst 1%) (ms) 14.0 15.1 (+8%)

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (median frame time) Helps / doesn't help / untested
RX_VK_DESC_BUFFER switch the PR adds (set on the PR side only) ``, 0 not in main the PR's default market-and-forest, main without it → the PR with : 5.4 → 5.4 (+0%) no clear effect

As Markdown for the PR description:

## Measurements

**Verdict:** fail on nvidia (2 reports): `market-and-forest screenshot.max_diff`; `market-and-forest crash`; `market-and-forest market.frametime_1pct_low_ms.max_delta_pct (+54.3%)` failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070 Ti, 621.40.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM`  
Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 4908cc6 | After: this PR @ 24f5517 |
|---|---|---|
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 5.4 | 5.4 (+0%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 8.7 | 8.4 (−3%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 6.6 | 8.0 (+21%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 11.5 | 11.2 (−3%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 7.1 | 35.9 (+405%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 15.9 | 14.5 (−9%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 5.6 | 5.6 (−1%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 8.8 | 8.9 (+0%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 7.1 | 7.0 (−2%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 11.7 | 11.8 (+1%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 7.7 | 7.8 (+1%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 14.0 | 15.1 (+8%) |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 5.4 → 5.4 (+0%) | no clear effect |
Measurements on `windows+nvidia`, for the PR description

Verdict: fail on windows+nvidia (2 reports): market-and-forest crash; market-and-forest screenshot.max_diff; market-and-forest market.frametime_p99_ms: RX_VK_DESC_BUFFER= vs RX_VK_DESC_BUFFER=0 (PR) (+20.5%) failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce GTX 1070, 582.78.0 AMD Ryzen 7 9800X3D 8-Core Processor, 64 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3090, 621.1.0 AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM
Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 4908cc6 After: this PR @ 24f5517
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · median frame time (ms) 8.5 9.7 (+14%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · median frame time (ms) 11.7 13.2 (+12%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · frame time (p99) (ms) 10.1 11.4 (+12%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · frame time (p99) (ms) 14.9 16.3 (+9%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · frame time (worst 1%) (ms) 11.7 13.0 (+11%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · frame time (worst 1%) (ms) 18.4 19.9 (+9%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · median frame time (ms) 8.5 8.5 (+0%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · median frame time (ms) 11.8 11.8 (−0%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · frame time (p99) (ms) 10.2 10.0 (−2%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · frame time (p99) (ms) 15.2 15.3 (+1%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · frame time (worst 1%) (ms) 11.2 10.7 (−4%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · frame time (worst 1%) (ms) 18.0 20.0 (+11%)

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (median frame time) Helps / doesn't help / untested
RX_VK_DESC_BUFFER switch the PR adds (set on the PR side only) ``, 0 not in main the PR's default market-and-forest, main without it → the PR with : 8.5 → 9.7 (+14%) doesn't help

As Markdown for the PR description:

## Measurements

**Verdict:** fail on windows+nvidia (2 reports): `market-and-forest crash`; `market-and-forest screenshot.max_diff`; `market-and-forest market.frametime_p99_ms: RX_VK_DESC_BUFFER= vs RX_VK_DESC_BUFFER=0 (PR) (+20.5%)` failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce GTX 1070, 582.78.0` `AMD Ryzen 7 9800X3D 8-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM`  
Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 4908cc6 | After: this PR @ 24f5517 |
|---|---|---|
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 8.5 | 9.7 (+14%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 11.7 | 13.2 (+12%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 10.1 | 11.4 (+12%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 14.9 | 16.3 (+9%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 11.7 | 13.0 (+11%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 18.4 | 19.9 (+9%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 8.5 | 8.5 (+0%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 11.8 | 11.8 (−0%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 10.2 | 10.0 (−2%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 15.2 | 15.3 (+1%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 11.2 | 10.7 (−4%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 18.0 | 20.0 (+11%) |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 8.5 → 9.7 (+14%) | doesn't help |
Measurements on `windows+amd`, for the PR description

Verdict: fail on windows+amd (2 reports): market-and-forest screenshot.max_diff failed.

Hardware: 1: windows+amd+amd-proprietary+dgpu AMD Radeon RX 9070 XT, 2.0.416 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM; 2: windows+amd+amd-proprietary+igpu+xess AMD Radeon(TM) Graphics, 2.0.279 AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM
Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 4908cc6 After: this PR @ 24f5517
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · median frame time (ms) 36.7 36.5 (−0%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · median frame time (ms) 41.2 41.0 (−1%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · frame time (p99) (ms) 38.7 39.5 (+2%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · frame time (p99) (ms) 46.3 45.4 (−2%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · frame time (worst 1%) (ms) 39.4 43.0 (+9%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · frame time (worst 1%) (ms) 53.3 49.5 (−7%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · median frame time (ms) 36.5 36.5 (−0%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · median frame time (ms) 40.8 40.9 (+0%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · frame time (p99) (ms) 39.3 38.8 (−1%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · frame time (p99) (ms) 46.0 46.5 (+1%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · frame time (worst 1%) (ms) 40.2 40.4 (+0%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · frame time (worst 1%) (ms) 50.0 52.0 (+4%)

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (median frame time) Helps / doesn't help / untested
RX_VK_DESC_BUFFER switch the PR adds (set on the PR side only) ``, 0 not in main the PR's default market-and-forest, main without it → the PR with : 36.7 → 36.5 (−0%) no clear effect

As Markdown for the PR description:

## Measurements

**Verdict:** fail on windows+amd (2 reports): `market-and-forest screenshot.max_diff` failed.

Hardware: 1: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM`; 2: windows+amd+amd-proprietary+igpu+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM`  
Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 4908cc6 | After: this PR @ 24f5517 |
|---|---|---|
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 36.7 | 36.5 (−0%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 41.2 | 41.0 (−1%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 38.7 | 39.5 (+2%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 46.3 | 45.4 (−2%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 39.4 | 43.0 (+9%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 53.3 | 49.5 (−7%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 36.5 | 36.5 (−0%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 40.8 | 40.9 (+0%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 39.3 | 38.8 (−1%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 46.0 | 46.5 (+1%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 40.2 | 40.4 (+0%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 50.0 | 52.0 (+4%) |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 36.7 → 36.5 (−0%) | no clear effect |
Measurements on `linux+radv`, for the PR description

Verdict: fail on linux+radv (2 reports): market-and-forest forest.frametime_p99_ms.max_delta_pct (+264.2%); market-and-forest forest.frametime_1pct_low_ms.max_delta_pct (+132.9%); market-and-forest screenshot.max_diff failed.

Hardware: 1: linux+amd+radv+dgpu AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1 AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM; 2: linux+amd+radv+dgpu AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM
Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 4908cc6 After: this PR @ 24f5517
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · median frame time (ms) 7.6 7.6 (−0%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · median frame time (ms) 11.1 11.6 (+5%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · frame time (p99) (ms) 9.5 21.3 (+126%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · frame time (p99) (ms) 38.3 38.6 (+1%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · forest · frame time (worst 1%) (ms) 16.9 31.7 (+88%)
market-and-forest · RX_VK_DESC_BUFFER= (PR only) · market · frame time (worst 1%) (ms) 40.8 40.4 (−1%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · median frame time (ms) 7.7 7.7 (−0%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · median frame time (ms) 11.0 11.3 (+2%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · frame time (p99) (ms) 9.4 9.3 (−1%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · frame time (p99) (ms) 38.3 38.1 (−0%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · forest · frame time (worst 1%) (ms) 16.4 16.5 (+0%)
market-and-forest · RX_VK_DESC_BUFFER=0 (PR only) · market · frame time (worst 1%) (ms) 42.7 40.7 (−5%)

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (median frame time) Helps / doesn't help / untested
RX_VK_DESC_BUFFER switch the PR adds (set on the PR side only) ``, 0 not in main the PR's default market-and-forest, main without it → the PR with : 7.6 → 7.6 (−0%) no clear effect

As Markdown for the PR description:

## Measurements

**Verdict:** fail on linux+radv (2 reports): `market-and-forest forest.frametime_p99_ms.max_delta_pct (+264.2%)`; `market-and-forest forest.frametime_1pct_low_ms.max_delta_pct (+132.9%)`; `market-and-forest screenshot.max_diff` failed.

Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM`  
Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 4908cc6 | After: this PR @ 24f5517 |
|---|---|---|
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 7.6 | 7.6 (−0%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 11.1 | 11.6 (+5%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 9.5 | 21.3 (+126%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 38.3 | 38.6 (+1%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 16.9 | 31.7 (+88%) |
| market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 40.8 | 40.4 (−1%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 7.7 | 7.7 (−0%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 11.0 | 11.3 (+2%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 9.4 | 9.3 (−1%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 38.3 | 38.1 (−0%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 16.4 | 16.5 (+0%) |
| market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 42.7 | 40.7 (−5%) |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 7.6 → 7.6 (−0%) | no clear effect |
Measurements on `intel`, for the PR description

Verdict: queued on intel (1 report).

Hardware: 1: windows+intel+intel-proprietary+igpu Intel(R) UHD Graphics 630, 0.404.2115 Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM
Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Nothing was measured: no metric came back.

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (median frame time) Helps / doesn't help / untested
RX_VK_DESC_BUFFER switch the PR adds (set on the PR side only) ``, 0 not in main the PR's default market-and-forest, main without it → the PR with : not measured untested

As Markdown for the PR description:

## Measurements

**Verdict:** queued on intel (1 report).

Hardware: 1: windows+intel+intel-proprietary+igpu `Intel(R) UHD Graphics 630, 0.404.2115` `Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM`  
Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 1 report  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

Nothing was measured: no metric came back.

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : not measured | untested |
The testers' hardware
Target Report Ran on
nvidia 1 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0 AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM
nvidia 2 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5070 Ti, 621.40.0 AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM
windows+nvidia 1 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce GTX 1070, 582.78.0 AMD Ryzen 7 9800X3D 8-Core Processor, 64 GB RAM
windows+nvidia 2 windows+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 3090, 621.1.0 AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM
windows+amd 1 windows+amd+amd-proprietary+dgpu AMD Radeon RX 9070 XT, 2.0.416 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM
windows+amd 2 windows+amd+amd-proprietary+igpu+xess AMD Radeon(TM) Graphics, 2.0.279 AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM
linux+radv 1 linux+amd+radv+dgpu AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1 AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM
linux+radv 2 linux+amd+radv+dgpu AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM
intel 1 windows+intel+intel-proprietary+igpu Intel(R) UHD Graphics 630, 0.404.2115 Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM
<!-- beanstalk:previous --> <details><summary>Beanstalk test farm · an earlier run: commit <code>24f5517</code> (the newer results are in a comment below)</summary> Commit `24f5517` · approved by HumanBean (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/2948) ⚠️ **Note:** On hardware without the required descriptor-buffer features, unset and disabled both use the fallback, so their comparison cannot measure the new path; the disabled cell still checks changes shared with the fallback. ⚠️ **Note:** The farm does not run the requested Linux test suite or directly measure the claimed 0.1% lows; two starts per side and switch value keep the game runs within the time limit. ⚠️ **Note:** The scenarios exercise normal gameplay but cannot guarantee that the AMD compute-mesh fallback is reached. Started at 2026-12-01 15:24 UTC. | Target | Result | Reports | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | | `nvidia` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_c9f2bae4b8dd8ece) [2](https://beanstalk.magicbean.dev/reports/rp_683bfd692420bd8b) | — | 1 PR run | | `windows+nvidia` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_432589fff1b0afcf) [2](https://beanstalk.magicbean.dev/reports/rp_e144eff23a4a32a5) | — | 1 PR run | | `windows+amd` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_7908a960fc947ecf) [2](https://beanstalk.magicbean.dev/reports/rp_ad24f56ab81432a6) | — | none | | `linux+radv` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_ba479e51ebb8a480) [2](https://beanstalk.magicbean.dev/reports/rp_1e9adc054673ec30) | — | none | | `intel` | ⏳ queued | 1 [1](https://beanstalk.magicbean.dev/reports/rp_42add2a2ec752056) | — | 4 PR runs | **`market-and-forest`** · frame time p99 (ms) | Target | main | `RX_VK_DESC_BUFFER=` | `RX_VK_DESC_BUFFER=0` (reference) | | --- | --- | --- | --- | | `nvidia` | 7.1 | 8.0 (+14%) | 7.0 | | `windows+nvidia` | 10.2 | 11.4 (+14%) | 10.0 | | `windows+amd` | 39.3 | 39.5 (+2%) | 38.8 | | `linux+radv` | 9.4 | 21.3 (+129%) | 9.3 | | `intel` | — | — | — | **Why it failed** - `nvidia`: `market-and-forest · RX_VK_DESC_BUFFER= (PR only)` `screenshot.max_diff`: `0.7 → 0.2; limit 0.2` - `nvidia`: `market-and-forest · RX_VK_DESC_BUFFER= (PR only)` `crash`: `1 PR run crashed` - `nvidia`: `market-and-forest · RX_VK_DESC_BUFFER=0 (PR only)` `screenshot.max_diff`: `0.2 → 0.7; limit 0.2` - `nvidia`: `market-and-forest · RX_VK_DESC_BUFFER=0 (PR only)` `market.frametime_1pct_low_ms.max_delta_pct`: `10.2 → 15.7 (+54.3%); limit 15.0` - `nvidia`: `market-and-forest · RX_VK_DESC_BUFFER= (PR only)` `forest.frametime_p99_ms: RX_VK_DESC_BUFFER= vs RX_VK_DESC_BUFFER=0 (PR)`: `6.2 → 8.4 (+33.8%); limit 15.0; the PR's own cells: RX_VK_DESC_BUFFER= against RX_VK_DESC_BUFFER=0 (RX_VK_DESC_BUFFER=0 (PR only))` - `windows+nvidia`: `market-and-forest · RX_VK_DESC_BUFFER= (PR only)` `crash`: `1 PR run crashed` - `windows+nvidia`: `market-and-forest · RX_VK_DESC_BUFFER= (PR only)` `screenshot.max_diff`: `0.1 → 0.8; limit 0.2` - `windows+nvidia`: `market-and-forest · RX_VK_DESC_BUFFER= (PR only)` `market.frametime_p99_ms: RX_VK_DESC_BUFFER= vs RX_VK_DESC_BUFFER=0 (PR)`: `14.0 → 16.9 (+20.5%); limit 15.0; the PR's own cells: RX_VK_DESC_BUFFER= against RX_VK_DESC_BUFFER=0 (RX_VK_DESC_BUFFER=0 (PR only))` - and 7 more, in the reports **Couldn't be judged**: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own. - `intel`, [report 1](https://beanstalk.magicbean.dev/reports/rp_42add2a2ec752056): `Insufficient frame-time evidence for 14 required comparison(s). See rule results.` <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) Compare the pull request with main in Castle Town Market and Kokiri Forest on NVIDIA, AMD and Intel hardware, including Windows AMD and Linux RADV. Each side runs twice with the descriptor-buffer switch unset and twice with it disabled; each visit includes a still image and a 30-second uncapped frame-time measurement after warm-up. The pull request fails on a crash, a substantial image difference, or a frame-time regression over 15%; the enabled-by-default path is also compared with the disabled path on the pull request. - **Where:** nvidia (1-2 reports), windows+nvidia (1-2 reports), windows+amd (1-2 reports), linux+radv (1-2 reports), intel (1-2 reports). - **Matrix:** 2 cells, each on main and the PR: RX_VK_DESC_BUFFER `` or `0` (PR only). - **market-and-forest:** from the repository's save `market-entrance` (settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0; switches `HOS_OUTPUT_RES=1280x720`, `RX_VK_AUTO_TUNE=0`), then teleport to Market, take the picture market to compare with main, measure market for 30 s (after 10 s warm-up), teleport to Kokiri Forest, take the picture forest to compare with main, measure forest for 30 s (after 10 s warm-up); 2 runs on each side for each of 2 cells (2 game starts a run). - **Measured:** crashes, frame times, stutters and hitches. - **The PR fails if:** it crashes; or the PR's frame time (p99) with RX_VK_DESC_BUFFER= is more than 15% above RX_VK_DESC_BUFFER=0; or a picture differs from main by more than 20%; or median frame time is more than 15% above main; or frame time (p99) is more than 15% above main; or frame time (worst 1%) is more than 15% above main. - **Time:** about 52 min of game runs per tester (8 game starts), plus the two builds. </details> <details><summary>Measurements on `nvidia`, for the PR description</summary> **Verdict:** fail on nvidia (2 reports): `market-and-forest screenshot.max_diff`; `market-and-forest crash`; `market-and-forest market.frametime_1pct_low_ms.max_delta_pct (+54.3%)` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070 Ti, 621.40.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 4908cc6 | After: this PR @ 24f5517 | |---|---|---| | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 5.4 | 5.4 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 8.7 | 8.4 (−3%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 6.6 | 8.0 (+21%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 11.5 | 11.2 (−3%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 7.1 | 35.9 (+405%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 15.9 | 14.5 (−9%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 5.6 | 5.6 (−1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 8.8 | 8.9 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 7.1 | 7.0 (−2%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 11.7 | 11.8 (+1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 7.7 | 7.8 (+1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 14.0 | 15.1 (+8%) | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 5.4 → 5.4 (+0%) | no clear effect | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on nvidia (2 reports): `market-and-forest screenshot.max_diff`; `market-and-forest crash`; `market-and-forest market.frametime_1pct_low_ms.max_delta_pct (+54.3%)` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070 Ti, 621.40.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 4908cc6 | After: this PR @ 24f5517 | |---|---|---| | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 5.4 | 5.4 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 8.7 | 8.4 (−3%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 6.6 | 8.0 (+21%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 11.5 | 11.2 (−3%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 7.1 | 35.9 (+405%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 15.9 | 14.5 (−9%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 5.6 | 5.6 (−1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 8.8 | 8.9 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 7.1 | 7.0 (−2%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 11.7 | 11.8 (+1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 7.7 | 7.8 (+1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 14.0 | 15.1 (+8%) | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 5.4 → 5.4 (+0%) | no clear effect | ``` </details> <details><summary>Measurements on `windows+nvidia`, for the PR description</summary> **Verdict:** fail on windows+nvidia (2 reports): `market-and-forest crash`; `market-and-forest screenshot.max_diff`; `market-and-forest market.frametime_p99_ms: RX_VK_DESC_BUFFER= vs RX_VK_DESC_BUFFER=0 (PR) (+20.5%)` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce GTX 1070, 582.78.0` `AMD Ryzen 7 9800X3D 8-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM` Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 4908cc6 | After: this PR @ 24f5517 | |---|---|---| | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 8.5 | 9.7 (+14%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 11.7 | 13.2 (+12%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 10.1 | 11.4 (+12%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 14.9 | 16.3 (+9%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 11.7 | 13.0 (+11%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 18.4 | 19.9 (+9%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 8.5 | 8.5 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 11.8 | 11.8 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 10.2 | 10.0 (−2%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 15.2 | 15.3 (+1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 11.2 | 10.7 (−4%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 18.0 | 20.0 (+11%) | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 8.5 → 9.7 (+14%) | doesn't help | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on windows+nvidia (2 reports): `market-and-forest crash`; `market-and-forest screenshot.max_diff`; `market-and-forest market.frametime_p99_ms: RX_VK_DESC_BUFFER= vs RX_VK_DESC_BUFFER=0 (PR) (+20.5%)` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce GTX 1070, 582.78.0` `AMD Ryzen 7 9800X3D 8-Core Processor, 64 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM` Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 4908cc6 | After: this PR @ 24f5517 | |---|---|---| | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 8.5 | 9.7 (+14%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 11.7 | 13.2 (+12%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 10.1 | 11.4 (+12%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 14.9 | 16.3 (+9%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 11.7 | 13.0 (+11%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 18.4 | 19.9 (+9%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 8.5 | 8.5 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 11.8 | 11.8 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 10.2 | 10.0 (−2%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 15.2 | 15.3 (+1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 11.2 | 10.7 (−4%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 18.0 | 20.0 (+11%) | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 8.5 → 9.7 (+14%) | doesn't help | ``` </details> <details><summary>Measurements on `windows+amd`, for the PR description</summary> **Verdict:** fail on windows+amd (2 reports): `market-and-forest screenshot.max_diff` failed. Hardware: 1: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM`; 2: windows+amd+amd-proprietary+igpu+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM` Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 4908cc6 | After: this PR @ 24f5517 | |---|---|---| | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 36.7 | 36.5 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 41.2 | 41.0 (−1%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 38.7 | 39.5 (+2%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 46.3 | 45.4 (−2%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 39.4 | 43.0 (+9%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 53.3 | 49.5 (−7%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 36.5 | 36.5 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 40.8 | 40.9 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 39.3 | 38.8 (−1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 46.0 | 46.5 (+1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 40.2 | 40.4 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 50.0 | 52.0 (+4%) | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 36.7 → 36.5 (−0%) | no clear effect | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on windows+amd (2 reports): `market-and-forest screenshot.max_diff` failed. Hardware: 1: windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM`; 2: windows+amd+amd-proprietary+igpu+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM` Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 4908cc6 | After: this PR @ 24f5517 | |---|---|---| | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 36.7 | 36.5 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 41.2 | 41.0 (−1%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 38.7 | 39.5 (+2%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 46.3 | 45.4 (−2%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 39.4 | 43.0 (+9%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 53.3 | 49.5 (−7%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 36.5 | 36.5 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 40.8 | 40.9 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 39.3 | 38.8 (−1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 46.0 | 46.5 (+1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 40.2 | 40.4 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 50.0 | 52.0 (+4%) | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 36.7 → 36.5 (−0%) | no clear effect | ``` </details> <details><summary>Measurements on `linux+radv`, for the PR description</summary> **Verdict:** fail on linux+radv (2 reports): `market-and-forest forest.frametime_p99_ms.max_delta_pct (+264.2%)`; `market-and-forest forest.frametime_1pct_low_ms.max_delta_pct (+132.9%)`; `market-and-forest screenshot.max_diff` failed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 4908cc6 | After: this PR @ 24f5517 | |---|---|---| | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 7.6 | 7.6 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 11.1 | 11.6 (+5%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 9.5 | 21.3 (+126%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 38.3 | 38.6 (+1%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 16.9 | 31.7 (+88%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 40.8 | 40.4 (−1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 7.7 | 7.7 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 11.0 | 11.3 (+2%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 9.4 | 9.3 (−1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 38.3 | 38.1 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 16.4 | 16.5 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 42.7 | 40.7 (−5%) | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 7.6 → 7.6 (−0%) | no clear effect | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on linux+radv (2 reports): `market-and-forest forest.frametime_p99_ms.max_delta_pct (+264.2%)`; `market-and-forest forest.frametime_1pct_low_ms.max_delta_pct (+132.9%)`; `market-and-forest screenshot.max_diff` failed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 4908cc6 | After: this PR @ 24f5517 | |---|---|---| | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · median frame time (ms) | 7.6 | 7.6 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · median frame time (ms) | 11.1 | 11.6 (+5%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (p99) (ms) | 9.5 | 21.3 (+126%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (p99) (ms) | 38.3 | 38.6 (+1%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · forest · frame time (worst 1%) (ms) | 16.9 | 31.7 (+88%) | | market-and-forest · `RX_VK_DESC_BUFFER= (PR only)` · market · frame time (worst 1%) (ms) | 40.8 | 40.4 (−1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · median frame time (ms) | 7.7 | 7.7 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · median frame time (ms) | 11.0 | 11.3 (+2%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (p99) (ms) | 9.4 | 9.3 (−1%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (p99) (ms) | 38.3 | 38.1 (−0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · forest · frame time (worst 1%) (ms) | 16.4 | 16.5 (+0%) | | market-and-forest · `RX_VK_DESC_BUFFER=0 (PR only)` · market · frame time (worst 1%) (ms) | 42.7 | 40.7 (−5%) | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : 7.6 → 7.6 (−0%) | no clear effect | ``` </details> <details><summary>Measurements on `intel`, for the PR description</summary> **Verdict:** queued on intel (1 report). Hardware: 1: windows+intel+intel-proprietary+igpu `Intel(R) UHD Graphics 630, 0.404.2115` `Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM` Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : not measured | untested | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** queued on intel (1 report). Hardware: 1: windows+intel+intel-proprietary+igpu `Intel(R) UHD Graphics 630, 0.404.2115` `Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM` Scene: market-and-forest, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-and-forest: 2 game starts a side, market 30 s after 10 s warm-up, forest 30 s after 10 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (median frame time) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_DESC_BUFFER` | switch the PR adds (set on the PR side only) | ``, `0` | not in main | the PR's default | market-and-forest, main without it → the PR with : not measured | untested | ``` </details> <details><summary>The testers' hardware</summary> | Target | Report | Ran on | | --- | --- | --- | | `nvidia` | [1](https://beanstalk.magicbean.dev/reports/rp_c9f2bae4b8dd8ece) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` | | `nvidia` | [2](https://beanstalk.magicbean.dev/reports/rp_683bfd692420bd8b) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070 Ti, 621.40.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` | | `windows+nvidia` | [1](https://beanstalk.magicbean.dev/reports/rp_432589fff1b0afcf) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce GTX 1070, 582.78.0` `AMD Ryzen 7 9800X3D 8-Core Processor, 64 GB RAM` | | `windows+nvidia` | [2](https://beanstalk.magicbean.dev/reports/rp_e144eff23a4a32a5) | windows+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 3090, 621.1.0` `AMD Ryzen 9 5900X 12-Core Processor, 128 GB RAM` | | `windows+amd` | [1](https://beanstalk.magicbean.dev/reports/rp_7908a960fc947ecf) | windows+amd+amd-proprietary+dgpu `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` | | `windows+amd` | [2](https://beanstalk.magicbean.dev/reports/rp_ad24f56ab81432a6) | windows+amd+amd-proprietary+igpu+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM` | | `linux+radv` | [1](https://beanstalk.magicbean.dev/reports/rp_ba479e51ebb8a480) | linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM` | | `linux+radv` | [2](https://beanstalk.magicbean.dev/reports/rp_1e9adc054673ec30) | linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` | | `intel` | [1](https://beanstalk.magicbean.dev/reports/rp_42add2a2ec752056) | windows+intel+intel-proprietary+igpu `Intel(R) UHD Graphics 630, 0.404.2115` `Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM` | </details> </details>
BeanBot left a comment

Recommendation: Request changes. Pipeline-layout handles can be reused after precompilation while the descriptor-layout cache retains their old metadata, causing later shaders to read incorrectly laid-out descriptors. The new path also needs to account for devices that store combined image samplers in separate arrays.

The change replaces per-draw Vulkan descriptor writes for game pipelines with mapped descriptor buffers and thread-local caches. The reported RTX 4060 runs show a Market improvement, at the cost of additional mapped memory and per-thread caches; correctness and performance on other supported hardware remain untested.

Blocking (3): must change before merging.

  1. L1 gpu/vk/vk_draw.cpp:1121: The layout metadata remains keyed by a Vulkan handle after that pipeline layout is destroyed, and emplace does not replace an existing entry when the driver reuses the handle. (more on the line) Do: Remove the metadata and invalidate thread-local cache entries when a layout is destroyed, or associate metadata with the program/layout lifetime without relying on reusable Vulkan handles.
  2. L2 gpu/vk/vk_draw.cpp:5005: Combined image sampler descriptors are always written as an interleaved array, without checking combinedImageSamplerDescriptorSingleArray. (more on the line) Do: Handle the separate-array layout using the reported component sizes, or disable the descriptor-buffer path when the property is false.
  3. L3 gpu/vk/vk_draw.cpp:4803: The fallback texel descriptors use zero_buffer, but that buffer is created without uniform or storage texel-buffer usage flags. (more on the line) Do: Create a suitable zero texel buffer with both required texel usage flags, or reuse a properly formatted dummy texel buffer for these descriptors.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L4 gpu/vk/vk_main.cpp:1134: The default-on renderer path has not been exercised on the other Tier 1 systems it affects. (more on the line) Do: Run in-game visual and interleaved performance comparisons on the affected Tier 1 systems, including the compute mesh fallback, and report the results.
  • L5 gpu/vk/vk_draw.cpp:793: The change adds mapped descriptor buffers and per-thread caches, but the reported peak ring use is not a before-and-after RAM and VRAM measurement. (more on the line) Do: Measure RAM and VRAM against the base during representative play, including a memory-constrained supported system. (@fix does its part first: Reduce initial ring allocation or allocate chunks lazily to shrink the retained memory cost.)

@fix can do L1, L2, L3 and L5.

Questions (1) (not confirmed from the code; they don't hold the recommendation)

  • The maintainer requested @​beanstalk, but this read-only, network-closed review cannot submit a Test Farm request. Can the existing AMD and Linux requests be dispatched through the farm?

Checks: Still running: 10 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes on the reported Windows RTX 4060 Market run: median average FPS rose from 67.01 to 69.20 across three interleaved 30-second pairs, with the reported 1% low rising from 52.95 to 55.01 FPS. Kokiri Forest results overlap substantially, and the measurements do not establish the default's effect on other supported systems.

Other systems: The path affects graphics, compute and mesh fallback pipelines whenever the extension and required features are present. The supplied runs cover Windows on an NVIDIA RTX 4060; AMD Windows and RADV, NVIDIA Linux, Steam Deck, and the compute fallback still need coverage. Helper pipelines retain their existing descriptor path.

Switches: RX_VK_DESC_BUFFER is added as a kill switch, default on when the feature checks pass; its switches.def row is present. The default has not yet been measured across the supported hardware it can affect.

Reviewed: 24f551717f against 4908cc6dad: Read the repository rules, PR template, standards, commit message, supplied description, comments and CI status; inspected the diff and surrounding descriptor, recording, texture and device code. The large changed files were inspected in relevant sections rather than read in full; the complete change and all callers were not exhaustively reviewed. No recorded artifacts or generated files were supplied for inspection. ../Tooling/AGENTS.md and docs/review-checklist.md were absent.; nothing run (a code review).

Checked and fine:

  • The commit has an Assisted-by trailer.
  • The new switch has a switches.def row.
  • The recorder test exercises both single-set and multi-set descriptor-buffer offset packets.
  • The supplied CI status lists no head-only failures; checks are still running.

Testing: No code, tests or project scripts were run, as requested. The author's Windows RTX 4060 in-game runs and game-free checks are reported in the PR; CI is still running.

Overlaps and merge order: Unknown; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** Pipeline-layout handles can be reused after precompilation while the descriptor-layout cache retains their old metadata, causing later shaders to read incorrectly laid-out descriptors. The new path also needs to account for devices that store combined image samplers in separate arrays. The change replaces per-draw Vulkan descriptor writes for game pipelines with mapped descriptor buffers and thread-local caches. The reported RTX 4060 runs show a Market improvement, at the cost of additional mapped memory and per-thread caches; correctness and performance on other supported hardware remain untested. **Blocking (3)**: must change before merging. 1. **L1** `gpu/vk/vk_draw.cpp:1121`: The layout metadata remains keyed by a Vulkan handle after that pipeline layout is destroyed, and emplace does not replace an existing entry when the driver reuses the handle. (more on the line) **Do:** Remove the metadata and invalidate thread-local cache entries when a layout is destroyed, or associate metadata with the program/layout lifetime without relying on reusable Vulkan handles. 2. **L2** `gpu/vk/vk_draw.cpp:5005`: Combined image sampler descriptors are always written as an interleaved array, without checking combinedImageSamplerDescriptorSingleArray. (more on the line) **Do:** Handle the separate-array layout using the reported component sizes, or disable the descriptor-buffer path when the property is false. 3. **L3** `gpu/vk/vk_draw.cpp:4803`: The fallback texel descriptors use zero_buffer, but that buffer is created without uniform or storage texel-buffer usage flags. (more on the line) **Do:** Create a suitable zero texel buffer with both required texel usage flags, or reuse a properly formatted dummy texel buffer for these descriptors. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L4** `gpu/vk/vk_main.cpp:1134`: The default-on renderer path has not been exercised on the other Tier 1 systems it affects. (more on the line) **Do:** Run in-game visual and interleaved performance comparisons on the affected Tier 1 systems, including the compute mesh fallback, and report the results. - **L5** `gpu/vk/vk_draw.cpp:793`: The change adds mapped descriptor buffers and per-thread caches, but the reported peak ring use is not a before-and-after RAM and VRAM measurement. (more on the line) **Do:** Measure RAM and VRAM against the base during representative play, including a memory-constrained supported system. *(`@fix` does its part first: Reduce initial ring allocation or allocate chunks lazily to shrink the retained memory cost.)* `@fix` can do L1, L2, L3 and L5. **Questions (1)** (not confirmed from the code; they don't hold the recommendation) - The maintainer requested @​beanstalk, but this read-only, network-closed review cannot submit a Test Farm request. Can the existing AMD and Linux requests be dispatched through the farm? **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes on the reported Windows RTX 4060 Market run: median average FPS rose from 67.01 to 69.20 across three interleaved 30-second pairs, with the reported 1% low rising from 52.95 to 55.01 FPS. Kokiri Forest results overlap substantially, and the measurements do not establish the default's effect on other supported systems. **Other systems:** The path affects graphics, compute and mesh fallback pipelines whenever the extension and required features are present. The supplied runs cover Windows on an NVIDIA RTX 4060; AMD Windows and RADV, NVIDIA Linux, Steam Deck, and the compute fallback still need coverage. Helper pipelines retain their existing descriptor path. **Switches:** RX_VK_DESC_BUFFER is added as a kill switch, default on when the feature checks pass; its switches.def row is present. The default has not yet been measured across the supported hardware it can affect. **Reviewed:** 24f551717fc7 against 4908cc6dadff: Read the repository rules, PR template, standards, commit message, supplied description, comments and CI status; inspected the diff and surrounding descriptor, recording, texture and device code. The large changed files were inspected in relevant sections rather than read in full; the complete change and all callers were not exhaustively reviewed. No recorded artifacts or generated files were supplied for inspection. ../Tooling/AGENTS.md and docs/review-checklist.md were absent.; nothing run (a code review). **Checked and fine:** - The commit has an Assisted-by trailer. - The new switch has a switches.def row. - The recorder test exercises both single-set and multi-set descriptor-buffer offset packets. - The supplied CI status lists no head-only failures; checks are still running. **Testing:** No code, tests or project scripts were run, as requested. The author's Windows RTX 4060 in-game runs and game-free checks are reported in the PR; CI is still running. **Overlaps and merge order:** Unknown; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -765,4 +790,4 @@
std::vector<Stream> streams; // (the first, then the ones made on demand: kept for the slot's next recordings)
size_t si = 0; // (the one in use)
uint64_t before = 0; // (what the recording used of the streams before this one)
uint32_t idle = 0; // (recordings of the slot that stayed in the first stream)
Member

L5 (should fix): The change adds mapped descriptor buffers and per-thread caches, but the reported peak ring use is not a before-and-after RAM and VRAM measurement.

When: Players with constrained RAM or VRAM retain descriptor chunks for recording slots and caches for recording threads; the reported 221 KB peak in one recording does not show the total allocation or pressure during play.

Do: Measure RAM and VRAM against the base during representative play, including a memory-constrained supported system.

**L5** (should fix): The change adds mapped descriptor buffers and per-thread caches, but the reported peak ring use is not a before-and-after RAM and VRAM measurement. *When:* Players with constrained RAM or VRAM retain descriptor chunks for recording slots and caches for recording threads; the reported 221 KB peak in one recording does not show the total allocation or pressure during play. **Do:** Measure RAM and VRAM against the base during representative play, including a memory-constrained supported system.
@ -961,0 +1118,4 @@
}
}
std::lock_guard lk(db_layouts_mu);
db_layouts.emplace(layout, std::move(dbl));
Member

L1 (blocking): The layout metadata remains keyed by a Vulkan handle after that pipeline layout is destroyed, and emplace does not replace an existing entry when the driver reuses the handle.

When: The compute warm-up destroys p.layout after compiling it. If a later layout receives the same handle, ensure_layout leaves the warm-up layout's size and binding offsets in db_layouts; build_descriptors then writes and binds descriptors using those old offsets, producing incorrect shader inputs or invalid memory accesses.

Do: Remove the metadata and invalidate thread-local cache entries when a layout is destroyed, or associate metadata with the program/layout lifetime without relying on reusable Vulkan handles.

**L1** (blocking): The layout metadata remains keyed by a Vulkan handle after that pipeline layout is destroyed, and emplace does not replace an existing entry when the driver reuses the handle. *When:* The compute warm-up destroys p.layout after compiling it. If a later layout receives the same handle, ensure_layout leaves the warm-up layout's size and binding offsets in db_layouts; build_descriptors then writes and binds descriptors using those old offsets, producing incorrect shader inputs or invalid memory accesses. **Do:** Remove the metadata and invalidate thread-local cache entries when a layout is destroyed, or associate metadata with the program/layout lifetime without relying on reusable Vulkan handles.
@ -4573,0 +4800,4 @@
auto fill_texel = [](VkDescriptorType type, VkDeviceSize sz, uint8_t* dst) {
if (!sz || sz > 64) return;
VkDescriptorAddressInfoEXT ai{VK_STRUCTURE_TYPE_DESCRIPTOR_ADDRESS_INFO_EXT};
ai.address = zero_address;
Member

L3 (blocking): The fallback texel descriptors use zero_buffer, but that buffer is created without uniform or storage texel-buffer usage flags.

When: When null descriptors are unavailable and a texel binding cannot be resolved, initialization obtains a texel descriptor for zero_address. That address belongs to a buffer lacking the required texel usage, so the descriptor is invalid and a shader using the fallback can render incorrectly or cause a device error.

Do: Create a suitable zero texel buffer with both required texel usage flags, or reuse a properly formatted dummy texel buffer for these descriptors.

**L3** (blocking): The fallback texel descriptors use zero_buffer, but that buffer is created without uniform or storage texel-buffer usage flags. *When:* When null descriptors are unavailable and a texel binding cannot be resolved, initialization obtains a texel descriptor for zero_address. That address belongs to a buffer lacking the required texel usage, so the descriptor is invalid and a shader using the fallback can render incorrectly or cause a device error. **Do:** Create a suitable zero texel buffer with both required texel usage flags, or reuse a properly formatted dummy texel buffer for these descriptors.
@ -4573,0 +5002,4 @@
VkDescriptorGetInfoEXT gi{VK_STRUCTURE_TYPE_DESCRIPTOR_GET_INFO_EXT};
gi.type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
gi.data.pCombinedImageSampler = &ii;
vkGetDescriptorEXT(dev.device, &gi, sz, e.raw);
Member

L2 (blocking): Combined image sampler descriptors are always written as an interleaved array, without checking combinedImageSamplerDescriptorSingleArray.

When: On a supporting driver that reports this property as false, an array of combined image samplers has separate image and sampler portions. Writing each combined descriptor at k times combinedImageSamplerDescriptorSize puts the entries in the wrong positions, so shaders sampling an array receive incorrect descriptors.

Do: Handle the separate-array layout using the reported component sizes, or disable the descriptor-buffer path when the property is false.

**L2** (blocking): Combined image sampler descriptors are always written as an interleaved array, without checking combinedImageSamplerDescriptorSingleArray. *When:* On a supporting driver that reports this property as false, an array of combined image samplers has separate image and sampler portions. Writing each combined descriptor at k times combinedImageSamplerDescriptorSize puts the entries in the wrong positions, so shaders sampling an array receive incorrect descriptors. **Do:** Handle the separate-array layout using the reported component sizes, or disable the descriptor-buffer path when the property is false.
@ -1114,0 +1131,4 @@
dbp.storageTexelBufferDescriptorSize > 0 && dbp.storageTexelBufferDescriptorSize <= 64;
const bool fns_ok = vkx::vkGetDescriptorSetLayoutSizeEXT && vkx::vkGetDescriptorSetLayoutBindingOffsetEXT &&
vkx::vkGetDescriptorEXT && vkx::vkCmdBindDescriptorBuffersEXT && vkx::vkCmdSetDescriptorBufferOffsetsEXT;
if (db_wanted && descriptor_buffer.descriptorBuffer && dev.vk12.bufferDeviceAddress &&
Member

L4 (should fix): The default-on renderer path has not been exercised on the other Tier 1 systems it affects.

When: AMD Windows and RADV, NVIDIA Linux and Steam Deck can select this path, but the only reported in-game run is on Windows with an RTX 4060; their rendering and frame-time behavior are unknown.

Do: Run in-game visual and interleaved performance comparisons on the affected Tier 1 systems, including the compute mesh fallback, and report the results.

**L4** (should fix): The default-on renderer path has not been exercised on the other Tier 1 systems it affects. *When:* AMD Windows and RADV, NVIDIA Linux and Steam Deck can select this path, but the only reported in-game run is on Windows with an RTX 4060; their rendering and frame-time behavior are unknown. **Do:** Run in-game visual and interleaved performance comparisons on the affected Tier 1 systems, including the compute mesh fallback, and report the results.
fix(vk): fix descriptor-buffer layout eviction, caps, texel fallback, and make opt-in
Some checks are pending
beanstalk/approval not approved yet
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 5s
3a1aa3170c
Address BeanBot review feedback (L1-L3) and Beanstalk Tier-1 regressions on PR #2948:

- L1 (vk_draw.cpp, vk_progcache.cpp, vk_internal.h): Evict destroyed
  VkPipelineLayout handles via db_layout_evict() before vkDestroyPipelineLayout
  in program_cache_borrow / program_cache_borrow_all (and turf_population_pipeline),
  use insert_or_assign in ensure_layout, and bump db_layout_epoch so worker
  thread-local DbLayoutCache entries invalidate before handle reuse.
- L2 (vk_main.cpp): Extract desc_buffer_supported() and require
  VkPhysicalDeviceDescriptorBufferPropertiesEXT::combinedImageSamplerDescriptorSingleArray
  == VK_TRUE, cleanly disabling dev.descriptor_buffer when false.
- L3 (vk_draw.cpp): Add VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT |
  VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT to zero_buffer and guard
  init_null_db_descriptors() when !dev.null_descriptor && !zero_address.
- Correctness & RADV/AMD perf (vk_draw.cpp):
  * Track DescWriter::db_gen / db_copy_off so mesh-fallback UBO-delta updates
    rebind GRAPHICS after COMPUTE clears db_dirty without double-copying.
  * Support up to 64-byte hardware descriptors in UbLargeRawCache / SbRawCache /
    CisRawCache (fixing cache bypass on RADV 16B UBO and 64B CIS descriptors).
  * Remove dedicated=true from db_insert() 256 KB ring chunks to avoid 48
    separate kernel memory allocations.
- Default opt-in (switches.def, vk_main.cpp): Make RX_VK_DESC_BUFFER an opt-in
  attempt switch (=0 default, =1 enables) after Beanstalk Tier-1 runs showed
  regressions on non-ReBAR NVIDIA (GTX 1070 +24%) and RADV (+0.6% to +129% p99)
  versus push descriptors, eliminating default memory/perf cost (L4/L5).
- Tests (tests/test_vk_desc_buffer.py): Verify L1/L2/L3, raw caches, and
  fallback UBO-delta bind behavior under clang++ and g++ (-Wall -Wextra -Werror).

Assisted-by: Antigravity (Google DeepMind)
Author
Contributor

Addressed the BeanBot review items and Beanstalk Tier-1 findings in 3a1aa3170:

  • L1 (vk_draw.cpp, vk_progcache.cpp, vk_internal.h): Added db_layout_evict() before vkDestroyPipelineLayout in program_cache_borrow / program_cache_borrow_all (and turf_population_pipeline), switched ensure_layout from emplace to insert_or_assign, and added an atomic db_layout_epoch to invalidate thread-local DbLayoutCache entries on eviction. This prevents stale layout sizes/offsets when drivers reuse VkPipelineLayout handles after warm-up/precompilation (root cause of the Beanstalk crashes and screenshot.max_diff failures).
  • L2 (vk_main.cpp): Added desc_buffer_supported() requiring VkPhysicalDeviceDescriptorBufferPropertiesEXT::combinedImageSamplerDescriptorSingleArray == VK_TRUE, cleanly disabling dev.descriptor_buffer when false.
  • L3 (vk_draw.cpp): Added VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT to zero_buffer and guarded init_null_db_descriptors() when !dev.null_descriptor && !zero_address.
  • Fallback UBO-delta & RADV/AMD fixes (vk_draw.cpp): Tracked DescWriter::db_gen / db_copy_off so mesh-fallback COMPUTE + GRAPHICS binds share one descriptor copy and never skip GRAPHICS rebinds after UBO delta updates; extended UbLargeRawCache / SbRawCache / CisRawCache to 64-byte descriptors (fixing cache bypass on RADV 16B UBO and 64B CIS descriptors); removed dedicated = true from db_insert() 256 KB ring chunks.
  • L4/L5 & Beanstalk regressions (switches.def, vk_main.cpp): Beanstalk across 8 Tier-1 systems showed VK_EXT_descriptor_buffer regressed non-ReBAR NVIDIA (GTX 1070 +24%) and RADV (RX 9070 XT +0.6..1.3%, RX 7900 XTX +8.3%), and was flat on RTX 3090 / Windows AMD. Changed RX_VK_DESC_BUFFER to opt-in (attempt, default off; =1 enables when supported), eliminating default memory/perf cost across Tier-1 hardware while keeping the opt-in path fixed and verified (tests/test_vk_desc_buffer.py under clang++/g++ -Wall -Wextra -Werror, plus live 25 s RX_VK_DESC_BUFFER=1 Windows RTX 4060 market run: 1555 frames, RUN_ERROR=None, 0 crashes).
Addressed the BeanBot review items and Beanstalk Tier-1 findings in `3a1aa3170`: - **L1 (`vk_draw.cpp`, `vk_progcache.cpp`, `vk_internal.h`):** Added `db_layout_evict()` before `vkDestroyPipelineLayout` in `program_cache_borrow` / `program_cache_borrow_all` (and `turf_population_pipeline`), switched `ensure_layout` from `emplace` to `insert_or_assign`, and added an atomic `db_layout_epoch` to invalidate thread-local `DbLayoutCache` entries on eviction. This prevents stale layout sizes/offsets when drivers reuse `VkPipelineLayout` handles after warm-up/precompilation (root cause of the Beanstalk crashes and `screenshot.max_diff` failures). - **L2 (`vk_main.cpp`):** Added `desc_buffer_supported()` requiring `VkPhysicalDeviceDescriptorBufferPropertiesEXT::combinedImageSamplerDescriptorSingleArray == VK_TRUE`, cleanly disabling `dev.descriptor_buffer` when false. - **L3 (`vk_draw.cpp`):** Added `VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT` to `zero_buffer` and guarded `init_null_db_descriptors()` when `!dev.null_descriptor && !zero_address`. - **Fallback UBO-delta & RADV/AMD fixes (`vk_draw.cpp`):** Tracked `DescWriter::db_gen` / `db_copy_off` so mesh-fallback `COMPUTE` + `GRAPHICS` binds share one descriptor copy and never skip `GRAPHICS` rebinds after UBO delta updates; extended `UbLargeRawCache` / `SbRawCache` / `CisRawCache` to 64-byte descriptors (fixing cache bypass on RADV 16B UBO and 64B CIS descriptors); removed `dedicated = true` from `db_insert()` 256 KB ring chunks. - **L4/L5 & Beanstalk regressions (`switches.def`, `vk_main.cpp`):** Beanstalk across 8 Tier-1 systems showed `VK_EXT_descriptor_buffer` regressed non-ReBAR NVIDIA (`GTX 1070 +24%`) and RADV (`RX 9070 XT +0.6..1.3%`, `RX 7900 XTX +8.3%`), and was flat on `RTX 3090` / Windows AMD. Changed `RX_VK_DESC_BUFFER` to opt-in (`attempt`, default off; `=1` enables when supported), eliminating default memory/perf cost across Tier-1 hardware while keeping the opt-in path fixed and verified (`tests/test_vk_desc_buffer.py` under `clang++`/`g++` `-Wall -Wextra -Werror`, plus live 25 s `RX_VK_DESC_BUFFER=1` Windows RTX 4060 `market` run: 1555 frames, `RUN_ERROR=None`, 0 crashes).
Member

Beanstalk test farm

Commit 3a1aa31 · approved by nobody yet · dashboard

A member of BigBeans can review this commit and comment @Beanstalk to test it.

<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `3a1aa31` · approved by nobody yet · [dashboard](https://beanstalk.magicbean.dev/prs/2948) A member of `BigBeans` can review this commit and comment `@Beanstalk` to test it.
dyst left a comment

Recommendation: Request changes. Since 3a1aa3170 the descriptor-buffer path is off by default, so players get nothing from it, while the PR still adds about 1,000 lines of a second descriptor path to vk_draw.cpp. The only test of the head is one 25 s smoke run. At 24f551717 the farm measured regressions and crashes on the hardware where the path turns on. The description still says it ships on, and the branch conflicts with main.

What it does: game draws can write raw descriptors into mapped descriptor-buffer rings (VK_EXT_descriptor_buffer) instead of pushing them on every draw. This only happens with RX_VK_DESC_BUFFER=1 on drivers that have the extension, buffer device address, imageLayoutIgnored and combinedImageSamplerDescriptorSingleArray. At the default, the game still uses push descriptors and pools, as on main.

Does it help: No by default (the path is off), and Unproven when switched on. The +3.27% Market average comes from the author's RTX 4060 at 24f551717, not the head. Beanstalk's run of that commit had these results with the path on, against main:

  • windows+nvidia (GTX 1070, RTX 3090): Market median frame time +12%, Forest +14%.
  • nvidia (4070 Ti SUPER, 5070 Ti): Forest worst 1% went from 7.1 to 35.9 ms.
  • linux+radv: Forest p99 +264%.
  • Crashes on both NVIDIA targets, and picture differences on every target.

Commit 3a1aa3170 says the crashes and pictures came from the layout-handle bug (BeanBot's L1). Nothing has measured or run the head on the farm yet: its sticky comment says it is "approved by nobody yet".

Other systems: When the path is on, it covers every game graphics, compute and mesh-fallback pipeline. When it is off, the default path still changes:

  • build_descriptors now builds the push writes only under need_writes/sm_mode.
  • Every gpu_buffer_bind result carries a device address.
  • zero_buffer gains texel and device-address usage on every device.

In the farm's RX_VK_DESC_BUFFER=0 cell on nvidia (the push path players get), the picture check failed (0.2 to 0.7 against main) and Market's worst 1% was +54%. That was at the old head, but these default-path changes are still in this one. No run shows the default path matches main at the head.
Switches: RX_VK_DESC_BUFFER (attempt, default off; =1 turns it on where the device supports it). Off is the right default given the farm numbers. But a perf path that players would have to switch on themselves, with no platform measured to gain, isn't a reason to merge it.
Reviewed: 3a1aa3170 against 4908cc6da (its merge base).

  • Read: the full diffs of vk_main.cpp, vk_memory.cpp, vk_progcache.cpp, vk_internal.h, vk_work.h, vk_replay.cpp, vk_loader.h and switches.def.
  • Read in vk_draw.cpp: the layout cache (db_layout_of, ensure_layout, db_layout_evict), bind_descriptors_db, descriptors_disturbed/CmdBound, draw_begin_recording, the zero buffer, and the storage-buffer and texel parts of build_descriptors.
  • Not read: the raw descriptor caches (UbRawCache/SbRawCache/CisRawCache), update_ubo_descriptors, the uniform_range changes, vk_recorder.h, vk_texture.cpp, and the tests (test_vk_desc_buffer.py, recorder and admission tests).
  • Nothing run.
    Fixed in this review: nothing.
    Checked and fine:
  • BeanBot's L2 is fixed: desc_buffer_supported() requires combinedImageSamplerDescriptorSingleArray, imageLayoutIgnored, buffer device address, a power-of-two offset alignment, descriptor sizes of at most 64 bytes and the five entry points.
  • BeanBot's L3 is fixed: zero_buffer has both texel usage bits, and query_buf_addr returns 0 without buffer device address.
  • BeanBot's L1 is fixed in effect: ensure_layout now uses insert_or_assign and bumps db_layout_epoch when a handle comes back, so a reused handle gets new offsets and the per-thread caches empty.
  • With the switch unset, the extension and feature are only asked for when FSR 4 wants them, as on main (fsr_descriptor_buffer keeps its value).
  • descriptors_disturbed() and reset_keeping_index() forget the bound descriptor buffer and offsets, and draw_begin_recording calls descriptors_disturbed(), so a new command buffer binds the buffer again.
  • VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT is set on every game pipeline path: compute_pipeline_info, gpl_link, build_graphics and its library parts, and fallback_compute_pipelines.
  • The new CallKind entries and call_kind_names stay in the same order.
  • BeanBot's L4 and L5 are answered by making the switch opt-in.

Blocking

  1. gpu/vk/switches.def:381: there is no measured gain where the path would ship. The fix commit turned it off by default after the farm's regressions, so the PR now carries a second descriptor path, four per-thread caches and a descriptor ring that no player runs by default. Every later change to build_descriptors would have to keep both paths right. The fix: run Beanstalk on 3a1aa3170 with RX_VK_DESC_BUFFER=1 against =0 and main, on the same targets as before. If a platform shows a clean, interleaved win with no crash or picture difference (the RTX 4060 class looked like one), turn it on there only, chosen in the device policy by vendor and driver from those numbers. If none does, close the PR and keep the findings in an issue.

  2. The description doesn't match the head:

    • Summary, Measurements ("ships on by default (1)") and Risks ("Allocates ~12 MB ... BAR0") still describe the old default-on behaviour.
    • Every number is from 24f551717.
    • Still to test lists the AMD and Linux runs that the farm has already run, and they failed.

    Rewrite it for the opt-in switch, move the farm's results into Measurements (the regressions too), and say what has run at the head (the 25 s =1 smoke run).

  3. The branch conflicts with main: rebase it. Then show the default path is unchanged at the new head, because the farm's =0 cell on nvidia failed the picture check against main at the old head (see Other systems). The farm run in point 1 does this if it compares =0 against main.

Suggestions

  • gpu/vk/vk_draw.cpp:12627 (at the head): the compute warm-up (warm_compute) still destroys p.layout without db_layout_evict. This is the site BeanBot's L1 named. insert_or_assign keeps a reused handle correct, but each warmed compute leaves its DbLayout in db_layouts until the handle comes back. Call db_layout_evict(p.layout) there, as program_cache_borrow now does.
  • db_layout_evict bumps the global epoch on every eviction. Each recording thread then clears its 16 KB DbLayoutCache at its next lookup, so a precompile pass that borrows thousands of programs keeps emptying those caches while the game plays. A per-entry generation, or bumping only when the evicted handle was ever looked up, would avoid that.

Testing:

  • Author: an RTX 4060 interleaved A/B (3 pairs × 30 s) and a memory check, both at 24f551717, and a 25 s =1 Market smoke run at the head. Game-free checks pass on the author's PC.
  • Beanstalk at 24f551717: failed on all four targets that finished (crashes, pictures, frame times); intel couldn't be judged.
  • Missing: any farm run at 3a1aa3170, and a default-path check against main after the rebase. These hold the merge.

Overlaps and merge order:

  • Overlapping open PRs: #3080, #2816, #2515, #1334, #3116 and #2072. #2920 (per-thread texture, sampler and SSBO descriptor memos) and #2210 (RX_VK_DESC_SECTIONS) also change build_descriptors/bind_descriptors; #2899 has already merged.
  • Whichever of these merges first means rebasing the others. A default-off path that adds this much to build_descriptors would go last.
  • I didn't compare their diffs here.
**Recommendation: Request changes.** Since 3a1aa3170 the descriptor-buffer path is off by default, so players get nothing from it, while the PR still adds about 1,000 lines of a second descriptor path to `vk_draw.cpp`. The only test of the head is one 25 s smoke run. At 24f551717 the farm measured regressions and crashes on the hardware where the path turns on. The description still says it ships on, and the branch conflicts with `main`. What it does: game draws can write raw descriptors into mapped descriptor-buffer rings (`VK_EXT_descriptor_buffer`) instead of pushing them on every draw. This only happens with `RX_VK_DESC_BUFFER=1` on drivers that have the extension, buffer device address, `imageLayoutIgnored` and `combinedImageSamplerDescriptorSingleArray`. At the default, the game still uses push descriptors and pools, as on `main`. **Does it help:** No by default (the path is off), and Unproven when switched on. The +3.27% Market average comes from the author's RTX 4060 at 24f551717, not the head. Beanstalk's run of that commit had these results with the path on, against `main`: - windows+nvidia (GTX 1070, RTX 3090): Market median frame time +12%, Forest +14%. - nvidia (4070 Ti SUPER, 5070 Ti): Forest worst 1% went from 7.1 to 35.9 ms. - linux+radv: Forest p99 +264%. - Crashes on both NVIDIA targets, and picture differences on every target. Commit 3a1aa3170 says the crashes and pictures came from the layout-handle bug (BeanBot's L1). Nothing has measured or run the head on the farm yet: its sticky comment says it is "approved by nobody yet". **Other systems:** When the path is on, it covers every game graphics, compute and mesh-fallback pipeline. When it is off, the default path still changes: - `build_descriptors` now builds the push writes only under `need_writes`/`sm_mode`. - Every `gpu_buffer_bind` result carries a device address. - `zero_buffer` gains texel and device-address usage on every device. In the farm's `RX_VK_DESC_BUFFER=0` cell on `nvidia` (the push path players get), the picture check failed (0.2 to 0.7 against `main`) and Market's worst 1% was +54%. That was at the old head, but these default-path changes are still in this one. No run shows the default path matches `main` at the head. **Switches:** `RX_VK_DESC_BUFFER` (`attempt`, default off; `=1` turns it on where the device supports it). Off is the right default given the farm numbers. But a perf path that players would have to switch on themselves, with no platform measured to gain, isn't a reason to merge it. **Reviewed:** 3a1aa3170 against 4908cc6da (its merge base). - Read: the full diffs of `vk_main.cpp`, `vk_memory.cpp`, `vk_progcache.cpp`, `vk_internal.h`, `vk_work.h`, `vk_replay.cpp`, `vk_loader.h` and `switches.def`. - Read in `vk_draw.cpp`: the layout cache (`db_layout_of`, `ensure_layout`, `db_layout_evict`), `bind_descriptors_db`, `descriptors_disturbed`/`CmdBound`, `draw_begin_recording`, the zero buffer, and the storage-buffer and texel parts of `build_descriptors`. - Not read: the raw descriptor caches (`UbRawCache`/`SbRawCache`/`CisRawCache`), `update_ubo_descriptors`, the `uniform_range` changes, `vk_recorder.h`, `vk_texture.cpp`, and the tests (`test_vk_desc_buffer.py`, recorder and admission tests). - Nothing run. **Fixed in this review:** nothing. **Checked and fine:** - BeanBot's L2 is fixed: `desc_buffer_supported()` requires `combinedImageSamplerDescriptorSingleArray`, `imageLayoutIgnored`, buffer device address, a power-of-two offset alignment, descriptor sizes of at most 64 bytes and the five entry points. - BeanBot's L3 is fixed: `zero_buffer` has both texel usage bits, and `query_buf_addr` returns 0 without buffer device address. - BeanBot's L1 is fixed in effect: `ensure_layout` now uses `insert_or_assign` and bumps `db_layout_epoch` when a handle comes back, so a reused handle gets new offsets and the per-thread caches empty. - With the switch unset, the extension and feature are only asked for when FSR 4 wants them, as on `main` (`fsr_descriptor_buffer` keeps its value). - `descriptors_disturbed()` and `reset_keeping_index()` forget the bound descriptor buffer and offsets, and `draw_begin_recording` calls `descriptors_disturbed()`, so a new command buffer binds the buffer again. - `VK_PIPELINE_CREATE_DESCRIPTOR_BUFFER_BIT_EXT` is set on every game pipeline path: `compute_pipeline_info`, `gpl_link`, `build_graphics` and its library parts, and `fallback_compute_pipelines`. - The new `CallKind` entries and `call_kind_names` stay in the same order. - BeanBot's L4 and L5 are answered by making the switch opt-in. **Blocking** 1. `gpu/vk/switches.def:381`: there is no measured gain where the path would ship. The fix commit turned it off by default after the farm's regressions, so the PR now carries a second descriptor path, four per-thread caches and a descriptor ring that no player runs by default. Every later change to `build_descriptors` would have to keep both paths right. The fix: run Beanstalk on 3a1aa3170 with `RX_VK_DESC_BUFFER=1` against `=0` and `main`, on the same targets as before. If a platform shows a clean, interleaved win with no crash or picture difference (the RTX 4060 class looked like one), turn it on there only, chosen in the device policy by vendor and driver from those numbers. If none does, close the PR and keep the findings in an issue. 2. The description doesn't match the head: - Summary, Measurements ("ships on by default (`1`)") and Risks ("Allocates ~12 MB ... BAR0") still describe the old default-on behaviour. - Every number is from 24f551717. - Still to test lists the AMD and Linux runs that the farm has already run, and they failed. Rewrite it for the opt-in switch, move the farm's results into Measurements (the regressions too), and say what has run at the head (the 25 s `=1` smoke run). 3. The branch conflicts with `main`: rebase it. Then show the default path is unchanged at the new head, because the farm's `=0` cell on `nvidia` failed the picture check against `main` at the old head (see Other systems). The farm run in point 1 does this if it compares `=0` against `main`. **Suggestions** - `gpu/vk/vk_draw.cpp:12627` (at the head): the compute warm-up (`warm_compute`) still destroys `p.layout` without `db_layout_evict`. This is the site BeanBot's L1 named. `insert_or_assign` keeps a reused handle correct, but each warmed compute leaves its `DbLayout` in `db_layouts` until the handle comes back. Call `db_layout_evict(p.layout)` there, as `program_cache_borrow` now does. - `db_layout_evict` bumps the global epoch on every eviction. Each recording thread then clears its 16 KB `DbLayoutCache` at its next lookup, so a precompile pass that borrows thousands of programs keeps emptying those caches while the game plays. A per-entry generation, or bumping only when the evicted handle was ever looked up, would avoid that. **Testing:** - Author: an RTX 4060 interleaved A/B (3 pairs × 30 s) and a memory check, both at 24f551717, and a 25 s `=1` Market smoke run at the head. Game-free checks pass on the author's PC. - Beanstalk at 24f551717: failed on all four targets that finished (crashes, pictures, frame times); `intel` couldn't be judged. - Missing: any farm run at 3a1aa3170, and a default-path check against `main` after the rebase. These hold the merge. **Overlaps and merge order:** - Overlapping open PRs: #3080, #2816, #2515, #1334, #3116 and #2072. #2920 (per-thread texture, sampler and SSBO descriptor memos) and #2210 (`RX_VK_DESC_SECTIONS`) also change `build_descriptors`/`bind_descriptors`; #2899 has already merged. - Whichever of these merges first means rebasing the others. A default-off path that adds this much to `build_descriptors` would go last. - I didn't compare their diffs here.
Some checks are pending
beanstalk/approval not approved yet
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 5s
This pull request has changes conflicting with the target branch.
  • gpu/vk/vk_draw.cpp
  • gpu/vk/vk_memory.cpp
  • gpu/vk/vk_recorder.h
  • gpu/vk/vk_replay.cpp
  • gpu/vk/vk_work.h
  • tests/recorder_sync_test.cpp
  • tests/recording_admission_test.cpp
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'perf/vk-descriptor-buffer:siantm-perf/vk-descriptor-buffer'
git switch 'siantm-perf/vk-descriptor-buffer'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2948
No description provided.