testsuite: Use proper alignment when uploading to GL
authorMatthias Clasen <mclasen@redhat.com>
Wed, 31 May 2023 02:36:41 +0000 (22:36 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 31 May 2023 02:36:41 +0000 (22:36 -0400)
testsuite/gdk/memorytexture.c

index c98668d3c1cf830de3b8e30616b14ef1001e60cc..a675fff59d4d65595300843923c00ded0d6264b2 100644 (file)
@@ -890,6 +890,7 @@ upload_to_gl_native (GdkTexture *texture)
       glGenTextures (1, &id);
       glActiveTexture (GL_TEXTURE0);
       glBindTexture (GL_TEXTURE_2D, id);
+      glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
       glTexImage2D (GL_TEXTURE_2D, 0, formats[i].gl_internalformat, width, height, 0, formats[i].gl_format, formats[i].gl_type, data);
       glTexParameteriv (GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, formats[i].swizzle);