From 93200ce4c6f543808e768c379a04bea577d55c72 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 17 Aug 2020 19:43:24 -0400 Subject: [PATCH] panfrost: Drop depth-only case in blend finalize 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 Reviewed-by: Tomeu Vizoso Part-of: --- src/gallium/drivers/panfrost/pan_blend_cso.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_blend_cso.c b/src/gallium/drivers/panfrost/pan_blend_cso.c index 1e5c1bf072e..9c52402282b 100644 --- a/src/gallium/drivers/panfrost/pan_blend_cso.c +++ b/src/gallium/drivers/panfrost/pan_blend_cso.c @@ -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; -- 2.30.2