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@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15172>
This commit is contained in:
Mike Blumenkrantz 2022-02-08 11:03:48 -05:00 committed by Marge Bot
parent b7b494299d
commit 69ec429c00

View file

@ -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)