diff options
author | Keith Packard <[email protected]> | 2013-11-04 18:15:51 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-11-07 19:08:09 -0800 |
commit | 2d94601582e4f0fcaf8c02a15b23cba39dec7bb1 (patch) | |
tree | c0968b8d3f7c7035f2e380f4cba509b4e1312fee /src/glx/glxext.c | |
parent | 442442026eb241f05f2b7c03da304e0be047a7da (diff) |
Add DRI3+Present loader
Uses the __DRIimage loader interfaces.
v2: Fix _XIOErrors when DRI3 isn't present (change by anholt). Apparently
XCB just terminates your connection if you don't check for extensions
before using them, instead of returning an error like you'd expect.
Signed-off-by: Keith Packard <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glx/glxext.c')
-rw-r--r-- | src/glx/glxext.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/glx/glxext.c b/src/glx/glxext.c index bea1ccb10a2..c6e4d9f5738 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -770,7 +770,9 @@ AllocAndFetchScreenConfigs(Display * dpy, struct glx_display * priv) for (i = 0; i < screens; i++, psc++) { psc = NULL; #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) - if (priv->dri2Display) + if (priv->dri3Display) + psc = (*priv->dri3Display->createScreen) (i, priv); + if (psc == NULL && priv->dri2Display) psc = (*priv->dri2Display->createScreen) (i, priv); if (psc == NULL && priv->driDisplay) psc = (*priv->driDisplay->createScreen) (i, priv); @@ -863,6 +865,8 @@ __glXInitialize(Display * dpy) ** (e.g., those called in AllocAndFetchScreenConfigs). */ if (glx_direct && glx_accel) { + if (!getenv("LIBGL_DRI3_DISABLE")) + dpyPriv->dri3Display = dri3_create_display(dpy); dpyPriv->dri2Display = dri2CreateDisplay(dpy); dpyPriv->driDisplay = driCreateDisplay(dpy); } |