From 55ac28954e6f12263432ac469bdb0ffec78676aa Mon Sep 17 00:00:00 2001 From: Zan Dobersek Date: Tue, 6 Aug 2024 09:19:39 +0200 Subject: [PATCH] ir3: indicate possible dword straddle for any multi-component pvtmem access When filling out ir3_info, any multi-component stp or ldp instruction should indicate possible straddle across dword boundaries. This indirectly prevents setting the PERWAVEMEMLAYOUT flag on the SP_VS_PVT_MEM_SIZE register, enabling proper functioning of three-component 8-bit accesses with natural alignment. Signed-off-by: Zan Dobersek Part-of: --- src/freedreno/ir3/ir3.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c index ad780ab16ee..9153d5ea7ca 100644 --- a/src/freedreno/ir3/ir3.c +++ b/src/freedreno/ir3/ir3.c @@ -315,9 +315,12 @@ ir3_collect_info(struct ir3_shader_variant *v) if ((instr->opc == OPC_STP || instr->opc == OPC_LDP)) { unsigned components = instr->srcs[2]->uim_val; - if (components * type_size(instr->cat6.type) > 32) { + + /* This covers any multi-component access that could straddle + * across multiple double-words. + */ + if (components > 1) info->multi_dword_ldp_stp = true; - } if (instr->opc == OPC_STP) info->stp_count += components;