Skip to content

vulkan/gpu_buf: don't assume host ptr imports are mappable

Niklas Haas requested to merge fix146 into master

The logic in vk_buf_flush treates buffers imported from PL_HANDLE_HOST_PTR identically to host_mapped buffers, but this assumption is only true if we assume that the host pointers were imported to a host-visible memory type. This is not always the case.

Relax the restriction to only require invalidating mapped memory if the memory is actually mapped.

Fixes: https://github.com/haasn/libplacebo/issues/146

Merge request reports