Mesa (master): pan/midgard: Don't check 'branch && branch->writeout' twice in mir_schedule_alu()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 3 13:14:53 UTC 2020


Module: Mesa
Branch: master
Commit: c7e68d8625e4efcc776b5352de3b16b6951fabf7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7e68d8625e4efcc776b5352de3b16b6951fabf7

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Fri Jan 31 10:41:35 2020 +0100

pan/midgard: Don't check 'branch && branch->writeout' twice in mir_schedule_alu()

There's a writeout bool storing the result of this test. Use it instead
of duplicating the test.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>

---

 src/panfrost/midgard/midgard_schedule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index 101896de211..7654a046a76 100644
--- a/src/panfrost/midgard/midgard_schedule.c
+++ b/src/panfrost/midgard/midgard_schedule.c
@@ -914,7 +914,7 @@ mir_schedule_alu(
 
         /* If we have a render target reference, schedule a move for it */
 
-        if (branch && branch->writeout && (branch->constants.u32[0] || ctx->is_blend)) {
+        if (writeout && (branch->constants.u32[0] || ctx->is_blend)) {
                 midgard_instruction mov = v_mov(~0, make_compiler_temp(ctx));
                 sadd = mem_dup(&mov, sizeof(midgard_instruction));
                 sadd->unit = UNIT_SADD;



More information about the mesa-commit mailing list