mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
vulkan: Fix updating swap chains
gdk_vulkan_context_check_swapchain uses priv->current_format, so we must update it first, and undo that if check_swapchain falls. This fixes handling of high-depth back buffers in gsk.
This commit is contained in:
parent
54eb85f814
commit
42c6e0249f
@ -648,15 +648,18 @@ gdk_vulkan_context_begin_frame (GdkDrawContext *draw_context,
|
||||
{
|
||||
if (priv->formats[depth].gdk_format != priv->formats[priv->current_format].gdk_format)
|
||||
{
|
||||
GdkMemoryFormat old_format = priv->current_format;
|
||||
GError *error = NULL;
|
||||
|
||||
priv->current_format = depth;
|
||||
if (!gdk_vulkan_context_check_swapchain (context, &error))
|
||||
{
|
||||
g_warning ("%s", error->message);
|
||||
g_error_free (error);
|
||||
priv->current_format = old_format;
|
||||
return;
|
||||
}
|
||||
}
|
||||
priv->current_format = depth;
|
||||
}
|
||||
for (i = 0; i < priv->n_images; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user