projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c37d825
)
llvmpipe: Fix fence wait.
author
José Fonseca
<jfonseca@vmware.com>
Thu, 6 May 2010 20:33:01 +0000
(21:33 +0100)
committer
José Fonseca
<jfonseca@vmware.com>
Thu, 6 May 2010 20:38:06 +0000
(21:38 +0100)
Avoids crashing when fence is NULL (LP_NUM_THREADS=0) and leaking when
it is not.
src/gallium/drivers/llvmpipe/lp_query.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/llvmpipe/lp_query.c
b/src/gallium/drivers/llvmpipe/lp_query.c
index a1836bbde910d2a106cfac6bfc51d47893b2ee1f..c23e9839063d26be4d1dc91e5892a70139436b71 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_query.c
+++ b/
src/gallium/drivers/llvmpipe/lp_query.c
@@
-106,7
+106,10
@@
llvmpipe_begin_query(struct pipe_context *pipe, struct pipe_query *q)
if (pq->binned) {
struct pipe_fence_handle *fence;
pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, &fence);
- pipe->screen->fence_finish(pipe->screen, fence, 0);
+ if (fence) {
+ pipe->screen->fence_finish(pipe->screen, fence, 0);
+ pipe->screen->fence_reference(pipe->screen, &fence, NULL);
+ }
}
lp_setup_begin_query(llvmpipe->setup, pq);