zink: Always set mfence->submit_count to the fence submit_count
Fixes glFinish not finishing all GPU work.
cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8257
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27560>
(cherry picked from commit aed5e4e1f2
)
This commit is contained in:

committed by
Eric Engestrom

parent
ac45a57bfc
commit
e77605b331
@@ -1534,7 +1534,7 @@
|
|||||||
"description": "zink: Always set mfence->submit_count to the fence submit_count",
|
"description": "zink: Always set mfence->submit_count to the fence submit_count",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 0,
|
"nomination_type": 0,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": null,
|
"because_sha": null,
|
||||||
"notes": null
|
"notes": null
|
||||||
|
@@ -3789,7 +3789,6 @@ zink_flush(struct pipe_context *pctx,
|
|||||||
struct zink_batch *batch = &ctx->batch;
|
struct zink_batch *batch = &ctx->batch;
|
||||||
struct zink_fence *fence = NULL;
|
struct zink_fence *fence = NULL;
|
||||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||||
unsigned submit_count = 0;
|
|
||||||
VkSemaphore export_sem = VK_NULL_HANDLE;
|
VkSemaphore export_sem = VK_NULL_HANDLE;
|
||||||
|
|
||||||
/* triggering clears will force has_work */
|
/* triggering clears will force has_work */
|
||||||
@@ -3868,7 +3867,6 @@ zink_flush(struct pipe_context *pctx,
|
|||||||
tc_driver_internal_flush_notify(ctx->tc);
|
tc_driver_internal_flush_notify(ctx->tc);
|
||||||
} else {
|
} else {
|
||||||
fence = &batch->state->fence;
|
fence = &batch->state->fence;
|
||||||
submit_count = batch->state->usage.submit_count;
|
|
||||||
if (deferred && !(flags & PIPE_FLUSH_FENCE_FD) && pfence)
|
if (deferred && !(flags & PIPE_FLUSH_FENCE_FD) && pfence)
|
||||||
deferred_fence = true;
|
deferred_fence = true;
|
||||||
else
|
else
|
||||||
@@ -3892,7 +3890,7 @@ zink_flush(struct pipe_context *pctx,
|
|||||||
mfence->fence = fence;
|
mfence->fence = fence;
|
||||||
mfence->sem = export_sem;
|
mfence->sem = export_sem;
|
||||||
if (fence) {
|
if (fence) {
|
||||||
mfence->submit_count = submit_count;
|
mfence->submit_count = zink_batch_state(fence)->usage.submit_count;
|
||||||
util_dynarray_append(&fence->mfences, struct zink_tc_fence *, mfence);
|
util_dynarray_append(&fence->mfences, struct zink_tc_fence *, mfence);
|
||||||
}
|
}
|
||||||
if (export_sem) {
|
if (export_sem) {
|
||||||
|
Reference in New Issue
Block a user