diff options
author | Keith Whitwell <[email protected]> | 2010-09-07 12:45:23 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-09-07 14:01:50 +0100 |
commit | 040e59851ae4c26ce0509d42d2ee71e007b3b3d1 (patch) | |
tree | 16cf2f8cd6300e690ff7ebf4dc41c59a606e3a02 /src/gallium/drivers/llvmpipe/lp_query.c | |
parent | 6419ecd02ce43a2614822e228f306d4db589f317 (diff) |
llvmpipe: rearrange queries
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_query.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_query.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_query.c b/src/gallium/drivers/llvmpipe/lp_query.c index 76d0231fd1c..ff0e207a54b 100644 --- a/src/gallium/drivers/llvmpipe/lp_query.c +++ b/src/gallium/drivers/llvmpipe/lp_query.c @@ -123,6 +123,16 @@ llvmpipe_begin_query(struct pipe_context *pipe, struct pipe_query *q) struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe ); struct llvmpipe_query *pq = llvmpipe_query(q); + /* Check if the query is already in the scene. If so, we need to + * flush the scene now. Real apps shouldn't re-use a query in a + * frame of rendering. + */ + if (pq->fence && !lp_fence_issued(pq->fence)) { + llvmpipe_finish(pipe, __FUNCTION__); + } + + + memset(pq->count, 0, sizeof(pq->count)); lp_setup_begin_query(llvmpipe->setup, pq); llvmpipe->active_query_count++; |