diff --git a/gsk/gpu/gskvulkanimage.c b/gsk/gpu/gskvulkanimage.c index ad024594f5..d987dbad6f 100644 --- a/gsk/gpu/gskvulkanimage.c +++ b/gsk/gpu/gskvulkanimage.c @@ -433,6 +433,7 @@ GskGpuImage * gsk_vulkan_image_new_for_swapchain (GskVulkanDevice *device, VkImage image, VkFormat format, + GdkMemoryFormat memory_format, gsize width, gsize height) { @@ -449,8 +450,8 @@ gsk_vulkan_image_new_for_swapchain (GskVulkanDevice *device, self->vk_image_layout = VK_IMAGE_LAYOUT_UNDEFINED; self->vk_access = 0; - /* FIXME: The memory format and flags here are very suboptimal */ - gsk_gpu_image_setup (GSK_GPU_IMAGE (self), 0, GDK_MEMORY_DEFAULT, width, height); + /* FIXME: The flags here are very suboptimal */ + gsk_gpu_image_setup (GSK_GPU_IMAGE (self), 0, memory_format, width, height); gsk_vulkan_image_create_view (self, format, diff --git a/gsk/gpu/gskvulkanimageprivate.h b/gsk/gpu/gskvulkanimageprivate.h index 77df1e23b3..2a4a1502e1 100644 --- a/gsk/gpu/gskvulkanimageprivate.h +++ b/gsk/gpu/gskvulkanimageprivate.h @@ -14,6 +14,7 @@ G_DECLARE_FINAL_TYPE (GskVulkanImage, gsk_vulkan_image, GSK, VULKAN_IMAGE, GskGp GskGpuImage * gsk_vulkan_image_new_for_swapchain (GskVulkanDevice *device, VkImage image, VkFormat format, + GdkMemoryFormat memory_format, gsize width, gsize height); diff --git a/gsk/gpu/gskvulkanrenderer.c b/gsk/gpu/gskvulkanrenderer.c index 544902220e..9fe9f45b7d 100644 --- a/gsk/gpu/gskvulkanrenderer.c +++ b/gsk/gpu/gskvulkanrenderer.c @@ -75,6 +75,7 @@ gsk_vulkan_renderer_update_images_cb (GdkVulkanContext *context, self->targets[i] = gsk_vulkan_image_new_for_swapchain (device, gdk_vulkan_context_get_image (context, i), gdk_vulkan_context_get_image_format (context), + gdk_vulkan_context_get_memory_format (context), width, height); } }