aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2010-01-13 01:07:49 -0800
committerCorbin Simpson <[email protected]>2010-01-13 01:07:49 -0800
commita930dc7ee9f834c46474d9f5cf3a80a4e0237ba4 (patch)
tree74e0ed474439b59fe1423766b3dce07b6abebd77 /src
parentae4eb251324df7f1b061a11107ddefd9a5d54c01 (diff)
r300g: Two dirty state optimizations.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index f1acdfc84d8..ba04bd07cc8 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -1003,10 +1003,6 @@ void r300_emit_dirty_state(struct r300_context* r300)
r300->context.flush(&r300->context, 0, NULL);
}
- if (!(r300->dirty_state)) {
- return;
- }
-
/* Clean out BOs. */
r300->winsys->reset_bos(r300->winsys);
@@ -1043,10 +1039,12 @@ validate:
}
}
/* ...occlusion query buffer... */
- if (!r300->winsys->add_buffer(r300->winsys, r300->oqbo,
- 0, RADEON_GEM_DOMAIN_GTT)) {
- r300->context.flush(&r300->context, 0, NULL);
- goto validate;
+ if (r300->dirty_state & R300_NEW_QUERY) {
+ if (!r300->winsys->add_buffer(r300->winsys, r300->oqbo,
+ 0, RADEON_GEM_DOMAIN_GTT)) {
+ r300->context.flush(&r300->context, 0, NULL);
+ goto validate;
+ }
}
/* ...and vertex buffer. */
if (r300->vbo) {