glx/drisw: invalidate drawables upon binding context if flush extension exists

this forces surface resize as expected

cc: mesa-stable

fixes #6706

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17147>
This commit is contained in:
Mike Blumenkrantz 2022-06-20 15:37:46 -04:00 committed by Marge Bot
parent 23b63e536e
commit ea005c9e04
1 changed files with 9 additions and 3 deletions

View File

@ -439,12 +439,18 @@ drisw_bind_context(struct glx_context *context, struct glx_context *old,
driReleaseDrawables(&pcp->base);
if ((*psc->core->bindContext) (pcp->driContext,
if (!(*psc->core->bindContext) (pcp->driContext,
pdraw ? pdraw->driDrawable : NULL,
pread ? pread->driDrawable : NULL))
return Success;
return GLXBadContext;
if (psc->f) {
if (pdraw)
psc->f->invalidate(pdraw->driDrawable);
if (pread && (!pdraw || pread->driDrawable != pdraw->driDrawable))
psc->f->invalidate(pread->driDrawable);
}
return GLXBadContext;
return Success;
}
static void