Not all Vulkan implementations allows rendering to linear images, so in order to support scanning out from these on Windows we might have to copy through a buffer like we do in the PRIME path. To avoid reimplementing the same, let's instead generalize the code a bit so it doesn't have to specfy any PRIME-specific details. Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12210>