modesetting: Fix msSharePixmapBacking returning a non-linear bo

glamor_fd_from_pixmap() may return a tiled bo, which is not suitable
for sharing with another GPU as tiling usually is GPU specific.

Switch to glamor_shareable_fd_from_pixmap(), which always returns a
linear bo. This fixes mis-rendering when running the mode setting
driver on the master gpu in a dual-gpu setup and running an opengl
app with DRI_PRIME=1.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Hans de Goede 2016-08-17 12:03:41 +02:00
parent a74d553cb9
commit cb7b145a25

View File

@ -1382,7 +1382,8 @@ msSharePixmapBacking(PixmapPtr ppix, ScreenPtr screen, void **handle)
int ret;
CARD16 stride;
CARD32 size;
ret = glamor_fd_from_pixmap(ppix->drawable.pScreen, ppix, &stride, &size);
ret = glamor_shareable_fd_from_pixmap(ppix->drawable.pScreen, ppix,
&stride, &size);
if (ret == -1)
return FALSE;