Mesa (main): zink: restrict clear flushing on sampler/image bind to compute binds
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Feb 28 17:54:11 UTC 2022
Module: Mesa
Branch: main
Commit: 69ec429c00ee32d5bf51e549876b9ca2daf2cbf6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=69ec429c00ee32d5bf51e549876b9ca2daf2cbf6
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue Feb 8 11:03:48 2022 -0500
zink: restrict clear flushing on sampler/image bind to compute binds
this is otherwise going to be handled on the next renderpass start
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15172>
---
src/gallium/drivers/zink/zink_context.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 35193add6c1..07fc69f8c85 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1337,7 +1337,8 @@ create_image_surface(struct zink_context *ctx, const struct pipe_image_view *vie
/* this is actually a zink_ctx_surface, but we just want the inner surface */
struct zink_surface *surface = zink_csurface(psurf);
FREE(psurf);
- flush_pending_clears(ctx, res);
+ if (is_compute)
+ flush_pending_clears(ctx, res);
return surface;
}
@@ -1487,7 +1488,8 @@ zink_set_sampler_views(struct pipe_context *pctx,
update |= iv != b->image_view->image_view;
} else if (a != b)
update = true;
- flush_pending_clears(ctx, res);
+ if (shader_type == PIPE_SHADER_COMPUTE)
+ flush_pending_clears(ctx, res);
check_for_layout_update(ctx, res, shader_type == PIPE_SHADER_COMPUTE);
zink_batch_usage_set(&b->image_view->batch_uses, ctx->batch.state);
if (!a)
More information about the mesa-commit
mailing list