gldriver: Quick workaround for filter mismatch
authorBenjamin Otte <otte@redhat.com>
Thu, 16 Mar 2023 22:36:00 +0000 (23:36 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 21 Apr 2023 06:18:47 +0000 (08:18 +0200)
We should really use texture views or samplers to handle this case for
shared textures, but this at least makes NEAREST not break.

gsk/gl/gskgldriver.c

index 727ce079bb10eeb182ce9be83b6f98a1a7c3a355..da2bfb51bb643aad7f6ef6718f24ebf77702115c 100644 (file)
@@ -733,7 +733,7 @@ gsk_gl_driver_load_texture (GskGLDriver *self,
 
   format = GL_RGBA8;
 
-  if (GDK_IS_GL_TEXTURE (texture))
+  if (GDK_IS_GL_TEXTURE (texture) && min_filter == GL_LINEAR && mag_filter == GL_LINEAR)
     {
       GdkGLTexture *gl_texture = (GdkGLTexture *) texture;
       GdkGLContext *texture_context = gdk_gl_texture_get_context (gl_texture);