[Mesa-dev] [PATCH 1/3] wayland-drm: Expose server-side xbgr2101010 and abgr2101010 formats.

Daniel Stone daniel at fooishbar.org
Tue Mar 27 17:45:01 UTC 2018


Hi Ilia,

On 14 March 2018 at 19:02, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> On Tue, Mar 13, 2018 at 5:30 AM, Daniel Stone <daniel at fooishbar.org> wrote:
>> On 12 March 2018 at 20:45, Mario Kleiner <mario.kleiner.de at gmail.com> wrote:
>>> This way the wayland server can signal support for these formats
>>> to wayland EGL clients. This is currently used by nouveau for 10
>>> bpc support.
>>>
>>> Tested with glmark2-wayland and glmark2-es2-wayland under weston
>>> to now expose 10 bpc EGL configs under nouveau.
>>
>> Do we need a way to ensure that the backend driver does actually
>> support BGR for texturing? AFAIK, if a client happens to select a BGR
>> config on other drivers now - using a compositor which does not
>> implement wl_drm - this will break for them.
>
> I think in practice, every hw driver can support both for texturing if
> it can support one, since swizzles are always possible (due to
> ARB_texture_swizzle).
>
> In practice at least nouveau prior to Mario's patches only supported
> it one way. I just checked r600, radeonsi, i965 and freedreno, and
> they appear to support both for texturing. I think that covers the
> majority of the likely 10bpc users.

Fair enough. My only remaining issue - and there's nothing the patch
can really do about it - is a bit of a crapshoot. wayland-drm has no
hint that the underlying KMS device prefers ABGR to ARGB, and clients
have no way of determining the channel order even if they did want to
hardcode it for a specific usecase. So nothing in here really
guarantees that we'll get scanout. But, that being said, this seems
harmless enough, so this patch is:
Reviewed-by: Daniel Stone <daniels at collabora.com>

Cheers,
Daniel


More information about the mesa-dev mailing list