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 <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29875>
This commit is contained in:
Zan Dobersek
2024-08-06 09:19:39 +02:00
committed by Marge Bot
parent 9e0b77d5c3
commit 55ac28954e
+5 -2
View File
@@ -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;