[client] egl: destroy cached EGLImages when changing format

Reusing cached EGLImages while the frame format has changed will result
in visual artifacts. We should instead destroy the EGLImages and let
them be recreated.
This commit is contained in:
Quantum 2021-02-21 01:43:37 -05:00 committed by Geoffrey McRae
parent 48be58378c
commit 63ec2dc01b

View File

@ -269,6 +269,10 @@ bool egl_texture_setup(EGL_Texture * texture, enum EGL_PixelFormat pixFmt, size_
glDeleteTextures(1, &texture->dmaTex);
glGenFramebuffers(1, &texture->dmaFBO);
glGenTextures(1, &texture->dmaTex);
for (size_t i = 0; i < texture->dmaImageUsed; ++i)
eglDestroyImage(texture->display, texture->dmaImages[i].image);
texture->dmaImageUsed = 0;
return true;
}