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 <daniels@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Fixes: 7aeef2d4ef ("dri3: allow building against older xcb (v3)")
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user