Mesa (master): r300g: Fix is_buffer_referenced.

Corbin Simpson csimpson at kemper.freedesktop.org
Sun Nov 8 22:54:16 UTC 2009


Module: Mesa
Branch: master
Commit: 0525cb1273a51343fba0a94d01d115e4256d1db2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0525cb1273a51343fba0a94d01d115e4256d1db2

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Sun Nov  8 09:56:02 2009 -0800

r300g: Fix is_buffer_referenced.

---

 src/gallium/drivers/r300/r300_context.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index b520e59..43d7ff3 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -89,8 +89,11 @@ static unsigned int
 r300_is_buffer_referenced(struct pipe_context *pipe,
                           struct pipe_buffer *buf)
 {
-    /* XXX */
-    return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+    /* This only checks to see whether actual hardware buffers are
+     * referenced. Since we use managed BOs and transfers, it's actually not
+     * possible for pipe_buffers to ever reference the actual hardware, so
+     * buffers are never referenced. */
+    return 0;
 }
 
 static void r300_flush_cb(void *data)




More information about the mesa-commit mailing list