mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 05:10:17 +01:00
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.
This commit is contained in:
parent
f62e1f41b4
commit
bddf275db4
2 changed files with 5 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,9 +96,9 @@ softpipe_flush( struct pipe_context *pipe,
|
|||
++frame_no;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (fence)
|
||||
*fence = NULL;
|
||||
*fence = (void*)(intptr_t)1;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue