r300g: force buffer placements to GTT on big endian machines
authorMarek Olšák <maraeo@gmail.com>
Thu, 3 Nov 2011 14:20:55 +0000 (15:20 +0100)
committerMarek Olšák <maraeo@gmail.com>
Thu, 3 Nov 2011 15:39:40 +0000 (16:39 +0100)
src/gallium/drivers/r300/r300_screen_buffer.c

index 5424f260e9789cb9a9ce6edaf11208226eb50bd7..a5ec8ef96566256a8109356afc38ca7fe07d3ba0 100644 (file)
@@ -196,6 +196,12 @@ struct pipe_resource *r300_buffer_create(struct pipe_screen *screen,
         return &rbuf->b.b.b;
     }
 
+#ifdef PIPE_ARCH_BIG_ENDIAN
+    /* Force buffer placement to GTT on big endian machines, because
+     * the vertex fetcher can't swap bytes from VRAM. */
+    rbuf->b.b.b.usage = PIPE_USAGE_STAGING;
+#endif
+
     rbuf->buf =
         r300screen->rws->buffer_create(r300screen->rws,
                                        rbuf->b.b.b.width0, alignment,