diff options
author | Christoph Bumiller <[email protected]> | 2012-04-19 14:44:56 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2012-04-19 14:56:04 +0200 |
commit | 939b26639fdc0913c5670b7fa20aab1f41b2b155 (patch) | |
tree | d102c8f1a1bcf56b9495073e64d55fedc0b2e79b /src/gallium/drivers/nv50 | |
parent | 90b5301ceab8fd86fccf76efe7ebb039c0e4a28f (diff) |
nv50,nvc0: prevent multiple flushes when user spins on get_query_result
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_query.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_query.c b/src/gallium/drivers/nv50/nv50_query.c index 220b166f985..5275e74964a 100644 --- a/src/gallium/drivers/nv50/nv50_query.c +++ b/src/gallium/drivers/nv50/nv50_query.c @@ -42,6 +42,7 @@ struct nv50_query { uint32_t base; uint32_t offset; /* base + i * 16 */ boolean ready; + boolean flushed; boolean is64bit; struct nouveau_mm_allocation *mm; }; @@ -230,6 +231,7 @@ nv50_query_end(struct pipe_context *pipe, struct pipe_query *pq) assert(0); break; } + q->flushed = FALSE; } static INLINE boolean @@ -253,7 +255,10 @@ nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq, if (!q->ready) { if (!wait) { /* for broken apps that spin on GL_QUERY_RESULT_AVAILABLE */ - PUSH_KICK(nv50->base.pushbuf); + if (!q->flushed) { + q->flushed = TRUE; + PUSH_KICK(nv50->base.pushbuf); + } return FALSE; } if (nouveau_bo_wait(q->bo, NOUVEAU_BO_RD, nv50->screen->base.client)) |