zink: remove format check from clear texture
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 5 Jul 2022 19:28:27 +0000 (15:28 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 18 Jul 2022 03:40:37 +0000 (03:40 +0000)
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>

src/gallium/drivers/zink/zink_clear.c

index 4b2fbc2..baf11a7 100644 (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 {