[client] egl: update FSR filter state upon resolution change

This commit is contained in:
Quantum 2021-08-11 05:40:58 -04:00 committed by Geoffrey McRae
parent 5a5b867c73
commit c4c60fd330

View File

@ -40,6 +40,7 @@ typedef struct EGL_FilterFFXFSR1
enum EGL_PixelFormat pixFmt; enum EGL_PixelFormat pixFmt;
unsigned int width, height; unsigned int width, height;
unsigned int inWidth, inHeight;
bool sizeChanged; bool sizeChanged;
bool prepared; bool prepared;
@ -231,7 +232,8 @@ static bool egl_filterFFXFSR1Setup(EGL_Filter * filter,
{ {
EGL_FilterFFXFSR1 * this = UPCAST(EGL_FilterFFXFSR1, filter); EGL_FilterFFXFSR1 * this = UPCAST(EGL_FilterFFXFSR1, filter);
if (pixFmt == this->pixFmt && !this->sizeChanged) if (pixFmt == this->pixFmt && !this->sizeChanged &&
width == this->inWidth && height == this->inHeight)
return true; return true;
if (!egl_framebufferSetup(this->easuFb, pixFmt, this->width, this->height)) if (!egl_framebufferSetup(this->easuFb, pixFmt, this->width, this->height))
@ -240,6 +242,8 @@ static bool egl_filterFFXFSR1Setup(EGL_Filter * filter,
if (!egl_framebufferSetup(this->rcasFb, pixFmt, this->width, this->height)) if (!egl_framebufferSetup(this->rcasFb, pixFmt, this->width, this->height))
return false; return false;
this->inWidth = width;
this->inHeight = height;
this->active = this->width > width && this->height > height; this->active = this->width > width && this->height > height;
this->sizeChanged = false; this->sizeChanged = false;
this->pixFmt = pixFmt; this->pixFmt = pixFmt;