mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
st/dri: fix a crash in server_wait_sync
Ported from i965 including the comment.
This fixes:
dEQP-EGL.functional.reusable_sync.valid.wait_server
Cc: 18.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
b39bdb0716
commit
0eaf069679
1 changed files with 6 additions and 0 deletions
|
|
@ -214,6 +214,12 @@ dri2_server_wait_sync(__DRIcontext *_ctx, void *_fence, unsigned flags)
|
|||
struct pipe_context *ctx = dri_context(_ctx)->st->pipe;
|
||||
struct dri2_fence *fence = (struct dri2_fence*)_fence;
|
||||
|
||||
/* We might be called here with a NULL fence as a result of WaitSyncKHR
|
||||
* on a EGL_KHR_reusable_sync fence. Nothing to do here in such case.
|
||||
*/
|
||||
if (!fence)
|
||||
return;
|
||||
|
||||
if (ctx->fence_server_sync)
|
||||
ctx->fence_server_sync(ctx, fence->pipe_fence);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue