summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-05-26 01:41:22 +0200
committerMarek Olšák <maraeo@gmail.com>2010-05-26 01:41:32 +0200
commite6a8513a86f43d9b339a10c72dcb8fb88ffbb2aa (patch)
tree7e1f72f80769ff1956492b80f6a18c32e1508efd /src/gallium/drivers
parent2c072c8f72647a3b32e9855f7635b37ba399f5be (diff)
r300g: more efficient finish + fix comments
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_context.c9
-rw-r--r--src/gallium/drivers/r300/r300_context.h4
2 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 4721b7d5dc..85e45d8647 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -253,11 +253,12 @@ void r300_finish(struct r300_context *r300)
if (fb->cbufs[i]->texture) {
r300->rws->buffer_wait(r300->rws,
r300_texture(fb->cbufs[i]->texture)->buffer);
+ return;
}
- if (fb->zsbuf) {
- r300->rws->buffer_wait(r300->rws,
- r300_texture(fb->zsbuf->texture)->buffer);
- }
+ }
+ if (fb->zsbuf && fb->zsbuf->texture) {
+ r300->rws->buffer_wait(r300->rws,
+ r300_texture(fb->zsbuf->texture)->buffer);
}
}
}
diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h
index 82183cfcb8..efc6df3fab 100644
--- a/src/gallium/drivers/r300/r300_context.h
+++ b/src/gallium/drivers/r300/r300_context.h
@@ -259,8 +259,8 @@ struct r300_query {
*
* This is not a subclass of pipe_fence_handle because pipe_fence_handle is
* never actually fully defined. So, rather than have it as a member, and do
- * subclass-style casting, we treat pipe_query as an opaque, and just
- * trust that our state tracker does not ever mess up query objects.
+ * subclass-style casting, we treat pipe_fence_handle as an opaque, and just
+ * trust that our state tracker does not ever mess up fence objects.
*/
struct r300_fence {
struct pipe_reference reference;