mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 13:30:19 +00:00
gsk: Pass the memory format for back buffer
We can now get this information from the Vulkan context, so use it to accurately represent the back buffer. Related: #6767
This commit is contained in:
parent
42c6e0249f
commit
0ec29c4176
@ -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,
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user