WIP: perf(vk): a handle table's places in the resolved handles' table asked for at once #2058

Draft
siantm wants to merge 2 commits from siantm/Longshot:perf/vk-hit-prefetch into main
Contributor

Summary

A texture binding that is a handle table (an array whose elements' handles a program computes, such as the clustered lights) looks every element up in texture_view_of's table, a cache miss a lookup, one after another. build_descriptors (gpu/vk/vk_draw.cpp) now asks for each element's home place (HitTable::prefetch, both lines of the 40-byte place) right after stage_handles has read the table's handles, keyed as texture_view_of keys the lookups that follow. A hint only: the table and the descriptors are the same. Only with the flat table on. The result expected is a shorter build for programs with handle tables.

Depends on #2003 (the flat table, HitTable): its commit shows in this diff until it merges.

No switch of its own: RX_VK_TEX_HIT_FLAT=0 turns the table and these prefetches off (main's map).

From f61b2820 on exp/x86-asm-sync.

Read first: HitTable::prefetch and the prefetch after stage_handles in build_descriptors (gpu/vk/vk_draw.cpp).

Testing

Tested: Windows 11, i7-9700, RTX 4060, the builder's llvm-mingw clang 23; head 71994e67 on #2003's head 9fd4c4b4 (on main @ 75317e1f). Every check ran through tests/run_all.py --strict --exact in build jobs of the PC's job queue, in a hidden console (log t-dc4-vk-hit-prefetch):

  • Its own: tests/test_hit_prefetch.py (new: prefetches leave every place as it was; the prefetch's place and key in build_descriptors): pass.
  • The 162 checks that read a file this change touches (--changed 9fd4c4b4; its own are among them): 146 passed, 16 failed. Failed: tests/test_fsr_uniform_ownership.py, tests/test_sampler_admission.py, tests/test_pipeline_play_cache.py, tests/test_draw_stream_visibility.py, tests/test_device_lost_exit.py, tests/test_dev_packs.py, tests/test_draw_binds.py, tests/test_frame_overlap.py, tests/test_linux_pressure.py, tests/test_mesh_conv.py, tests/test_prepare_cache_save.py, tests/test_recorder_own_idle.py, tests/test_upscaler_rows.py, tests/test_vk_occlusion_queries.py: each fails on main @ 75317e1f too (the same checks on main in the batch before, log t-dc3-base). tests/test_recording_admission.py fails on main @ 75317e1f too, now and then: its "worker slot ownership" case failed on main in 7 of 10 runs made alternately with this branch's (logs t-dc5-base-ra-*), with the same message. tests/test_pipeline_cache_save.py also failed in that run, stopped at its 60-second limit, and passed when run again on this head (log t-dc5-vk-hit-prefetch-ra1).

It has NOT run in the game on this PC yet.

Still to test:

  • Windows 11, i7-9700, RTX 4060 (this PC): start in Kokiri Forest from the scene's save, play a minute (walking, turning the camera), #2003's head against this PR, each warmed a minute in the scene first, then interleaved (base, this PR, this PR, base), two runs each, expecting the same picture (the lights included) and the replay's time a frame the same as or lower than the base's (by hand)
  • Linux NVIDIA and AMD, Windows AMD and Intel, Steam Deck: start in Kokiri Forest from the scene's save, play a minute (walking, turning the camera), the flat table's PR alone against this PR, warmed, in ABBA order, expecting the same picture every way and no crash or validation error (@Beanstalk linux+nvidia, linux+amd, windows+amd, windows+intel, steamdeck: Kokiri Forest a minute, the flat table's PR alone against this PR, ABBA, the same picture)
  • Linux (any GPU): build the renderer and run tests/test_hit_prefetch.py with --cxx g++ and --cxx clang++, expecting PASS (by hand)

Measurements

Verdict: with the table's places out of the caches a lookup takes 1.29-1.50x less time (7-18 ns an element) for tables of 8-128 elements, 1.09-1.13x for 2; with the places in cache it is still 1.08-1.13x quicker. How often the places are out of cache in play is not measured. A micro-benchmark on authored input; not measured in play.

Baseline: #2003's head 9fd4c4b4 (main @ 75317e1f with the flat table, HitTable, which this PR depends on: main has no HitTable).

Micro-benchmark (vk_hit_prefetch_bench.py: a script on this PC, not in this PR): HitSlot and HitTable cut out of vk_draw.cpp at both commits, each filled with the same 40,000 authored keys (131,072 places, 5 MB); handle tables looked up as build_descriptors does (the new side prefetching every element's place first), each lookup followed by an authored amount of dependent work (rounds of a multiply-xorshift, a stand-in for the rest of texture_view_of); 2,048 elements a repetition; three rounds run alone in this PC's job queue (2026-11-22, 01:21-01:23 UTC; log bench-vk-walks.log), the builder's llvm-mingw clang 23.1.5 at -O2 for baseline x86-64 and at -O2 -march=native (this PC's i7-9700, as the game is built here), 301 repetitions a case, old and new taking turns on the same authored inputs, their results equal at every repetition. Each cell: ns per element, the median of the three rounds' medians, in parentheses the lowest and highest of them; Δ: old over new (above 1, this PR is quicker).

Case (input; build) Before: #2003's head @ 9fd4c4b4 After: this PR @ 71994e67 Δ (old/new)
cold-c8-work24: places flushed from every cache, 8-element tables, 24 rounds a lookup; x86-64 baseline 55.71 ns (55.66-56.35) 37.26 ns (37.26-37.45) 1.50x
cold-c8-work24: places flushed from every cache, 8-element tables, 24 rounds a lookup; -march=native 54.93 ns (54.93-55.37) 36.96 ns (36.82-37.16) 1.49x
cold-c32-work24: flushed, 32-element tables, 24 rounds; x86-64 baseline 55.27 ns (55.23-55.37) 38.33 ns (38.28-38.43) 1.44x
cold-c32-work24: flushed, 32-element tables, 24 rounds; -march=native 54.44 ns (54.35-54.83) 37.60 ns (37.50-37.89) 1.45x
cold-c128-work24: flushed, 128-element tables, 24 rounds; x86-64 baseline 53.81 ns (53.42-53.95) 40.58 ns (40.28-40.62) 1.33x
cold-c128-work24: flushed, 128-element tables, 24 rounds; -march=native 52.78 ns (52.59-52.88) 39.75 ns (39.65-39.89) 1.33x
cold-c32-work0: flushed, 32-element tables, no work; x86-64 baseline 31.54 ns (31.40-31.74) 24.36 ns (24.12-24.41) 1.29x
cold-c32-work0: flushed, 32-element tables, no work; -march=native 31.30 ns (31.20-31.49) 24.07 ns (23.98-24.17) 1.30x
cold-c2-work24: flushed, 2-element tables, 24 rounds; x86-64 baseline 58.35 ns (58.15-59.08) 51.51 ns (51.51-52.25) 1.13x
cold-c2-work24: flushed, 2-element tables, 24 rounds; -march=native 57.03 ns (56.45-57.18) 52.39 ns (51.85-52.59) 1.09x
warm-c32-work24: places in cache, 32-element tables, 24 rounds; x86-64 baseline 26.22 ns (26.12-26.46) 23.29 ns (23.24-23.34) 1.13x
warm-c32-work24: places in cache, 32-element tables, 24 rounds; -march=native 24.61 ns (24.56-25.20) 22.80 ns (22.70-23.05) 1.08x

Risks

None for the picture: a prefetch changes no value. It could cost a little where the places were already in cache. Turned off with the table by RX_VK_TEX_HIT_FLAT=0, or a revert. The renderer is compiled again after updating.

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. Not yet: it has not run in the game.
  • mise run test passes (any failure that also fails on main is named). Not yet: only the checks in Testing ran.
  • Measured against main, or Measurements says why there is nothing to measure. Not yet (Measurements).
  • 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. Its row is in; not measured yet.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Not yet: only the checks' cuts compiled (Testing).
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
## Summary A texture binding that is a handle table (an array whose elements' handles a program computes, such as the clustered lights) looks every element up in `texture_view_of`'s table, a cache miss a lookup, one after another. `build_descriptors` (`gpu/vk/vk_draw.cpp`) now asks for each element's home place (`HitTable::prefetch`, both lines of the 40-byte place) right after `stage_handles` has read the table's handles, keyed as `texture_view_of` keys the lookups that follow. A hint only: the table and the descriptors are the same. Only with the flat table on. The result expected is a shorter build for programs with handle tables. Depends on #2003 (the flat table, `HitTable`): its commit shows in this diff until it merges. No switch of its own: `RX_VK_TEX_HIT_FLAT=0` turns the table and these prefetches off (main's map). From f61b2820 on `exp/x86-asm-sync`. Read first: `HitTable::prefetch` and the prefetch after `stage_handles` in `build_descriptors` (`gpu/vk/vk_draw.cpp`). ## Testing **Tested:** Windows 11, i7-9700, RTX 4060, the builder's llvm-mingw clang 23; head 71994e67 on #2003's head 9fd4c4b4 (on main @ 75317e1f). Every check ran through `tests/run_all.py --strict --exact` in build jobs of the PC's job queue, in a hidden console (log `t-dc4-vk-hit-prefetch`): - Its own: `tests/test_hit_prefetch.py` (new: prefetches leave every place as it was; the prefetch's place and key in `build_descriptors`): pass. - The 162 checks that read a file this change touches (`--changed 9fd4c4b4`; its own are among them): 146 passed, 16 failed. Failed: `tests/test_fsr_uniform_ownership.py`, `tests/test_sampler_admission.py`, `tests/test_pipeline_play_cache.py`, `tests/test_draw_stream_visibility.py`, `tests/test_device_lost_exit.py`, `tests/test_dev_packs.py`, `tests/test_draw_binds.py`, `tests/test_frame_overlap.py`, `tests/test_linux_pressure.py`, `tests/test_mesh_conv.py`, `tests/test_prepare_cache_save.py`, `tests/test_recorder_own_idle.py`, `tests/test_upscaler_rows.py`, `tests/test_vk_occlusion_queries.py`: each fails on main @ 75317e1f too (the same checks on main in the batch before, log `t-dc3-base`). `tests/test_recording_admission.py` fails on main @ 75317e1f too, now and then: its "worker slot ownership" case failed on main in 7 of 10 runs made alternately with this branch's (logs `t-dc5-base-ra-*`), with the same message. `tests/test_pipeline_cache_save.py` also failed in that run, stopped at its 60-second limit, and passed when run again on this head (log `t-dc5-vk-hit-prefetch-ra1`). It has NOT run in the game on this PC yet. **Still to test:** - Windows 11, i7-9700, RTX 4060 (this PC): start in Kokiri Forest from the scene's save, play a minute (walking, turning the camera), #2003's head against this PR, each warmed a minute in the scene first, then interleaved (base, this PR, this PR, base), two runs each, expecting the same picture (the lights included) and the replay's time a frame the same as or lower than the base's (by hand) - Linux NVIDIA and AMD, Windows AMD and Intel, Steam Deck: start in Kokiri Forest from the scene's save, play a minute (walking, turning the camera), the flat table's PR alone against this PR, warmed, in ABBA order, expecting the same picture every way and no crash or validation error (@Beanstalk linux+nvidia, linux+amd, windows+amd, windows+intel, steamdeck: Kokiri Forest a minute, the flat table's PR alone against this PR, ABBA, the same picture) - Linux (any GPU): build the renderer and run `tests/test_hit_prefetch.py` with `--cxx g++` and `--cxx clang++`, expecting PASS (by hand) ## Measurements **Verdict:** with the table's places out of the caches a lookup takes 1.29-1.50x less time (7-18 ns an element) for tables of 8-128 elements, 1.09-1.13x for 2; with the places in cache it is still 1.08-1.13x quicker. How often the places are out of cache in play is not measured. A micro-benchmark on authored input; not measured in play. **Baseline:** #2003's head 9fd4c4b4 (main @ 75317e1f with the flat table, `HitTable`, which this PR depends on: main has no `HitTable`). Micro-benchmark (`vk_hit_prefetch_bench.py`: a script on this PC, not in this PR): `HitSlot` and `HitTable` cut out of `vk_draw.cpp` at both commits, each filled with the same 40,000 authored keys (131,072 places, 5 MB); handle tables looked up as `build_descriptors` does (the new side prefetching every element's place first), each lookup followed by an authored amount of dependent work (rounds of a multiply-xorshift, a stand-in for the rest of `texture_view_of`); 2,048 elements a repetition; three rounds run alone in this PC's job queue (2026-11-22, 01:21-01:23 UTC; log `bench-vk-walks.log`), the builder's llvm-mingw clang 23.1.5 at -O2 for baseline x86-64 and at -O2 -march=native (this PC's i7-9700, as the game is built here), 301 repetitions a case, old and new taking turns on the same authored inputs, their results equal at every repetition. Each cell: ns per element, the median of the three rounds' medians, in parentheses the lowest and highest of them; Δ: old over new (above 1, this PR is quicker). | Case (input; build) | Before: #2003's head @ 9fd4c4b4 | After: this PR @ 71994e67 | Δ (old/new) | |---|---|---|---| | cold-c8-work24: places flushed from every cache, 8-element tables, 24 rounds a lookup; x86-64 baseline | 55.71 ns (55.66-56.35) | 37.26 ns (37.26-37.45) | 1.50x | | cold-c8-work24: places flushed from every cache, 8-element tables, 24 rounds a lookup; -march=native | 54.93 ns (54.93-55.37) | 36.96 ns (36.82-37.16) | 1.49x | | cold-c32-work24: flushed, 32-element tables, 24 rounds; x86-64 baseline | 55.27 ns (55.23-55.37) | 38.33 ns (38.28-38.43) | 1.44x | | cold-c32-work24: flushed, 32-element tables, 24 rounds; -march=native | 54.44 ns (54.35-54.83) | 37.60 ns (37.50-37.89) | 1.45x | | cold-c128-work24: flushed, 128-element tables, 24 rounds; x86-64 baseline | 53.81 ns (53.42-53.95) | 40.58 ns (40.28-40.62) | 1.33x | | cold-c128-work24: flushed, 128-element tables, 24 rounds; -march=native | 52.78 ns (52.59-52.88) | 39.75 ns (39.65-39.89) | 1.33x | | cold-c32-work0: flushed, 32-element tables, no work; x86-64 baseline | 31.54 ns (31.40-31.74) | 24.36 ns (24.12-24.41) | 1.29x | | cold-c32-work0: flushed, 32-element tables, no work; -march=native | 31.30 ns (31.20-31.49) | 24.07 ns (23.98-24.17) | 1.30x | | cold-c2-work24: flushed, 2-element tables, 24 rounds; x86-64 baseline | 58.35 ns (58.15-59.08) | 51.51 ns (51.51-52.25) | 1.13x | | cold-c2-work24: flushed, 2-element tables, 24 rounds; -march=native | 57.03 ns (56.45-57.18) | 52.39 ns (51.85-52.59) | 1.09x | | warm-c32-work24: places in cache, 32-element tables, 24 rounds; x86-64 baseline | 26.22 ns (26.12-26.46) | 23.29 ns (23.24-23.34) | 1.13x | | warm-c32-work24: places in cache, 32-element tables, 24 rounds; -march=native | 24.61 ns (24.56-25.20) | 22.80 ns (22.70-23.05) | 1.08x | ## Risks None for the picture: a prefetch changes no value. It could cost a little where the places were already in cache. Turned off with the table by `RX_VK_TEX_HIT_FLAT=0`, or a revert. The renderer is compiled again after updating. ## Checklist ### Ready for review - [x] 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. Not yet: it has not run in the game. - [ ] `mise run test` passes (any failure that also fails on `main` is named). Not yet: only the checks in Testing ran. - [ ] Measured against `main`, or Measurements says why there is nothing to measure. Not yet (Measurements). - [x] 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`. Its row is in; not measured yet. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Not yet: only the checks' cuts compiled (Testing). - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers.
perf(vk): resolved texture handles in a flat table by era (RX_VK_TEX_HIT_FLAT, on)
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 11s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
9fd4c4b46e
texture_view_of keeps what each texture handle resolved to (view, texture, level) by slot, view type, use and
storage format. Main keeps them in handle_hits, a FlatMap (#231) whose entries each hold their own destroy
generation. This adds the branch's table beside it, behind a switch, so both can be compared in one build: one array
of 40-byte places (HitSlot) found by the key's hash, linear probing, at most half full; the destroy generation kept
once for the table as an `era` (a place resolved in an older era is stale, which is the map's "its generation is not
the one now", as the generation only goes up); the texture touched once a submission as before; a bound of 65536
keys at which it starts over (the map's bound). A miss is the same resolution as ever. The frame log gets a line
counting the table's hits, misses by reason and generation moves (draw_skip_report).

The frame log's counts of the table's lookups (`vk: a frame: ... texture handles kept as resolved`) are relaxed
atomics, each replay thread counting into them without a locked add (st_bump).

Switch: RX_VK_TEX_HIT_FLAT, kill, on by default (the branch's default); =0 (or false, off, no) is main's map. Read
once, at its first use. Row in gpu/vk/switches.def.
Its saving was not measured on the branch (2816697a: "unreviewed"); not measured in play.

Tests: tests/test_tex_hit_flat.py (new) cuts HitSlot and HitTable and runs them against a model of the map's rules
over random keys, slot re-registrations, generation moves (also inside a resolution), epochs, a tiny bound, the real
bound and an era wrap, reads texture_view_of for how it uses the table, and the switch's reader runs in fresh
processes (unset, 0, off, false, 1, on and another value, twice each, set again after its first read).
test_handle_lookup.py also checks the table is searched once and put once a lookup. test_flat_map.py compiles the
table with its cut and runs the map's branch (RX_VK_TEX_HIT_FLAT=0), which it compares against std::unordered_map.

Assisted-by: Claude Code
perf(vk): a handle table's places in the resolved handles' table asked for at once
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 29s
beanstalk/approval waiting for a BigBean's 👍 on the request
71994e67cd
A texture binding that is a handle table (an array whose elements' handles a program computes, as OoT's clustered
lights) looks every element up in texture_view_of's table, a cache miss a lookup, one after another.
build_descriptors now prefetches each element's home place (HitTable::prefetch, both lines of the 40-byte place)
right after stage_handles has read the table's handles, keyed as texture_view_of keys the lookups that follow. A
hint only: the table and the descriptors are the same. Only with the flat table on.

Needs "perf(vk): resolved texture handles in a flat table by era (RX_VK_TEX_HIT_FLAT, on)" first (HitTable).

Not measured for this port: no micro-benchmark, no run in play (the batch it came in on the branch, cc4c6c42,
showed no difference in play).

Test: tests/test_hit_prefetch.py cuts HitSlot and HitTable and checks prefetches leave every place as it was, and
reads build_descriptors for the prefetches' place and key. No switch of its own (RX_VK_TEX_HIT_FLAT's).

Assisted-by: Claude Code
Member

Possibly related, for context:

  • PR #107 fix(vk): OoT's clustered lights sample their own shadow maps (handle tables as descriptor arrays, from Lichii) — Earlier renderer work enabling clustered-light handle-table descriptor arrays; related context.
Possibly related, for context: - PR #107 fix(vk): OoT's clustered lights sample their own shadow maps (handle tables as descriptor arrays, from Lichii) — Earlier renderer work enabling clustered-light handle-table descriptor arrays; related context.
Author
Contributor

@Beanstalk This makes the renderer prefetch from its texture handle table during bindings (gpu/vk), behind RX_VK_TEX_HIT_FLAT from #2003, whose commit is in its diff; RX_VK_TEX_HIT_FLAT=0 is main's way. It has not run in the game on these PCs yet. Please play Kokiri Forest and Hyrule Field, two minutes each, the PR against main on the same PC, on the PR's side with RX_VK_TEX_HIT_FLAT=1 and with RX_VK_TEX_HIT_FLAT=0, with a picture in each compared with main's, on Linux with NVIDIA, Linux with AMD (RADV), Windows with Intel and the Steam Deck. The same picture as main, no crash, device lost, validation error or FATAL line; with it 1, frame time p99 equal to 0 or better; with it 0, as main's.

@Beanstalk This makes the renderer prefetch from its texture handle table during bindings (gpu/vk), behind RX_VK_TEX_HIT_FLAT from #2003, whose commit is in its diff; RX_VK_TEX_HIT_FLAT=0 is main's way. It has not run in the game on these PCs yet. Please play Kokiri Forest and Hyrule Field, two minutes each, the PR against main on the same PC, on the PR's side with RX_VK_TEX_HIT_FLAT=1 and with RX_VK_TEX_HIT_FLAT=0, with a picture in each compared with main's, on Linux with NVIDIA, Linux with AMD (RADV), Windows with Intel and the Steam Deck. The same picture as main, no crash, device lost, validation error or FATAL line; with it 1, frame time p99 equal to 0 or better; with it 0, as main's.
Member

@siantm only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@siantm only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
Author
Contributor

@Beanstalk This replaces my request 65775 on this head, so that it follows the farm's picture and hardware rules. This asks for a handle table's places in the resolved handles' table at once during texture bindings (gpu/vk), behind RX_VK_TEX_HIT_FLAT from #2003, on by default. It sits on #2003, so its diff against its merge base includes that PR's commits; the farm cannot take it as the comparison, so please compare with main. Please start from the kokiri-start save and take the picture right after it loads and settles, before any input, with a main-against-itself picture on the same PC at that point; then, for frame times only, play Kokiri Forest and Hyrule Field, two minutes each; at least two starts a side, interleaved, the PR against main on the same PC, on the PR's side unset (the default, on) and with RX_VK_TEX_HIT_FLAT=0 (off), on Windows with an RTX 4070, Windows with an Arc B580, Linux with an RX 6600 (RADV) and the Steam Deck. The same picture as main within main's own difference from itself; with it unset, frame time p99 equal to main's or better, within the run-to-run spread, and equal to RX_VK_TEX_HIT_FLAT=0 or better. The log must have no FATAL, device lost or validation error line.

@Beanstalk This replaces my request 65775 on this head, so that it follows the farm's picture and hardware rules. This asks for a handle table's places in the resolved handles' table at once during texture bindings (gpu/vk), behind RX_VK_TEX_HIT_FLAT from #2003, on by default. It sits on #2003, so its diff against its merge base includes that PR's commits; the farm cannot take it as the comparison, so please compare with main. Please start from the kokiri-start save and take the picture right after it loads and settles, before any input, with a main-against-itself picture on the same PC at that point; then, for frame times only, play Kokiri Forest and Hyrule Field, two minutes each; at least two starts a side, interleaved, the PR against main on the same PC, on the PR's side unset (the default, on) and with RX_VK_TEX_HIT_FLAT=0 (off), on Windows with an RTX 4070, Windows with an Arc B580, Linux with an RX 6600 (RADV) and the Steam Deck. The same picture as main within main's own difference from itself; with it unset, frame time p99 equal to main's or better, within the run-to-run spread, and equal to RX_VK_TEX_HIT_FLAT=0 or better. The log must have no FATAL, device lost or validation error line.
Member

@siantm only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@siantm only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
Author
Contributor

Measurements: a micro-benchmark on authored input (old against new, three rounds, x86-64 baseline and -march=native; not measured in play) and the Verdict rewritten to match.

Measurements: a micro-benchmark on authored input (old against new, three rounds, x86-64 baseline and -march=native; not measured in play) and the Verdict rewritten to match.
Author
Contributor

@Beanstalk One correction to my request 69704 above, for its picture point: please take each picture 5 s (300 frames at 60 fps) after the first frame whose picture is not a single uniform colour, with no input in between, and take the main-against-itself picture from the same point. A picture taken during the load's fade-in from black is not comparable: run 70269 on #2156 caught the fade in 3 of 4 starts.

@Beanstalk One correction to my request 69704 above, for its picture point: please take each picture 5 s (300 frames at 60 fps) after the first frame whose picture is not a single uniform colour, with no input in between, and take the main-against-itself picture from the same point. A picture taken during the load's fade-in from black is not comparable: run 70269 on #2156 caught the fade in 3 of 4 starts.
Member

@siantm only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@siantm only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 29s
beanstalk/approval waiting for a BigBean's 👍 on the request
This pull request is marked as a work in progress.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'perf/vk-hit-prefetch:siantm-perf/vk-hit-prefetch'
git switch 'siantm-perf/vk-hit-prefetch'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!2058
No description provided.