]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ui/console-gl: Add support for big endian display surfaces
authorThomas Huth <thuth@redhat.com>
Mon, 6 Jun 2016 20:01:01 +0000 (22:01 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 10 Jun 2016 09:13:59 +0000 (11:13 +0200)
This is required for running QEMU on big endian hosts (like
PowerPC machines) that use RGB instead of BGR byte ordering.

Ticket: https://bugs.launchpad.net/qemu/+bug/1581796
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-id: 1465243261-26731-1-git-send-email-thuth@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/console-gl.c

index 74b1bed6ee4eac83087c7d8a424d2f150be59828..5165e216460431c2faf509abcc1e42eb423775f8 100644 (file)
@@ -88,6 +88,11 @@ void surface_gl_create_texture(ConsoleGLState *gls,
         surface->glformat = GL_BGRA_EXT;
         surface->gltype = GL_UNSIGNED_BYTE;
         break;
+    case PIXMAN_BE_x8r8g8b8:
+    case PIXMAN_BE_a8r8g8b8:
+        surface->glformat = GL_RGBA;
+        surface->gltype = GL_UNSIGNED_BYTE;
+        break;
     case PIXMAN_r5g6b5:
         surface->glformat = GL_RGB;
         surface->gltype = GL_UNSIGNED_SHORT_5_6_5;