upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/gameinput_test.cpp
diff options
context:
space:
mode:
authorFelix Croasdale <x2020evy@stfx.ca>2026-11-21 21:26:20 -0600
committerFelix Croasdale <x2020evy@stfx.ca>2026-11-21 21:26:20 -0600
commit039df7d24f233793436089e338cd9bcdb1cf7aaf (patch)
tree780fbe1072d1e5537e7e0cd47d691dad5c3f2a27 /runtime/test/gameinput_test.cpp
parent8df277fb035b384971497f6f9790f7fc4b9ec1d1 (diff)
Runtime: upload heaps in Resizable BAR memory when the GPU has it (D3D-96)
Upload-heap buffers asked for HOST_VISIBLE | HOST_COHERENT memory only, so the GPU read every vertex, index and constant buffer a game uploads over PCIe from system memory. They now prefer DEVICE_LOCAL | HOST_VISIBLE | HOST_COHERENT when the device has Resizable BAR: such a type in a device-local heap larger than the 256 MiB BAR window (leonida::resizable_bar, runtime/src/vulkan_memory.h). Without Resizable BAR that type is a window of 256 MiB or less that every upload buffer would share, so they stay in system memory there. A full VRAM heap falls back to system memory through DeviceState::allocate's existing order. The device logs where upload heaps live, LEONIDA_UPLOAD_SYSMEM=1 keeps them in system memory for comparison, and vulkan_memory_flags / device_upload_in_vram report the choice to tests. d3d12_state_map_test checks the detection on the heap layouts of an RTX 5060 Ti with Resizable BAR, an RTX 3090 without it, a 256 MiB window and an integrated GPU; d3d12_vulkan_device_test checks that its upload buffer is placed accordingly, and its GPU copies then read that buffer in both placements. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
0 files changed, 0 insertions, 0 deletions