mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #488] [MERGED] VK-HOST-AT-ALIASING: pass byte length to BufferVaIndex::find in host_at #538
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#538
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/488
Author: @xroneyaa
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD
Base:
main← Head:fix/vulkan-host-at-aliasing📝 Commits (1)
5a67c51vulkan_backend: pass byte length to BufferVaIndex::find in host_at📊 Changes
3 files changed (+270 additions, -1 deletions)
View changed files
📝
runtime/CMakeLists.txt(+12 -0)📝
runtime/src/vulkan_backend.h(+1 -1)➕
runtime/test/vk_host_at_aliasing_test.cpp(+257 -0)📄 Description
Claimed in the coordination issue as: VK-HOST-AT-ALIASING
What and why
In
runtime/src/vulkan_backend.h,VulkanContext'sreplay_.buffer_atcallsbuffer_vas_.find(va, hit, size)so placed buffers aliasing the same virtual address resolve to a buffer that holds the entire requested range[va, va + size). Its companionreplay_.host_atomitted thebytesargument (buffer_vas_.find(va, hit), defaultingbytes = 1). When a smaller placed buffer aliases a larger CPU-mapped buffer at or inside that VA,findpicks the closest smaller range andhost_atthen fails thebytes > b->size - offsetcheck withHostReadStatus::absent.This passes
bytestobuffer_vas_.find(va, hit, bytes)insidereplay_.host_atand adds the CPU-only mock-Vulkan testruntime/test/vk_host_at_aliasing_test.cpp(registered asvk_host_at_aliasing) exercising tied-start aliasing, offset aliasing, oversized reads, and GPU-only (host == nullptr) refusals through KHR TLAS array-of-pointers staging.Tested
vk_host_at_aliasing_test,vk_buffer_registration_oom_test, andbuffer_va_index_testwith MSVC 19.50 / Ninja (0 warnings under/W4)ctest --test-dir runtime/build --output-on-failure -R "^(vk_host_at_aliasing|vk_buffer_registration_oom|buffer_va_index)$"-> 3/3 Passed (buffer_va_index0.50 s,vk_buffer_registration_oom0.02 s,vk_host_at_aliasing0.02 s)python -I scripts/check_no_game_data.py runtime/src/vulkan_backend.h runtime/test/vk_host_at_aliasing_test.cpp runtime/CMakeLists.txt-> exit 0GPUs tested: n/a (
vk_host_at_aliasingruns CPU-only with a mock Vulkan dispatch table)AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed (n/a — no translator rule added).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.