vulkan: Prefer cached buffer memory

We write the buffers in small chunks, and we even sometimes read it. So
prefer it when it's cached.

Speeds up the text benchmarks by a factor of 3x on my dedicated GPU.
This commit is contained in:
Benjamin Otte 2024-03-16 22:32:03 +01:00
parent 96b800fa0c
commit 47307dc7c1

View File

@ -97,7 +97,8 @@ gsk_vulkan_buffer_new_internal (GskVulkanDevice *device,
self->allocator = gsk_vulkan_device_find_allocator (device,
requirements.memoryTypeBits,
GSK_VULKAN_MEMORY_MAPPABLE,
GSK_VULKAN_MEMORY_MAPPABLE);
GSK_VULKAN_MEMORY_MAPPABLE |
VK_MEMORY_PROPERTY_HOST_CACHED_BIT);
gsk_vulkan_alloc (self->allocator,
requirements.size,
requirements.alignment,