This will be used so we can query information per plane.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: Jason Ekstrand <jason@jlekstrand.net>
Acked-by: Daniel Stone <daniels@collabora.com>
return ret;
}
+static uint32_t
+gbm_dri_bo_get_stride(struct gbm_bo *_bo, int plane)
+{
+ return _bo->stride;
+}
+
static void
gbm_dri_bo_destroy(struct gbm_bo *_bo)
{
dri->base.base.bo_get_fd = gbm_dri_bo_get_fd;
dri->base.base.bo_get_planes = gbm_dri_bo_get_planes;
dri->base.base.bo_get_handle = gbm_dri_bo_get_handle_for_plane;
+ dri->base.base.bo_get_stride = gbm_dri_bo_get_stride;
dri->base.base.bo_destroy = gbm_dri_bo_destroy;
dri->base.base.destroy = dri_destroy;
dri->base.base.surface_create = gbm_dri_surface_create;
GBM_EXPORT uint32_t
gbm_bo_get_stride(struct gbm_bo *bo)
{
- return bo->stride;
+ return bo->gbm->bo_get_stride(bo, 0);
}
/** Get the format of the buffer object
int (*bo_get_fd)(struct gbm_bo *bo);
int (*bo_get_planes)(struct gbm_bo *bo);
union gbm_bo_handle (*bo_get_handle)(struct gbm_bo *bo, int plane);
+ uint32_t (*bo_get_stride)(struct gbm_bo *bo, int plane);
void (*bo_destroy)(struct gbm_bo *bo);
struct gbm_surface *(*surface_create)(struct gbm_device *gbm,