Mesa (master): r300g: force buffer placements to GTT on big endian machines
Marek Olšák
mareko at kemper.freedesktop.org
Thu Nov 3 15:41:58 UTC 2011
Module: Mesa
Branch: master
Commit: ca0f515f851f04a3849ac049868825e94382681d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca0f515f851f04a3849ac049868825e94382681d
Author: Marek Olšák <maraeo at gmail.com>
Date: Thu Nov 3 15:20:55 2011 +0100
r300g: force buffer placements to GTT on big endian machines
---
src/gallium/drivers/r300/r300_screen_buffer.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
index 5424f26..a5ec8ef 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.c
+++ b/src/gallium/drivers/r300/r300_screen_buffer.c
@@ -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,
More information about the mesa-commit
mailing list