OSDN Git Service

glx: guard swap-interval functions against destroyed drawables
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 2 Feb 2017 17:06:27 +0000 (18:06 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 10 Feb 2017 11:06:58 +0000 (11:06 +0000)
commite4bb5be7b27cd3a5c8b6d98a1e1b5f9a55815103
tree4ab8be07562b6674565803aa23f8824b0620bbb2
parent48d5cf36a1cfd548e6a98d96828273f035066b5b
glx: guard swap-interval functions against destroyed drawables

The GLX specification says about glXDestroyPixmap:

    "The storage for the GLX pixmap will be freed when it is not current
     to any client."

So arguably, functions like glXSwapIntervalMESA can be called after
glXDestroyPixmap has been called for the currently bound GLXPixmap.
In that case, the GLXDRIDrawable no longer exists, and so we just skip
those calls.

Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit f446f3fb33528eebe9b120340fca3ac5c5ba518d)
src/glx/dri3_glx.c
src/glx/glxcmds.c