mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
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 commit3020d27326)
This commit is contained in:
parent
d2918b7b86
commit
1c324487ac
2 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue