r300g: only allow byteswapped formats on big endian
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 10 Feb 2017 23:01:40 +0000 (01:01 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 20 Feb 2017 23:37:02 +0000 (00:37 +0100)
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>
src/gallium/drivers/r300/r300_texture.c

index fbac07a79a4ac9ce1446e6af7f5666ac56a8414e..929c3fe6c124110de9cb603119a685a4b3726f4b 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) {