egl: Make native display detection work more than once
authorAdam Jackson <ajax@redhat.com>
Wed, 9 Oct 2019 00:20:36 +0000 (20:20 -0400)
committerAdam Jackson <ajax@nwnk.net>
Wed, 9 Oct 2019 18:12:29 +0000 (18:12 +0000)
commit5218c3b27e41aefa9f4424a25a22b13895bd2d6f
tree65da32c20b3c19a0fe1bb945d2d202ddb05beb11
parent3f6e91a8d8576f0d6472d54a178600a25eec6fa2
egl: Make native display detection work more than once

eglGetDisplay is awful because you have to inspect the pointer you're
given and guess what type of native display it corresponds to. We make
it worse by caching the type of the first such display we detect, so if
the second call to eglGetDisplay is to a different display type, kaboom.

Fortunately this is a problem that can be solved with the delete key.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/156
src/egl/main/egldisplay.c