panfrost: Don't force constant modifier after converting

After converting a texture from one modifier to another, there is
no reason to force the modifier to stay constant afterwards. Set
back `modifier_constant` to false because it is changed by
`resource_setup` as it is causing issues when implementing AFBC
packing.

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25012>
This commit is contained in:
Louis-Francis Ratté-Boulianne 2023-09-01 11:26:02 -04:00 committed by Marge Bot
parent e9d523bb92
commit bc91af8021

View file

@ -1216,6 +1216,10 @@ pan_resource_modifier_convert(struct panfrost_context *ctx,
panfrost_resource_setup(pan_device(ctx->base.screen), rsrc, modifier,
blit.dst.format);
/* panfrost_resource_setup will force the modifier to stay constant when
* called with a specific modifier. We don't want that here, we want to
* be able to convert back to another modifier if needed */
rsrc->modifier_constant = false;
pipe_resource_reference(&tmp_prsrc, NULL);
}