From 99c8d15c679609b0e4be7fbbbff43294990b175a Mon Sep 17 00:00:00 2001 From: Vitaliy Triang3l Kuzmin Date: Mon, 7 Aug 2023 22:34:38 +0300 Subject: [PATCH] r600/asm: Fix AR force_add_cf setting if a clause is not open Acked-by: Gert Wollny Signed-off-by: Vitaliy Triang3l Kuzmin Part-of: --- src/gallium/drivers/r600/r600_asm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index ec64c4d..84a7661 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -1209,7 +1209,7 @@ static int load_ar_r6xx(struct r600_bytecode *bc, bool for_src) return 0; /* hack to avoid making MOVA the last instruction in the clause */ - if ((bc->cf_last->ndw>>1) >= 110) + if (bc->cf_last == NULL || (bc->cf_last->ndw>>1) >= 110) bc->force_add_cf = 1; else if (for_src) { insert_nop_r6xx(bc, 4); @@ -1244,7 +1244,7 @@ int r600_load_ar(struct r600_bytecode *bc, bool for_src) return 0; /* hack to avoid making MOVA the last instruction in the clause */ - if ((bc->cf_last->ndw>>1) >= 110) + if (bc->cf_last == NULL || (bc->cf_last->ndw>>1) >= 110) bc->force_add_cf = 1; memset(&alu, 0, sizeof(alu)); -- 2.7.4