diff options
author | Marek Olšák <[email protected]> | 2011-06-02 00:50:45 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-06-02 16:50:46 +0200 |
commit | bddf275db44695e3850c4b62b8f4b77d93299ae9 (patch) | |
tree | 53038f1c9fc6b45365222e4faccb2b275c81053a /src/gallium/drivers/softpipe/sp_fence.c | |
parent | f62e1f41b4d6047e72222aebbb0b55a508269b0c (diff) |
softpipe: add a better fake implementation of fences
The flush function, when asked for, should not return a NULL fence.
NULL can only be returned if fences are not implemented, and st/mesa
doesn't call any of the fence functions if it receives a NULL fence
(because some drivers don't even set the fence hooks).
ARB_sync is exposed if fence_finish is set.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_fence.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_fence.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/softpipe/sp_fence.c b/src/gallium/drivers/softpipe/sp_fence.c index 7b79a0df4ea..c2897ed1ef8 100644 --- a/src/gallium/drivers/softpipe/sp_fence.c +++ b/src/gallium/drivers/softpipe/sp_fence.c @@ -36,8 +36,7 @@ softpipe_fence_reference(struct pipe_screen *screen, struct pipe_fence_handle **ptr, struct pipe_fence_handle *fence) { - assert(!*ptr); - assert(!fence); + *ptr = fence; } @@ -45,7 +44,7 @@ static boolean softpipe_fence_signalled(struct pipe_screen *screen, struct pipe_fence_handle *fence) { - assert(!fence); + assert(fence); return TRUE; } @@ -55,7 +54,7 @@ softpipe_fence_finish(struct pipe_screen *screen, struct pipe_fence_handle *fence, uint64_t timeout) { - assert(!fence); + assert(fence); return TRUE; } |