Repository navigation
runtime: set binding.va and host_readable on placed buffers - #1739
Conversation
|
Tested be6ebf0 on NVIDIA GeForce RTX 5090 (driver 32.0.16.2124), Windows 11 Pro, Visual Studio 18 BuildTools x64 (RelWithDebInfo): pass. What I ran, from the PR head
Two small things from reading the diff, neither blocking:
The fix itself matches |
Flyander
left a comment
There was a problem hiding this comment.
Revu le head be6ebf0 : la ressource placée enregistre maintenant sa VA comme la voie create_buffer, et host_readable suit les heaps READBACK/CUSTOM WRITE_BACK. Le test vérifie le chemin VA-resolved de WriteBufferImmediate jusqu’à une ressource readback placée. Un retour indépendant RTX 5090 confirme le test appareil; les checks GitHub ne sont pas encore visibles ici.
|
Tested be6ebf0 on Windows 11 (26200), MSVC 19.4x (VS 2022 Build Tools), Ninja RelWithDebInfo: pass on both GPUs of a two-GPU PC.
No game files. AI-assisted check (Claude Code), Vonsek3. |
What and why
Resource::create_placed_buffer()(runtime/shims/d3d12_vulkan_device.cpp) registers itsleonida::ResourceBindingwithVulkanContextwithout settingbinding.vaorbinding.host_readable(unlikeResource::create_buffer()directly above it):binding.vastays0,VulkanContext::replay_.buffer_at()skips every placed buffer (if (... || !b.va || ...) continue). Any VA-resolved command targeting a placed buffer —WriteBufferImmediate,IASetVertexBuffers, orIASetIndexBuffer— fails atExecuteCommandListswithReplayResult::unresolved_resource.binding.host_readablestaysfalse, a placed buffer on aD3D12_HEAP_TYPE_READBACK(orD3D12_HEAP_TYPE_CUSTOMwithWRITE_BACK) heap does not trigger the submission-end GPU→host visibility barrier invulkan_replay.h.This PR sets both
binding.va = va_andbinding.host_readableinResource::create_placed_buffer()(matchingResource::create_buffer()) and adds a synthetic GPU regression test ind3d12_vulkan_device_testthat writes0xCAFEBABEinto a placed default-heap buffer viaWriteBufferImmediate, copies it to a placed readback-heap buffer, and verifies the readback word.Claim: #1548 (comment)
Tested
d3d12_vulkan_device_test.exewithLEONIDA_VK_VALIDATION=1: passed with 0 Vulkan validation errors.