Shared direct memory is never imported as dma-buf on drivers without VK_EXT_external_memory_host #16466
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?
Imported from boykopovar/AnyPS5. Originally posted by Rad0van on 2026-11-06T19:14:13Z.
What happens
On a Linux driver with
VK_KHR_external_memory_fdandVK_EXT_external_memory_dma_bufbut withoutVK_EXT_external_memory_host, guest memory is never imported, so GPU stores through FLAT/GLOBAL addresses into direct memory fail withBDA access failed ... read-only in the BDA table.Title, test or build step
DOOM homebrew PPSA99666 (AGC compute presentation): every frame's stores to the display buffer fail and the frame is not updated.
AnyPS5 commit
main
9f2b939(also release v0.1.4).System
Ubuntu 26.04 (Asahi Linux, kernel 7.2.0-1001-asahi-arm), Apple M2 Max, Honeykrisp (Mesa 26.0.8 aarch64; also Mesa 25.3 x86-64). x86-64 code run by Box64 0.4.5 on the host and by FEX 2610 in muvm 0.7. Libraries cross-compiled with GCC 15.2 (
g++-15-x86-64-linux-gnu).Host report
Steps to reproduce
Run any title that draws or presents through AGC compute on Honeykrisp, with
/dev/udmabufreadable and writable. DOOM: 30 s from start.Log
57 such lines in 30 s on main
9f2b939.What was checked
VulkanDevice.cppsetsdmaBufImport,hostImportAlignment, the host import window and the import size limit only insideif (hasExtension(VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME) ...), so without host pointer import nothing is imported, although the udmabuf backing import (createBackingImport) would work. With a Vulkan layer that advertises the extension and fails everyvkGetMemoryHostPointerPropertiesEXT,createImportfalls through to the udmabuf chunks and DOOM renders with no BDA failures. The udmabuf import itself works on Honeykrisp (standalone fill/copy check, both directions coherent). Same result every run.Analysed with AI assistance (Claude); a fix follows as a pull request.