diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 22:03:09 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 22:03:09 -0500 |
| commit | 599fe9f2212e1004f93b33a199e19146cf53d7d8 (patch) | |
| tree | 2cc19b570fd8c4427812def3a93f49464b69cf99 /runtime/src/main.cpp | |
| parent | f78385646c5483d8bcd7d4161ee5dcd48d2b7fb3 (diff) | |
d3d12: free a declined slot-133 import at once
create_host_buffer returned E_NOTIMPL for an import the driver put below
the arena with its memory still allocated. The resource's destructor then
handed that memory to the deferred queue, so it outlived the next
submission while the shadow buffer made instead over the same address
guarded its page read-only. On RADV a read-only page under a live
VK_EXT_external_memory_host import makes the kernel reject that
submission and every later one ("The CS has been rejected", then
VK_ERROR_DEVICE_LOST).
Every return after vkCreateBuffer that declines the import now destroys
the buffer and frees the memory before it returns; nothing was submitted
with them, since the resource is registered only on success. A counter of
live slot-133 imports (rt::d3d12::title_host_imports) lets a test see it.
The finding and the design are NateWeav's (coordination issue #14,
comments 7141859164 and 7142359977); this implements their description.
Test: d3d12_title_va_test in its imports-on mode (d3d12_geometry_views)
places two buffers, at a page start and 4 bytes into a page, submits with
each alive and checks that no import memory outlives a declined import.
On the RDNA2 iGPU under Wine both land below the arena, the path fixed
here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/main.cpp')
0 files changed, 0 insertions, 0 deletions