Hi,
On Mon, 24 Jun 2019 at 19:51, Simon Ser <[email protected]> wrote:
> +GBM_EXPORT struct gbm_bo *
> +gbm_bo_create_with_modifiers2(struct gbm_device *gbm,
> + uint32_t width, uint32_t height,
> + uint32_t format,
> + const uint64_t *modifiers,
> + const unsigned int count,
> + uint32_t usage)
> +{
> + if (width == 0 || height == 0) {
> + errno = EINVAL;
> + return NULL;
> + }
> +
> + if ((count && !modifiers) || (modifiers && !count)) {
> + errno = EINVAL;
> + return NULL;
> + }
> +
> + return gbm->bo_create(gbm, width, height, format, usage, modifiers,
> count);
This will trip an assert inside gbm_dri_bo_create:
/* Callers of this may specify a modifier, or a dri usage, but not both. The
* newer modifier interface deprecates the older usage flags.
*/
assert(!(usage && count));
You can fix this without modifying the libgbm <-> backend interface,
given that the two should be tightly coupled together. But within
Mesa, you'll need a new version of the DRIimageExtension, adding a
createImageWithModifiers2() which re-adds the flags, given that
they're not there in the current createImageWithModifiers() hook.
Cheers,
Daniel
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev