Module: Mesa Branch: main Commit: 11b1ad9f3ffe41ad3309dd97e2ec8785c2fe8c4f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=11b1ad9f3ffe41ad3309dd97e2ec8785c2fe8c4f
Author: Mike Blumenkrantz <[email protected]> Date: Wed Mar 15 16:38:30 2023 -0400 zink: disable tc flush notify with rp optimizing this is extremely broken and nonfunctional since it randomly flushes mid-renderpass and triggers invalidations Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21800> --- src/gallium/drivers/zink/zink_batch.c | 3 ++- src/gallium/drivers/zink/zink_context.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c index 435e6333adf..193d33762ee 100644 --- a/src/gallium/drivers/zink/zink_batch.c +++ b/src/gallium/drivers/zink/zink_batch.c @@ -613,9 +613,10 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch) if (!ctx->queries_disabled) zink_suspend_queries(ctx, batch); - tc_driver_internal_flush_notify(ctx->tc); struct zink_screen *screen = zink_screen(ctx->base.screen); + if (!screen->driver_workarounds.track_renderpasses) + tc_driver_internal_flush_notify(ctx->tc); struct zink_batch_state *bs; /* oom flushing is triggered to handle stupid piglit tests like streaming-texture-leak */ diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index d58434e3174..b66ad4e934d 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -4145,7 +4145,8 @@ zink_flush(struct pipe_context *pctx, check_device_lost(ctx); } } - tc_driver_internal_flush_notify(ctx->tc); + if (!screen->driver_workarounds.track_renderpasses) + tc_driver_internal_flush_notify(ctx->tc); } else { fence = &batch->state->fence; submit_count = batch->state->submit_count; @@ -5486,7 +5487,7 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags) &(struct threaded_context_options){ .create_fence = zink_create_tc_fence_for_tc, .is_resource_busy = zink_context_is_resource_busy, - .driver_calls_flush_notify = true, + .driver_calls_flush_notify = !screen->driver_workarounds.track_renderpasses, .unsynchronized_get_device_reset_status = true, .parse_renderpass_info = screen->driver_workarounds.track_renderpasses, .dsa_parse = zink_tc_parse_dsa,
