mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
freedreno: Allow TC async fences to have an fd
We don't need to have this restriction, we just need to fence_flush() before trying to access the fd. This path is exercised in CL CTS gl-interop test if cl_gl_sharing is exposed. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37696>
This commit is contained in:
parent
c1147980e5
commit
bd5ed33bb1
2 changed files with 1 additions and 7 deletions
|
|
@ -46,12 +46,6 @@ fd_context_flush(struct pipe_context *pctx, struct pipe_fence_handle **fencep,
|
|||
* one created earlier
|
||||
*/
|
||||
if ((flags & TC_FLUSH_ASYNC) && fencep) {
|
||||
/* We don't currently expect async+flush in the fence-fd
|
||||
* case.. for that to work properly we'd need TC to tell
|
||||
* us in the create_fence callback that it needs an fd.
|
||||
*/
|
||||
assert(!(flags & PIPE_FLUSH_FENCE_FD));
|
||||
|
||||
fd_pipe_fence_set_batch(*fencep, batch);
|
||||
fd_pipe_fence_ref(&batch->fence, *fencep);
|
||||
|
||||
|
|
|
|||
|
|
@ -316,13 +316,13 @@ fd_pipe_fence_get_fd(struct pipe_screen *pscreen, struct pipe_fence_handle *fenc
|
|||
/* We don't expect deferred flush to be combined with fence-fd: */
|
||||
assert(!fence->last_fence);
|
||||
|
||||
assert(fence->use_fence_fd);
|
||||
|
||||
/* NOTE: in the deferred fence case, the pctx we want is the threaded-ctx
|
||||
* but if TC is not used, this will be null. Which is fine, we won't call
|
||||
* threaded_context_flush() in that case
|
||||
*/
|
||||
fence_flush(&fence->ctx->tc->base, fence, OS_TIMEOUT_INFINITE);
|
||||
assert(fence->use_fence_fd);
|
||||
assert(fence->fence);
|
||||
return os_dupfd_cloexec(fence->fence->fence_fd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue