From 51d1cf55da6f8b8a215814589a189b6e5e537fe5 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 14 Oct 2009 17:44:19 +1000 Subject: r300g: port over last parts of oq support. Add support for begin/end in each CS so we don't get any other processes rendering in between. TODO: blame other parts of driver for this not working like Z. --- src/gallium/drivers/r300/r300_emit.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/r300/r300_emit.c') diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index babbe0dd74..6e616cd5b2 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -340,6 +340,7 @@ void r300_emit_query_start(struct r300_context *r300) } OUT_CS_REG(R300_ZB_ZPASS_DATA, 0); END_CS; + query->begin_emitted = TRUE; } @@ -429,10 +430,16 @@ static void rv530_emit_query_double(struct r300_context *r300, END_CS; } -void r300_emit_query_end(struct r300_context* r300, - struct r300_query* query) +void r300_emit_query_end(struct r300_context* r300) { struct r300_capabilities *caps = r300_screen(r300->context.screen)->caps; + struct r300_query *query = r300->query_current; + + if (!query) + return; + + if (query->begin_emitted == FALSE) + return; if (!r300->winsys->add_buffer(r300->winsys, r300->oqbo, 0, RADEON_GEM_DOMAIN_GTT)) { -- cgit v1.2.3