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@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3676>
This commit is contained in:
Boris Brezillon
2020-01-31 10:41:35 +01:00
committed by Marge Bot
parent ef89a52fe5
commit c7e68d8625
+1 -1
View 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;