diff --git a/gdk/gdkmemoryformat.c b/gdk/gdkmemoryformat.c index c9fdc38192..5d17e84240 100644 --- a/gdk/gdkmemoryformat.c +++ b/gdk/gdkmemoryformat.c @@ -1479,6 +1479,7 @@ gdk_memory_depth_merge (GdkMemoryDepth depth1, else return GDK_MEMORY_FLOAT32; + case GDK_N_DEPTHS: default: g_assert_not_reached (); return GDK_MEMORY_U8; @@ -1507,6 +1508,7 @@ gdk_memory_depth_get_format (GdkMemoryDepth depth) return GDK_MEMORY_R16G16B16A16_FLOAT_PREMULTIPLIED; case GDK_MEMORY_FLOAT32: return GDK_MEMORY_R32G32B32A32_FLOAT_PREMULTIPLIED; + case GDK_N_DEPTHS: default: g_return_val_if_reached (GDK_MEMORY_R8G8B8A8_PREMULTIPLIED); } @@ -1534,6 +1536,7 @@ gdk_memory_depth_get_alpha_format (GdkMemoryDepth depth) return GDK_MEMORY_A16_FLOAT; case GDK_MEMORY_FLOAT32: return GDK_MEMORY_A32_FLOAT; + case GDK_N_DEPTHS: default: g_return_val_if_reached (GDK_MEMORY_A8); } diff --git a/gdk/gdkmemoryformatprivate.h b/gdk/gdkmemoryformatprivate.h index 878fd129e0..5e977f6a81 100644 --- a/gdk/gdkmemoryformatprivate.h +++ b/gdk/gdkmemoryformatprivate.h @@ -40,7 +40,9 @@ typedef enum { GDK_MEMORY_U8, GDK_MEMORY_U16, GDK_MEMORY_FLOAT16, - GDK_MEMORY_FLOAT32 + GDK_MEMORY_FLOAT32, + + GDK_N_DEPTHS } GdkMemoryDepth; gsize gdk_memory_format_alignment (GdkMemoryFormat format) G_GNUC_CONST; diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c index fe78c8d5a0..035919b6e1 100644 --- a/gdk/gdkvulkancontext.c +++ b/gdk/gdkvulkancontext.c @@ -72,7 +72,7 @@ struct _GdkVulkanContextPrivate { struct { VkSurfaceFormatKHR vk_format; GdkMemoryFormat gdk_format; - } formats[4]; + } formats[GDK_N_DEPTHS]; GdkMemoryDepth current_depth; VkSwapchainKHR swapchain; diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c index edb07f7f1f..204e51ebc9 100644 --- a/gsk/gskrendernodeparser.c +++ b/gsk/gskrendernodeparser.c @@ -3614,6 +3614,7 @@ append_texture_param (Printer *p, g_string_append (p->str, "url(\"data:image/tiff;base64,\\\n"); break; + case GDK_N_DEPTHS: default: g_assert_not_reached (); }