vulkan: Add upload fastpath
authorBenjamin Otte <otte@redhat.com>
Wed, 14 Jun 2023 01:21:24 +0000 (03:21 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 14 Jun 2023 01:34:07 +0000 (03:34 +0200)
commit6a009b7182c013840a24f1b007488af665717153
tree42bc584306ac95e304f4dd8289ce806306dcab2a
parent17dd100f4374bc0f0a92f1c215c568d8c08cdbc1
vulkan: Add upload fastpath

If the memory heap that the GPU uses allows CPU access
(which is the case on basically every integrated GPU, including phones),
we can avoid a staging buffer and write directly into the image memory.

Check for this case and do that automatically.

Unfortunately we need to change the image format we use from
VK_IMAGE_TILING_OPTIMAL to VK_IMAGE_TILING_LINEAR, I haven't found a way
around that yet.
gsk/vulkan/gskvulkanimage.c