Skip to content

vkr: Support import/export of host memory with opaque fd

Omar Akkila requested to merge rakko/virglrenderer:opaque-fd-vkr-ctx0 into master

The primary motivation here is to allow virglrenderer to be able to interop with host vulkan drivers that support VK_KHR_external_memory_fd but not VK_EXT_external_memory_dma_buf (For example, and more specifically, lavapipe).

Having virglrenderer work with lavapipe would enable the mesa venus driver to be tested within the mesa CI against deqp-vk.

Running deqp-vk against venus/corsvm/virglrenderer in the CI lead to numerous failures due to the lack of support for mapping any host device memory that isn't through dma_buf.

This series of patches seeks to implement support both the export and import of host memory through an opaque fd.

For blob mapping, without access to the context with which the blob was created, a separate, dedicated context is created to handle importing the blob and returning a host pointer back to the guest.

I am opening the MR to allow for comments and feedback on the approach so far and if improvements could be made in other areas.

Edited by Omar Akkila

Merge request reports

Loading