[Mesa-dev] [PATCH 11/27] gbm: Get modifiers from DRI
Daniel Stone
daniel at fooishbar.org
Fri Dec 2 09:43:07 UTC 2016
Hi Ben,
On 1 December 2016 at 22:09, Ben Widawsky <benjamin.widawsky at intel.com> wrote:
> @@ -678,6 +679,28 @@ gbm_dri_bo_get_offset(struct gbm_bo *_bo, int plane)
> return (uint32_t)offset;
> }
>
> +static uint64_t
> +gbm_dri_bo_get_modifier(struct gbm_bo *_bo)
> +{
> + struct gbm_dri_device *dri = gbm_dri_device(_bo->gbm);
> + struct gbm_dri_bo *bo = gbm_dri_bo(_bo);
> +
> + if (!dri->image || dri->image->base.version < 14) {
> + errno = ENOSYS;
> + return 0;
> + }
Sticking this here prevents my cursor crash:
+ /* Dumb buffers have no modifiers */
+ if (!bo->image)
+ return 0;
Cheers,
Daniel
More information about the mesa-dev
mailing list