[Mesa-dev] [PATCH] dri3: Do not get supported modifiers on pixmaps
Olivier Fourdan
ofourdan at redhat.com
Wed Jul 25 14:02:07 UTC 2018
get_supported_modifiers() expects a window as drawable, passing a pixmap
will fail as the Xserver will fail to match the id to a window.
That leads to dri3_alloc_render_buffer() to return NULL and breaks
rendering when using GLX_DOUBLEBUFFER.
Check if dealing with pixmap in dri3_alloc_render_buffer() in which case
avoid using get_supported_modifiers() and fallback to the good old
pixmap_from_buffer() method as before.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107117
Fixes: 069fdd5 ("egl/x11: Support DRI3 v1.1")
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
src/loader/loader_dri3_helper.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index f0ff2f07bd..83b7c66a44 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -1139,6 +1139,7 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format,
if (!draw->is_different_gpu) {
#ifdef HAVE_DRI3_MODIFIERS
if (draw->multiplanes_available &&
+ !draw->is_pixmap &&
draw->ext->image->base.version >= 15 &&
draw->ext->image->queryDmaBufModifiers &&
draw->ext->image->createImageWithModifiers) {
@@ -1278,6 +1279,7 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format,
pixmap = xcb_generate_id(draw->conn);
#ifdef HAVE_DRI3_MODIFIERS
if (draw->multiplanes_available &&
+ !draw->is_pixmap &&
buffer->modifier != DRM_FORMAT_MOD_INVALID) {
xcb_dri3_pixmap_from_buffers(draw->conn,
pixmap,
--
2.17.1
More information about the mesa-dev
mailing list