d3d12 checks: free the memory under an imported buffer #220
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/220"
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?
Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-11-26T10:26:53Z.
Summary
Two controls for a hazard
mainhas today on amdgpu (found in #191, used by #218): a host-pointer import whose pages go away while the import is still alive makes the kernel reject every later submit.Both are modes of the existing buffer import guest. They place a 64 KiB buffer on private
VirtualAllocmemory through slots 74 and 44, copy from it, free the pages, and then run unrelated upload-to-readback copies that are verified by readback (a lost device still completes the fence).buffer-unmap-releaseddestroys the buffer before freeing its pages. Later copies must arrive:mode=released later-submits=ok.buffer-unmap-alivefrees the pages while the buffer still exists. Whether later submits survive is the host driver's behavior, so the control reportslater-submits=okorlater-submits=lostand passes with either. Nothing in the provider can prevent it for memory the title frees itself, so this is a record of the host, not a gate.On the RX 6700 XT the alive mode prints
radv/amdgpu: The CS has been rejected, see dmesg for more information (-14), vkd3d-proton reportsVK_ERROR_DEVICE_LOST, and all three later copies read back 0 of 256 words, including the one made after the buffer is released. The released mode reads back 256 of 256. These are the same messages ProjectScarlett ends with after a page remap when imports are direct.Not included: a variant on XMem pages (remap or unmap with the import alive, later submits still work). As discussed on #218, that belongs with the XMem side that has to honor the hold.
Verified on Lanes
python tuxbox.py checkpassed on this branch — all stages but "Shader translator on the GPU", which also fails onmainhere (#219)This adds regression controls only; no provider code changes.
GPU, driver and backend: AMD Radeon RX 6700 XT (
1002:73df), Mesa RADV 26.3.1, Linux 7.3.6, Proton backend with GE-Proton11-14.buffer-unmap-aliveto reportlater-submits=okthere, but have no card to confirm.The translator stage fails the same way on
mainon this machine and this branch does not touch it: #219.Receipts for the new cases:
Checks
python -m unittest tests.test_d3d12_regressionscovers the two receipt rules. No evidence JSON changes.