From a4bae6a62d95fe3c65166f4d36545c2bf426e60f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 29 May 2023 13:41:30 -0400 Subject: [PATCH] gsk: Use matching memory format memory_format_gl_format returns the new memory format if it made a change, we should not drop that on the floor. --- gsk/gl/gskglcommandqueue.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/gsk/gl/gskglcommandqueue.c b/gsk/gl/gskglcommandqueue.c index 4a19f59c4f..60e9222fe0 100644 --- a/gsk/gl/gskglcommandqueue.c +++ b/gsk/gl/gskglcommandqueue.c @@ -1447,6 +1447,7 @@ gsk_gl_command_queue_create_framebuffer (GskGLCommandQueue *self) return fbo_id; } + static GdkMemoryFormat memory_format_gl_format (GdkMemoryFormat data_format, gboolean use_es, @@ -1630,14 +1631,14 @@ gsk_gl_command_queue_upload_texture_chunks (GskGLCommandQueue *self, use_es = gdk_gl_context_get_use_es (self->context); gdk_gl_context_get_version (self->context, &major, &minor); data_format = gdk_texture_get_format (chunks[0].texture); - memory_format_gl_format (data_format, - use_es, - major, - minor, - &gl_internalformat, - &gl_format, - &gl_type, - &gl_swizzle); + data_format = memory_format_gl_format (data_format, + use_es, + major, + minor, + &gl_internalformat, + &gl_format, + &gl_type, + &gl_swizzle); glTexImage2D (GL_TEXTURE_2D, 0, gl_internalformat, width, height, 0, gl_format, gl_type, NULL); -- 2.30.2