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 <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
This commit is contained in:
Alyssa Rosenzweig 2020-08-17 19:43:24 -04:00 committed by Tomeu Vizoso
parent 8249e2b9a2
commit 93200ce4c6

View 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;