Just like for a caller of glamor_dri3_fd_from_pixmap(), otherwise the
consumer of that named buffer has no idea what GL chose for the
stride.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Markus Wick <markus@selfnet.de>
}
int
-glamor_name_from_pixmap(PixmapPtr pixmap)
+glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
{
glamor_pixmap_private *pixmap_priv;
glamor_screen_private *glamor_priv =
return glamor_egl_dri3_fd_name_from_tex(pixmap->drawable.pScreen,
pixmap,
pixmap_priv->base.fbo->tex,
- TRUE, NULL, NULL);
+ TRUE, stride, size);
default:
break;
}
*
* Returns the name on success, -1 on error.
* */
-extern _X_EXPORT int glamor_name_from_pixmap(PixmapPtr pixmap);
+extern _X_EXPORT int glamor_name_from_pixmap(PixmapPtr pixmap,
+ CARD16 *stride, CARD32 *size);
/* @glamor_pixmap_from_fd: Creates a pixmap to wrap a dma-buf fd.
*
}
else {
if (glamor_get_fd_from_bo(glamor_egl->fd, bo, &fd)) {
- *stride = pixmap->devKind;
- *size = pixmap->devKind * gbm_bo_get_height(bo);
}
}
+ *stride = pixmap->devKind;
+ *size = pixmap->devKind * gbm_bo_get_height(bo);
gbm_bo_destroy(bo);
failure: