zink: remove format check from clear texture

this is going to be a render target no matter what

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
This commit is contained in:
Mike Blumenkrantz 2022-07-05 15:28:27 -04:00 committed by Marge Bot
parent 8bb5a11503
commit b33f041810

View file

@ -402,7 +402,6 @@ zink_clear_texture(struct pipe_context *pctx,
{
struct zink_context *ctx = zink_context(pctx);
struct zink_resource *res = zink_resource(pres);
struct pipe_screen *pscreen = pctx->screen;
struct u_rect region = zink_rect_from_box(box);
bool needs_rp = !zink_blit_region_fills(region, pres->width0, pres->height0) || ctx->render_condition_active;
struct pipe_surface *surf = NULL;
@ -412,8 +411,7 @@ zink_clear_texture(struct pipe_context *pctx,
util_format_unpack_rgba(pres->format, color.ui, data, 1);
if (pscreen->is_format_supported(pscreen, pres->format, pres->target, 0, 0,
PIPE_BIND_RENDER_TARGET) && !needs_rp) {
if (!needs_rp) {
zink_batch_no_rp(ctx);
clear_color_no_rp(ctx, res, &color, level, box->z, box->depth);
} else {