glx: pass implicit load param through allocation
Acked-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28139>
This commit is contained in:
committed by
Marge Bot
parent
91c757bda1
commit
014bbae4bf
+7
-7
@@ -763,7 +763,7 @@ glx_screen_cleanup(struct glx_screen *psc)
|
|||||||
** If that works then fetch the per screen configs data.
|
** If that works then fetch the per screen configs data.
|
||||||
*/
|
*/
|
||||||
static Bool
|
static Bool
|
||||||
AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv, Bool zink)
|
AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv, Bool zink, Bool implicit)
|
||||||
{
|
{
|
||||||
struct glx_screen *psc;
|
struct glx_screen *psc;
|
||||||
GLint i, screens;
|
GLint i, screens;
|
||||||
@@ -783,19 +783,19 @@ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv, Bool zink)
|
|||||||
#if defined(GLX_USE_DRM)
|
#if defined(GLX_USE_DRM)
|
||||||
#if defined(HAVE_DRI3)
|
#if defined(HAVE_DRI3)
|
||||||
if (priv->dri3Display)
|
if (priv->dri3Display)
|
||||||
psc = priv->dri3Display->createScreen(i, priv, false);
|
psc = priv->dri3Display->createScreen(i, priv, implicit);
|
||||||
#endif /* HAVE_DRI3 */
|
#endif /* HAVE_DRI3 */
|
||||||
if (psc == NULL && priv->dri2Display)
|
if (psc == NULL && priv->dri2Display)
|
||||||
psc = priv->dri2Display->createScreen(i, priv, false);
|
psc = priv->dri2Display->createScreen(i, priv, implicit);
|
||||||
#endif /* GLX_USE_DRM */
|
#endif /* GLX_USE_DRM */
|
||||||
|
|
||||||
#ifdef GLX_USE_WINDOWSGL
|
#ifdef GLX_USE_WINDOWSGL
|
||||||
if (psc == NULL && priv->windowsdriDisplay)
|
if (psc == NULL && priv->windowsdriDisplay)
|
||||||
psc = priv->windowsdriDisplay->createScreen(i, priv, false);
|
psc = priv->windowsdriDisplay->createScreen(i, priv, implicit);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((psc == GLX_LOADER_USE_ZINK || psc == NULL) && priv->driswDisplay)
|
if ((psc == GLX_LOADER_USE_ZINK || psc == NULL) && priv->driswDisplay)
|
||||||
psc = priv->driswDisplay->createScreen(i, priv, false);
|
psc = priv->driswDisplay->createScreen(i, priv, psc == GLX_LOADER_USE_ZINK ? false : implicit);
|
||||||
#endif /* GLX_DIRECT_RENDERING && !GLX_USE_APPLEGL */
|
#endif /* GLX_DIRECT_RENDERING && !GLX_USE_APPLEGL */
|
||||||
|
|
||||||
#if defined(GLX_USE_APPLE)
|
#if defined(GLX_USE_APPLE)
|
||||||
@@ -941,14 +941,14 @@ __glXInitialize(Display * dpy)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!AllocAndFetchScreenConfigs(dpy, dpyPriv, zink | try_zink)) {
|
if (!AllocAndFetchScreenConfigs(dpy, dpyPriv, zink | try_zink, zink || try_zink ? try_zink : !env)) {
|
||||||
Bool fail = True;
|
Bool fail = True;
|
||||||
#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
|
#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
|
||||||
if (try_zink) {
|
if (try_zink) {
|
||||||
free(dpyPriv->screens);
|
free(dpyPriv->screens);
|
||||||
dpyPriv->driswDisplay->destroyDisplay(dpyPriv->driswDisplay);
|
dpyPriv->driswDisplay->destroyDisplay(dpyPriv->driswDisplay);
|
||||||
dpyPriv->driswDisplay = driswCreateDisplay(dpy, TRY_ZINK_NO);
|
dpyPriv->driswDisplay = driswCreateDisplay(dpy, TRY_ZINK_NO);
|
||||||
fail = !AllocAndFetchScreenConfigs(dpy, dpyPriv, False);
|
fail = !AllocAndFetchScreenConfigs(dpy, dpyPriv, False, true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (fail) {
|
if (fail) {
|
||||||
|
|||||||
Reference in New Issue
Block a user