diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2008-03-21 23:24:16 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2008-03-21 23:24:16 +1100 |
commit | 75b85fd33abe143d9cca6f8405f0a4243b6a5ddb (patch) | |
tree | 7c040ef401687cf4879af39b841f43a3745bcf6f /src/gallium/drivers/nv40 | |
parent | 3be8785e08128bc2821c0cdff97f7adbb46c745b (diff) |
nv40: fix bug in query code
Diffstat (limited to 'src/gallium/drivers/nv40')
-rw-r--r-- | src/gallium/drivers/nv40/nv40_query.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv40/nv40_query.c b/src/gallium/drivers/nv40/nv40_query.c index a0a3072406..15961591b9 100644 --- a/src/gallium/drivers/nv40/nv40_query.c +++ b/src/gallium/drivers/nv40/nv40_query.c @@ -45,6 +45,15 @@ nv40_query_begin(struct pipe_context *pipe, struct pipe_query *pq) assert(q->type == PIPE_QUERY_OCCLUSION_COUNTER); + /* Happens when end_query() is called, then another begin_query() + * without querying the result in-between. For now we'll wait for + * the existing query to notify completion, but it could be better. + */ + if (q->object) { + uint64 tmp; + pipe->get_query_result(pipe, pq, 1, &tmp); + } + if (nv40->nvws->res_alloc(nv40->screen->query_heap, 1, NULL, &q->object)) assert(0); nv40->nvws->notifier_reset(nv40->screen->query, q->object->start); |