summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-10-28 11:47:24 -0700
committerCorbin Simpson <[email protected]>2009-10-28 12:15:34 -0700
commit6007e2e0085d9131b22dc8a98d7500a66a0e4c97 (patch)
tree61c2cb346ba69a74fe64d80adc320dc603deed41 /src/gallium
parent81c51bb67f97c60e21a5e7cf87e154bb46ee481b (diff)
r300g: Clear up a bit of the buffer reference stuff.
Still need to actually get reference info from winsys somehow. Doing added buffers is easy, but knowing whether a flush has happened is a bit tricky.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r300/r300_context.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index c34fbb11235..e45564b54e8 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -76,26 +76,23 @@ static void r300_destroy_context(struct pipe_context* context)
}
static unsigned int
-r300_is_texture_referenced( struct pipe_context *pipe,
- struct pipe_texture *texture,
- unsigned face, unsigned level)
+r300_is_texture_referenced(struct pipe_context *pipe,
+ struct pipe_texture *texture,
+ unsigned face, unsigned level)
{
- /**
- * FIXME: Optimize.
- */
+ struct pipe_buffer* buf;
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+ r300_get_texture_buffer(texture, &buf, NULL);
+
+ return pipe->is_buffer_referenced(pipe, buf);
}
static unsigned int
-r300_is_buffer_referenced( struct pipe_context *pipe,
- struct pipe_buffer *buf)
+r300_is_buffer_referenced(struct pipe_context *pipe,
+ struct pipe_buffer *buf)
{
- /**
- * FIXME: Optimize.
- */
-
- return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
+ /* XXX */
+ return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
}
static void r300_flush_cb(void *data)