panfrost: Drop depth-only case in blend finalize
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 17 Aug 2020 23:43:24 +0000 (19:43 -0400)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 20 Aug 2020 16:15:01 +0000 (18:15 +0200)
Since last commit, we don't call this function at all if there's no
matching colour buffer (it wouldn't make sense to!)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>

src/gallium/drivers/panfrost/pan_blend_cso.c

index 1e5c1bf072e1d6be5099a8d9ea93fa77d07434e8..9c52402282b37f072ef4e94793c3d6f8ec12a1b0 100644 (file)
@@ -222,19 +222,11 @@ struct panfrost_blend_final
 panfrost_get_blend_for_context(struct panfrost_context *ctx, unsigned rti)
 {
         struct panfrost_batch *batch = panfrost_get_batch_for_fbo(ctx);
-
-        /* Grab the format, falling back gracefully if called invalidly (which
-         * has to happen for no-color-attachment FBOs, for instance)  */
         struct pipe_framebuffer_state *fb = &ctx->pipe_framebuffer;
-        enum pipe_format fmt = PIPE_FORMAT_R8G8B8A8_UNORM;
-
-        if ((fb->nr_cbufs > rti) && fb->cbufs[rti])
-                fmt = fb->cbufs[rti]->format;
+        enum pipe_format fmt = fb->cbufs[rti]->format;
 
         /* Grab the blend state */
         struct panfrost_blend_state *blend = ctx->blend;
-        assert(blend);
-
         struct panfrost_blend_rt *rt = &blend->rt[rti];
 
         struct panfrost_blend_final final;