zink: stop always syncing threaded flushes
async flushes are meant to be async here, and the other ones are manually synced later in the function Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36643>
This commit is contained in:
committed by
Marge Bot
parent
f5f7a5f801
commit
d476a8c07b
@@ -4078,7 +4078,7 @@ zink_flush(struct pipe_context *pctx,
|
||||
if (deferred && !(flags & PIPE_FLUSH_FENCE_FD) && pfence)
|
||||
deferred_fence = true;
|
||||
else
|
||||
flush_batch(ctx, true);
|
||||
flush_batch(ctx, false);
|
||||
}
|
||||
|
||||
if (pfence) {
|
||||
|
||||
@@ -129,11 +129,18 @@ tc_fence_finish(struct zink_context *ctx, struct zink_tc_fence *mfence, uint64_t
|
||||
static bool
|
||||
fence_wait(struct zink_screen *screen, struct zink_fence *fence, uint64_t timeout_ns)
|
||||
{
|
||||
struct zink_batch_state *bs = zink_batch_state(fence);
|
||||
if (screen->device_lost)
|
||||
return true;
|
||||
if (p_atomic_read(&fence->completed))
|
||||
return true;
|
||||
|
||||
if (screen->threaded_submit) {
|
||||
int64_t abs_timeout = os_time_get_absolute_timeout(timeout_ns);
|
||||
if (!util_queue_fence_wait_timeout(&bs->flush_completed, abs_timeout))
|
||||
return false;
|
||||
}
|
||||
|
||||
assert(fence->batch_id);
|
||||
assert(fence->submitted);
|
||||
|
||||
@@ -141,7 +148,7 @@ fence_wait(struct zink_screen *screen, struct zink_fence *fence, uint64_t timeou
|
||||
|
||||
if (success) {
|
||||
p_atomic_set(&fence->completed, true);
|
||||
zink_batch_state(fence)->usage.usage = 0;
|
||||
bs->usage.usage = 0;
|
||||
zink_screen_update_last_finished(screen, fence->batch_id);
|
||||
}
|
||||
return success;
|
||||
|
||||
Reference in New Issue
Block a user