Skip to content

venus: add support for external memory

Chia-I Wu requested to merge olv/mesa:external-mem into master

This adds VK_KHR_external_memory_fd and VK_EXT_external_memory_dma_buf support to venus.

The first 5 commits add vn_renderer_shmem. It turns out that CPU BOs and GPU BOs are different enough that they deserve different structs.

The next 6 commits evolve vn_renderer_bo_ops to allow a sparse array to be used. They make it possible to fix dma-buf uniqueness issue in 8a6040c1.

The last three commits enable external memory support. It is done in a way that what the host uses (can be anything) is irrelevant to what the guest supports (always opaque fd and dma-buf). But for now, I assume the host uses dma-bufs. To fix that, a new command should be added to venus protocol to query the handle type.

/cc @zzyiwei

Edited by Chia-I Wu

Merge request reports