diff options
author | Randy Xu <[email protected]> | 2017-04-18 14:27:10 +0800 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-05 19:35:08 +0100 |
commit | 8020ce02fc2dbc5dd8a8674a64d5a344031b1e03 (patch) | |
tree | 067acc61babe1bc14ddddbe0b76dcd9fa712d81e /src/compiler/nir | |
parent | 7b4b055a24c081d6befe161c7152d2ccf6057caa (diff) |
i965: Solve Android native fence fd double close
The Android native fence in i965 has two fds: _EGLSync::SyncFd and
brw_fence::sync_fd.
The semantics of __DRI2fenceExtensionRec::create_fence_fd are unclear on
whether the DRI driver takes ownership of the incoming fd (which is the
same incoming fd from eglCreateSync). i965 did take ownership, but all
other Mesa drivers do not; instead, they dup the incoming fd. As
a result, _EGLSync::SyncFd and brw_fence::sync_fd were the same fd, and
both egl_dri2 and i965 believed they owned it. On eglDestroySync, that
led to a double-close.
Fix the double-close by making brw_dri_create_fence_fd dup the incoming
fd, just like the other drivers do.
Signed-off-by: Randy Xu <[email protected]>
Test: Run Vulkan and GLES stress test and no crash.
Fixes: 6403e376511 ("i965/sync: Implement fences based on Linux sync_file")
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
[chadv: Polish the commit message]
Cc: [email protected]
(cherry picked from commit 6f21b5601cc1260eac53f65c8941b3aa66d0f5e9)
Diffstat (limited to 'src/compiler/nir')
0 files changed, 0 insertions, 0 deletions