summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_emit.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-10-14 17:14:43 +1000
committerDave Airlie <[email protected]>2009-10-14 17:14:43 +1000
commit47791697ab6eb6965f0ba8ba3f20373b3753ca2a (patch)
treeaca935bf2a2330a15a4fcd07cf832d733a8e8959 /src/gallium/drivers/r300/r300_emit.c
parentc1bee7bdea470b6b5dcebef9aacc8fe4feca687c (diff)
r300g: convert query to a state for emitting.
This means we don't emit in the begin query but when we have to flush. Similiar to classic. TODO: make query object actually work.
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 3d28249c164..babbe0dd74a 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -320,12 +320,16 @@ void r300_emit_fb_state(struct r300_context* r300,
END_CS;
}
-void r300_emit_query_begin(struct r300_context* r300,
- struct r300_query* query)
+void r300_emit_query_start(struct r300_context *r300)
+
{
- struct r300_capabilities* caps = r300_screen(r300->context.screen)->caps;
+ struct r300_capabilities *caps = r300_screen(r300->context.screen)->caps;
+ struct r300_query *query = r300->query_current;
CS_LOCALS(r300);
+ if (!query)
+ return;
+
/* XXX This will almost certainly not return good results
* for overlapping queries. */
BEGIN_CS(4);
@@ -772,6 +776,11 @@ validate:
goto validate;
}
+ if (r300->dirty_state & R300_NEW_QUERY) {
+ r300_emit_query_start(r300);
+ r300->dirty_state &= ~R300_NEW_QUERY;
+ }
+
if (r300->dirty_state & R300_NEW_BLEND) {
r300_emit_blend_state(r300, r300->blend_state);
r300->dirty_state &= ~R300_NEW_BLEND;