summaryrefslogtreecommitdiff
path: root/dri3
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner.de@gmail.com>2018-04-16 08:14:47 +0200
committerAdam Jackson <ajax@redhat.com>2018-04-17 10:24:42 -0400
commit4e92c51ce4d6ab50c1507a23a01c6be0d1954d79 (patch)
tree0c9ee7d490b80ecab8e0d9f6a3115ef3275e6244 /dri3
parenta98a95b798a0062783ae6fd2135ad488af5efcfd (diff)
dri3: Fix dri3_buffers_from_pixmap request.
Sending pixmap depth and bpp was omitted, so the Mesa X11 + EGL + DRI3 side of things always failed to dri3_create_image_khr_pixmap_from_buffers(), which led to failure of X11 + EGL compositing under DRI3 under, e.g., KDE Plasma 5. Fixes: 6e7c40f62db6 ("dri3: Add multi-planar/modifier buffer requests") Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Cc: Daniel Stone <daniels@collabora.com> Cc: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Tested-by: Mike Lothian <mike@fireburn.co.uk>
Diffstat (limited to 'dri3')
-rw-r--r--dri3/dri3_request.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index 2d3deb282..452b08a87 100644
--- a/dri3/dri3_request.c
+++ b/dri3/dri3_request.c
@@ -481,7 +481,7 @@ proc_dri3_buffers_from_pixmap(ClientPtr client)
int i;
PixmapPtr pixmap;
- REQUEST_SIZE_MATCH(xDRI3BufferFromPixmapReq);
+ REQUEST_SIZE_MATCH(xDRI3BuffersFromPixmapReq);
rc = dixLookupResourceByType((void **) &pixmap, stuff->pixmap, RT_PIXMAP,
client, DixWriteAccess);
if (rc != Success) {
@@ -497,6 +497,8 @@ proc_dri3_buffers_from_pixmap(ClientPtr client)
rep.length = bytes_to_int32(num_fds * 2 * sizeof(CARD32));
rep.width = pixmap->drawable.width;
rep.height = pixmap->drawable.height;
+ rep.depth = pixmap->drawable.depth;
+ rep.bpp = pixmap->drawable.bitsPerPixel;
rep.modifier = modifier;
if (client->swapped) {