[Mesa-dev] [PATCH 2/2] freedreno: ir3: fix wrong return if reg is an array
Hyunjun Ko
zzoon at igalia.com
Wed Oct 24 01:57:16 UTC 2018
Since ir3_register struct has union, it could return true even
if it's an array register accidentally when checking whether it
is address/predicate register.
Fixes: dEQP-GLES31.functional.ssbo.layout.random.arrays_of_arrays.6
---
src/gallium/drivers/freedreno/ir3/ir3.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/freedreno/ir3/ir3.h b/src/gallium/drivers/freedreno/ir3/ir3.h
index 3055c10f1d..db94603558 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3.h
+++ b/src/gallium/drivers/freedreno/ir3/ir3.h
@@ -739,7 +739,7 @@ static inline bool writes_addr(struct ir3_instruction *instr)
{
if (instr->regs_count > 0) {
struct ir3_register *dst = instr->regs[0];
- return reg_num(dst) == REG_A0;
+ return (reg_num(dst) == REG_A0) && !(dst->flags & IR3_REG_ARRAY);
}
return false;
}
@@ -748,7 +748,7 @@ static inline bool writes_pred(struct ir3_instruction *instr)
{
if (instr->regs_count > 0) {
struct ir3_register *dst = instr->regs[0];
- return reg_num(dst) == REG_P0;
+ return (reg_num(dst) == REG_P0) && !(dst->flags & IR3_REG_ARRAY);
}
return false;
}
--
2.17.1
More information about the mesa-dev
mailing list