diff options
author | Daniel Stone <[email protected]> | 2018-03-19 15:03:22 +0000 |
---|---|---|
committer | Daniel Stone <[email protected]> | 2018-03-20 08:52:59 +0000 |
commit | 478fc2d2a1a392108f48a3ed9aa21b10be72b4a2 (patch) | |
tree | 1d4a23a66bd2897ce6b98783c26ab1b7ab0faec8 /src/glx | |
parent | 9a243eccae618e85aa7af762a4c40ecd8a2e4882 (diff) |
dri3: Don't fail on version mismatch
The previous commit to make DRI3 modifier support optional, breaks with
an updated server and old client.
Make sure we never set multibuffers_available unless we also support it
locally. Make sure we don't call stubs of new-DRI3 functions (or empty
branches) which will never succeed.
Signed-off-by: Daniel Stone <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Fixes: 7aeef2d4efdc ("dri3: allow building against older xcb (v3)")
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/dri3_glx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index aec803adfd8..c48a8ba5327 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -357,10 +357,12 @@ dri3_create_drawable(struct glx_screen *base, XID xDrawable, { struct dri3_drawable *pdraw; struct dri3_screen *psc = (struct dri3_screen *) base; - const struct dri3_display *const pdp = (struct dri3_display *) - base->display->dri3Display; __GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) config_base; bool has_multibuffer = false; +#ifdef HAVE_DRI3_MODIFIERS + const struct dri3_display *const pdp = (struct dri3_display *) + base->display->dri3Display; +#endif pdraw = calloc(1, sizeof(*pdraw)); if (!pdraw) @@ -371,11 +373,13 @@ dri3_create_drawable(struct glx_screen *base, XID xDrawable, pdraw->base.drawable = drawable; pdraw->base.psc = &psc->base; +#ifdef HAVE_DRI3_MODIFIERS if ((psc->image && psc->image->base.version >= 15) && (pdp->dri3Major > 1 || (pdp->dri3Major == 1 && pdp->dri3Minor >= 2)) && (pdp->presentMajor > 1 || (pdp->presentMajor == 1 && pdp->presentMinor >= 2))) has_multibuffer = true; +#endif (void) __glXInitialize(psc->base.dpy); |