freedreno: fix dEQP-GLES3.functional.fence_sync.*
authorRob Clark <robdclark@gmail.com>
Wed, 15 Aug 2018 12:13:40 +0000 (08:13 -0400)
committerRob Clark <robdclark@gmail.com>
Fri, 17 Aug 2018 15:04:21 +0000 (11:04 -0400)
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_fence.c

index c4e20226b58d648dbe05d48cb5609b6de5235164..e2602cb41123cefb480da68605e060e5bc88a768 100644 (file)
@@ -136,6 +136,10 @@ void fd_fence_server_sync(struct pipe_context *pctx,
 
        fence_flush(fence);
 
+       /* if not an external fence, then nothing more to do without preemption: */
+       if (fence->fence_fd == -1)
+               return;
+
        if (sync_accumulate("freedreno", &batch->in_fence_fd, fence->fence_fd)) {
                /* error */
        }