pan/midgard: Don't check 'branch && branch->writeout' twice in mir_schedule_alu()
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 31 Jan 2020 09:41:35 +0000 (10:41 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 3 Feb 2020 12:53:47 +0000 (12:53 +0000)
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@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>

src/panfrost/midgard/midgard_schedule.c

index 101896de211f3a567b5effb365a5fc966d4dc030..7654a046a7604c6db869597fb1c5df26ec18256c 100644 (file)
@@ -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;