panfrost: Invert blend_reads_dest logic

Easier to understand (and match to actual hardware behaviour) this way.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10271>
This commit is contained in:
Alyssa Rosenzweig
2021-04-15 18:20:58 -04:00
committed by Marge Bot
parent ba51d2583e
commit 600a48248e
+4 -4
View File
@@ -448,11 +448,11 @@ panfrost_prepare_bifrost_fs_state(struct panfrost_context *ctx,
fs->bo ? fs->bo->ptr.gpu : 0,
state);
bool no_blend = true;
bool blend_reads_dest = false;
for (unsigned i = 0; i < ctx->pipe_framebuffer.nr_cbufs; ++i) {
no_blend &= (!blend[i].load_dest || blend[i].no_colour)
|| (!ctx->pipe_framebuffer.cbufs[i]);
blend_reads_dest |= (blend[i].load_dest &&
ctx->pipe_framebuffer.cbufs[i]);
}
state->properties.bifrost.allow_forward_pixel_to_kill =
@@ -462,7 +462,7 @@ panfrost_prepare_bifrost_fs_state(struct panfrost_context *ctx,
!fs->info.fs.can_discard &&
!fs->info.fs.outputs_read &&
!alpha_to_coverage &&
no_blend;
!blend_reads_dest;
}
}