OSDN Git Service

r300g: only allow byteswapped formats on big endian
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 10 Feb 2017 23:01:40 +0000 (01:01 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 1 Mar 2017 13:34:42 +0000 (13:34 +0000)
They cause regressions on little endian.

Fixes: 172bfdaa9e ("r300g: add support for PIPE_FORMAT_x8R8G8B8_*")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98869
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 66d1cb587ac7b24fb04f26d30e686c3991fc8885)

src/gallium/drivers/r300/r300_texture.c

index fbac07a..929c3fe 100644 (file)
  */
 static enum pipe_format r300_unbyteswap_array_format(enum pipe_format format)
 {
+    /* FIXME: Disabled on little endian because of a reported regression:
+     * https://bugs.freedesktop.org/show_bug.cgi?id=98869 */
+    if (PIPE_ENDIAN_NATIVE != PIPE_ENDIAN_BIG)
+        return format;
+
     /* Only BGRA 8888 array formats are supported for simplicity of
      * the implementation. */
     switch (format) {