mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
radeonsi: Inherit the old modifier when reallocating the texture.
Otherwise the reallocated texture has an invalid modifier when exporting the VAAPI surface handle. Signed-off-by: nyanmisaka <nst799610810@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19097>
This commit is contained in:
parent
5bc52a9103
commit
0e782d9609
1 changed files with 7 additions and 1 deletions
|
|
@ -446,7 +446,13 @@ static void si_reallocate_texture_inplace(struct si_context *sctx, struct si_tex
|
|||
return;
|
||||
}
|
||||
|
||||
new_tex = (struct si_texture *)screen->resource_create(screen, &templ);
|
||||
/* Inherit the modifier from the old texture. */
|
||||
if (tex->surface.modifier != DRM_FORMAT_MOD_INVALID && screen->resource_create_with_modifiers)
|
||||
new_tex = (struct si_texture *)screen->resource_create_with_modifiers(screen, &templ,
|
||||
&tex->surface.modifier, 1);
|
||||
else
|
||||
new_tex = (struct si_texture *)screen->resource_create(screen, &templ);
|
||||
|
||||
if (!new_tex)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue