lima: ppir: fix store_output optimization for modifiers

If the mov node being handled here has modifiers, it cannot be
trivially removed. This happens in some shaders, so handle it
in the identity mov check for that optimization.

Fixes: d6987daef9 ("lima: ppir: introduce an optimizer")

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36490>
(cherry picked from commit 3020d27326)
This commit is contained in:
Erico Nunes 2025-07-31 11:49:49 +02:00 committed by Eric Engestrom
parent d2918b7b86
commit 1c324487ac
2 changed files with 8 additions and 1 deletions

View file

@ -6904,7 +6904,7 @@
"description": "lima: ppir: fix store_output optimization for modifiers",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "d6987daef983c53e44128d71508061cf65bc6487",
"notes": null

View file

@ -138,6 +138,13 @@ static bool ppir_node_is_identity_reg_mov(ppir_node *node)
if (src->type != ppir_target_register)
return false;
if (src->absolute || src->negate)
return false;
ppir_dest *dest = ppir_node_get_dest(node);
if (dest->modifier != ppir_outmod_none)
return false;
return ppir_src_swizzle_is_identity(ppir_node_get_src(node, 0));
}