Mesa (master): panfrost: Invert blend_reads_dest logic
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Apr 19 20:52:38 UTC 2021
Module: Mesa
Branch: master
Commit: 600a48248e9d74c6ade7030a5b14dbc6778d98e6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=600a48248e9d74c6ade7030a5b14dbc6778d98e6
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu Apr 15 18:20:58 2021 -0400
panfrost: Invert blend_reads_dest logic
Easier to understand (and match to actual hardware behaviour) this way.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10271>
---
src/gallium/drivers/panfrost/pan_cmdstream.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 86624e894fd..36b4c5a8e47 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -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;
}
}
More information about the mesa-commit
mailing list