Ping Chad
On 04/20/2017 08:20 AM, Xu, Randy wrote:
Any comments to this patch?
Thanks,
Randy
-----Original Message-----
From: Xu, Randy
Sent: Tuesday, April 18, 2017 2:27 PM
To: [email protected]
Cc: Palli, Tapani <[email protected]>; Xu, Randy <[email protected]>
Subject: [PATCH] i965: Solve Android native fence fd double close issue
The Android native fence in i965 driver has two fd, one is from App and
stored in _EGLSync.SyncFd; Another one brw_fence->sync_fd should be the
dup of the first one, not direct copy.
These two fds are closed in dri2_egl_unref_sync in sequence.
Test: Run Vulkan and GLES stress test and no crash.
Signed-off-by: Randy Xu <[email protected]>
---
src/mesa/drivers/dri/i965/brw_sync.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_sync.c
b/src/mesa/drivers/dri/i965/brw_sync.c
index 5b78503..a8356c3 100644
--- a/src/mesa/drivers/dri/i965/brw_sync.c
+++ b/src/mesa/drivers/dri/i965/brw_sync.c
@@ -470,7 +470,7 @@ brw_dri_create_fence_fd(__DRIcontext *dri_ctx, int
fd)
goto fail;
} else {
/* Import the sync fd as an in-fence. */
- fence->sync_fd = fd;
+ fence->sync_fd = dup(fd);
}
assert(fence->sync_fd != -1);
--
2.7.4
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev