gsk: Add a warning for inefficient texture import

With GSK_DEBUG=fallback, warn if a non-memory texture has to be
downloaded for importing it into Vulkan or GL.
This commit is contained in:
Matthias Clasen 2024-04-25 19:08:03 -04:00
parent 36d7ca058e
commit a1fdf06d80

View File

@ -313,6 +313,11 @@ gsk_gpu_upload_texture_op_try (GskGpuFrame *frame,
{
GEnumClass *enum_class = g_type_class_ref (GDK_TYPE_MEMORY_FORMAT);
if (!GDK_IS_MEMORY_TEXTURE (texture))
{
gdk_debug_message ("Unoptimized upload for %s", G_OBJECT_TYPE_NAME (texture));
}
if (gdk_texture_get_format (texture) != gsk_gpu_image_get_format (image))
{
gdk_debug_message ("Unsupported format %s, converting on CPU to %s",