How to test whether a buffer is in linear format

Hoosier, Matt Matt.Hoosier at
Sat Aug 6 23:44:43 UTC 2022

Oh, facepalm. I didn’t even think to look at the numeric value. Sorry for the confusion.
From: Simon Ser <contact at>
Sent: Saturday, August 6, 2022 3:10:53 PM
To: Hoosier, Matt
Cc: Pekka Paalanen; dri-devel at; wayland-devel at
Subject: Re: How to test whether a buffer is in linear format

CAUTION - EXTERNAL EMAIL: Do not click any links or open any attachments unless you trust the sender and know the content is safe.

On Saturday, August 6th, 2022 at 21:56, Hoosier, Matt <Matt.Hoosier at> wrote:

> Any idea what’s up with some compositors adding code to infer
> DRM_FORMAT_MOD_LINEAR semantics when the buffer’s modifiers are set
> to 0?

What does that mean? A buffer only has a single modifier, and LINEAR == 0.

> Wlroots, for example, added this as a “safety net for drm drivers not announcing modifiers”.

This is not upstream wlroots. This change doesn't make sense to me at
all. Either a driver supports modifiers and advertises support for it,
either it doesn't and gbm_surface_create_with_modifiers fails. At any
rate, forcing LINEAR in this code-path doesn't make sense.


CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wayland-devel mailing list