[Mesa-dev] [PATCH 11/32] gbm: Introduce modifiers into surface/bo creation

Ben Widawsky ben at bwidawsk.net
Tue Jan 3 22:51:09 UTC 2017


On 17-01-02 18:37:02, Ben Widawsky wrote:
>The idea behind modifiers like this is that the user of GBM will have
>some mechanism to query what properties the hardware supports for its BO
>or surface. This information is directly passed in (and stored) so that
>the DRI implementation can create an image with the appropriate
>attributes.
>
>A getter() will be added later so that the user GBM will be able to
>query what modifier should be used.
>
>I've opted to store all modifiers passed in during creation and to make
>the determination happen at actual creation time for no reason other
>than it seems more flexible.
>
>v2: Make sure to check if count is non-zero in addition to testing if
>calloc fails. (Daniel)
>
>v3: Remove "usage" and "flags" from modifier creation. Requested by
>Kristian.
>

>Cc: Kristian Høgsberg <krh at bitplanet.net>
>Cc: Daniel Stone <daniel at fooishbar.org>
>Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
>Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
>Acked-by: Daniel Stone <daniels at collabora.com>
>---

[snip]

>+
>+GBM_EXPORT struct gbm_surface *
>+gbm_surface_create_with_modifiers(struct gbm_device *gbm,
>+                                  uint32_t width, uint32_t height,
>+                                  uint32_t format, uint32_t flags,
>+                                  const uint64_t *modifiers, const unsigned int count)
>+{

Kristian, I missed dropping flags from gbm surface creation here. It's fixed
locally.

[snip]




More information about the mesa-dev mailing list