Commit Graph

10 Commits

Author SHA1 Message Date
9f98dcc617 Improve post-load GPU memory and pipeline handling (RT-POST-LOAD-GPU-MEMORY)
Fall back to a dedicated buffer allocation when the shared arena fills.
Update console descriptors and resource backing, preserve pipeline cache
entries, and replay mesh records using bounded indirect arguments. Keep
scripted input available until read and cover the runtime and translator
paths with synthetic tests.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-authored-by: ivanepsilondelta <264061546+ivanepsilondelta@users.noreply.github.com>
2026-11-25 14:30:51 -06:00
9538218ee3 vk_descriptor_bench, vk_sandbox: LEONIDA_VK_DEVICE names the GPU (TEST-1141)
Both tools ranked the devices themselves and ignored LEONIDA_VK_DEVICE,
so on a PC with two GPUs they ran on the best-ranked one whatever the
filter said. vk_sandbox now uses vk_device_pick.h's pick_device, and
vk_descriptor_bench skips devices the filter leaves out. When the filter
matches no usable device, both report it and fail the run, as the other
harnesses do.

check_device_filter_tools.py (ctest vk_device_filter_tools) runs both
tools with a filter that matches nothing and skips on a machine with no
Vulkan device.
2026-11-23 16:36:07 -05:00
27d94d0798 vk_descriptor_bench: --warmup-ms keeps the timed dispatch running for 300 ms before timing (TEST-277)
Five warm-up dispatches are too few to bring the GPU clocks up: with the old
default the first placement of --memory all read 30.4 us/1M (RTX 4050, 1k
uniform T# hit) against 23.3 for the same memory type measured warm. The new
--warmup-ms (default 300, 0 = off, --quick off) re-submits the command that is
about to be timed until the time has passed. Self-test covers the option.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 09:42:20 -05:00
2782aa7a6a perf(translator): defer descriptor index load to hit block in desc_probe
In `desc_probe` (`%desc_lookup_fn`), the bindless index word at `base + 9`
was loaded from the `%desc_map` storage buffer before the conditional branch
`OpBranchConditional %match %dl_hit %dl_next`.

On every non-matching slot probed as well as on 8-probe misses, this issued
an unnecessary global storage buffer load that was immediately discarded.
Moving the index load into `%dl_hit` eliminates up to 8 storage buffer reads
per miss and 1 read per non-matching collision slot, reducing memory traffic
and register pressure.

Mirrored the same deferred load structure in `runtime/test/vk_descriptor_bench.cpp`.
Added `test_desc_probe_defers_index_load_to_hit_block` to `tests/test_desc_cache.py`.
2026-11-22 18:00:09 +06:00
9806be2999 Tests: prefer the native Vulkan ICD over Mesa's Dozen on Windows
With the Compatibility Pack installed, Windows enumerates Mesa's D3D12
translation layer next to the real GPU, and Dozen reports DISCRETE_GPU. Every
harness used "the last discrete device wins", so it selected the wrapper and
the resulting failures looked like translator bugs (#915). One shared rank now
treats Microsoft's vendor as a translation layer, then prefers discrete over
integrated over virtual over CPU, keeping the first device on a tie. A CPU-only
test covers the reported enumeration without needing the Compatibility Pack.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-21 22:58:59 -06:00
c4459ae235 vk_descriptor_bench: skip a ReBAR placement the driver won't allocate, and say why any allocation fails
On an RTX 4080 SUPER (Windows 617.14) the host_device_local placement's memory type 4
(DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT) refuses a 160 KiB allocation with
VK_ERROR_OUT_OF_DEVICE_MEMORY. alloc_buffer_mt returned false without a word and the
placement loop exited 1, so a default run measured only the 1k table.

alloc_buffer_mt now reports the failing call and its VkResult. The optional ReBAR placement
is skipped with a note, as when no such memory type exists; a device_local or host_visible
allocation that fails is still an error, now with its reason.
2026-11-21 22:45:31 -05:00
f282a0dd97 Fix descriptor benchmark device index selection 2026-11-22 00:16:07 -03:00
ece8aab506 Benchmark: report unavailable descriptor lookup timings 2026-11-21 23:29:39 -03:00
f165a13ff8 D3D-56: sweep all entries in wave-uniform cases and report unique keys 2026-11-22 02:45:53 +01:00
b90a2d0914 D3D-56: add GPU descriptor hash-table micro-benchmark (vk_descriptor_bench) 2026-11-22 02:27:59 +01:00