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/loader | |
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/loader')
-rw-r--r-- | src/loader/loader_dri3_helper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index c1d94c3c21e..fe17df14738 100644 --- a/src/loader/loader_dri3_helper.c +++ b/src/loader/loader_dri3_helper.c @@ -1274,9 +1274,9 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format, buffer->modifier = DRM_FORMAT_MOD_INVALID; pixmap = xcb_generate_id(draw->conn); +#ifdef HAVE_DRI3_MODIFIERS if (draw->multiplanes_available && buffer->modifier != DRM_FORMAT_MOD_INVALID) { -#ifdef HAVE_DRI3_MODIFIERS xcb_dri3_pixmap_from_buffers(draw->conn, pixmap, draw->drawable, @@ -1289,8 +1289,9 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format, depth, buffer->cpp * 8, buffer->modifier, buffer_fds); + } else #endif - } else { + { xcb_dri3_pixmap_from_buffer(draw->conn, pixmap, draw->drawable, |