From 41ae187003ca37414a93a53f81e6b6166667af44 Mon Sep 17 00:00:00 2001 From: Job Noorman Date: Thu, 23 Jan 2025 12:50:51 +0100 Subject: [PATCH] ir3: disable alias.rt pre-a750 Even though alias.tex is supported on all of a7xx, alias.rt is only support from a750. Signed-off-by: Job Noorman Fixes: 0aa9678d4d0 ("ir3: add support for alias.rt") Part-of: --- src/freedreno/common/freedreno_dev_info.h | 3 +++ src/freedreno/common/freedreno_devices.py | 1 + src/freedreno/ir3/ir3_alias.c | 6 +++--- src/freedreno/ir3/ir3_compiler.c | 5 +++-- src/freedreno/ir3/ir3_compiler.h | 7 +++++-- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/freedreno/common/freedreno_dev_info.h b/src/freedreno/common/freedreno_dev_info.h index baf839a49d2..eb09db1241a 100644 --- a/src/freedreno/common/freedreno_dev_info.h +++ b/src/freedreno/common/freedreno_dev_info.h @@ -341,6 +341,9 @@ struct fd_dev_info { /* a750-specific HW bug workaround for ray tracing */ bool has_rt_workaround; + + /* Whether alias.rt is supported. */ + bool has_alias_rt; } a7xx; }; diff --git a/src/freedreno/common/freedreno_devices.py b/src/freedreno/common/freedreno_devices.py index 3885b36cf4f..0e7e74c6a14 100644 --- a/src/freedreno/common/freedreno_devices.py +++ b/src/freedreno/common/freedreno_devices.py @@ -912,6 +912,7 @@ a7xx_gen3 = A7XXProps( has_ray_intersection = True, has_sw_fuse = True, has_rt_workaround = True, + has_alias_rt=True, ) a730_magic_regs = dict( diff --git a/src/freedreno/ir3/ir3_alias.c b/src/freedreno/ir3/ir3_alias.c index 406bd53c64d..d2218709015 100644 --- a/src/freedreno/ir3/ir3_alias.c +++ b/src/freedreno/ir3/ir3_alias.c @@ -152,7 +152,7 @@ alias_srcs(struct ir3_instruction *instr) bool ir3_create_alias_tex_regs(struct ir3 *ir) { - if (!ir->compiler->has_alias) + if (!ir->compiler->has_alias_tex) return false; if (ir3_shader_debug & IR3_DBG_NOALIASTEX) return false; @@ -620,7 +620,7 @@ has_alias_srcs(struct ir3_instruction *instr) bool ir3_insert_alias_tex(struct ir3 *ir) { - if (!ir->compiler->has_alias) + if (!ir->compiler->has_alias_tex) return false; if (ir3_shader_debug & IR3_DBG_NOALIASTEX) return false; @@ -747,7 +747,7 @@ create_output_aliases(struct ir3_shader_variant *v, struct ir3_instruction *end) bool ir3_create_alias_rt(struct ir3 *ir, struct ir3_shader_variant *v) { - if (!ir->compiler->has_alias) + if (!ir->compiler->has_alias_rt) return false; if (ir3_shader_debug & IR3_DBG_NOALIASRT) return false; diff --git a/src/freedreno/ir3/ir3_compiler.c b/src/freedreno/ir3/ir3_compiler.c index 131a3162169..8800fc57c7b 100644 --- a/src/freedreno/ir3/ir3_compiler.c +++ b/src/freedreno/ir3/ir3_compiler.c @@ -159,7 +159,7 @@ ir3_compiler_create(struct fd_device *dev, const struct fd_dev_id *dev_id, compiler->bitops_can_write_predicates = false; compiler->has_branch_and_or = false; compiler->has_rpt_bary_f = false; - compiler->has_alias = false; + compiler->has_alias_tex = false; if (compiler->gen >= 6) { compiler->samgq_workaround = true; @@ -235,9 +235,10 @@ ir3_compiler_create(struct fd_device *dev, const struct fd_dev_id *dev_id, compiler->has_shfl = true; compiler->reading_shading_rate_requires_smask_quirk = dev_info->a7xx.reading_shading_rate_requires_smask_quirk; + compiler->has_alias_rt = dev_info->a7xx.has_alias_rt; if (compiler->gen >= 7) { - compiler->has_alias = true; + compiler->has_alias_tex = true; } } else { compiler->max_const_pipeline = 512; diff --git a/src/freedreno/ir3/ir3_compiler.h b/src/freedreno/ir3/ir3_compiler.h index 27a3627339a..31bff0553f2 100644 --- a/src/freedreno/ir3/ir3_compiler.h +++ b/src/freedreno/ir3/ir3_compiler.h @@ -282,8 +282,11 @@ struct ir3_compiler { /* True if (rptN) is supported for bary.f. */ bool has_rpt_bary_f; - /* True if alias.tex and alias.rt are supported. */ - bool has_alias; + /* True if alias.tex is supported. */ + bool has_alias_tex; + + /* True if alias.rt is supported. */ + bool has_alias_rt; bool reading_shading_rate_requires_smask_quirk; };