Mesa (master): python: Don't try to finish a null fence.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Wed Apr 8 20:41:09 UTC 2009
Module: Mesa
Branch: master
Commit: c89eba0f31623084bc754de724384c80a3e57c91
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c89eba0f31623084bc754de724384c80a3e57c91
Author: José Fonseca <jfonseca at vmware.com>
Date: Wed Apr 8 21:11:51 2009 +0100
python: Don't try to finish a null fence.
---
src/gallium/state_trackers/python/p_context.i | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/gallium/state_trackers/python/p_context.i b/src/gallium/state_trackers/python/p_context.i
index 9a3003a..a40aa1e 100644
--- a/src/gallium/state_trackers/python/p_context.i
+++ b/src/gallium/state_trackers/python/p_context.i
@@ -258,9 +258,11 @@ error1:
flush(unsigned flags = 0) {
struct pipe_fence_handle *fence = NULL;
$self->pipe->flush($self->pipe, flags | PIPE_FLUSH_RENDER_CACHE, &fence);
- /* TODO: allow asynchronous operation */
- $self->pipe->screen->fence_finish( $self->pipe->screen, fence, 0 );
- $self->pipe->screen->fence_reference( $self->pipe->screen, &fence, NULL );
+ if(fence) {
+ /* TODO: allow asynchronous operation */
+ $self->pipe->screen->fence_finish( $self->pipe->screen, fence, 0 );
+ $self->pipe->screen->fence_reference( $self->pipe->screen, &fence, NULL );
+ }
}
/*
More information about the mesa-commit
mailing list