[PATCH dri3proto v2] Add modifier/multi-plane requests, bump to v1.1

Eric Anholt eric at anholt.net
Thu Jul 27 23:06:35 UTC 2017


Keith Packard <keithp at keithp.com> writes:

> [ Unknown signature status ]
> Eric Anholt <eric at anholt.net> writes:
>
>> That's what both patch 5 of this series and pixman say the depth is for
>> bgrx8888.  I think things have only worked because nobody uses bgrx8888
>> with Render and also tries to do core operations with those contents,
>> but I think we should figure out what we actually want the behavior to
>> be here.
>
> The core protocol uses the low bits in a pixel; is there actually
> translation code which shifts things around as necessary to make this
> work?

Ah, I was misled by looking at Pixman.  Render handles the depth of
formats in an interesting way.  From a quick hack of rendercheck:

Found server-supported format: a8 8 depth
Found server-supported format: a4 4 depth
Found server-supported format: a8r8g8b8 32 depth
Found server-supported format: x8r8g8b8 32 depth
Found server-supported format: b8g8r8a8 32 depth
Found server-supported format: b8g8r8x8 32 depth
Found server-supported format: r8g8b8 24 depth
Found server-supported format: b8g8r8 24 depth
Found server-supported format: x3r4g4b4 15 depth
Found server-supported format: x3b4g4r4 15 depth
Found server-supported format: r5g5b5 15 depth
Found server-supported format: b5g5r5 15 depth
Found server-supported format: x4r4g4b4 16 depth
Found server-supported format: x4b4g4r4 16 depth
Found server-supported format: x1r5g5b5 16 depth
Found server-supported format: x1b5g5r5 16 depth
Found server-supported format: r5g6b5 16 depth
Found server-supported format: b5g6r5 16 depth
Found server-supported format: a4r4g4b4 16 depth
Found server-supported format: a4b4g4r4 16 depth
Found server-supported format: x8b8g8r8 32 depth
Found server-supported format: x2r10g10b10 32 depth
Found server-supported format: x2b10g10r10 32 depth

Note here that b8g8r8x8 couldn't be used with a depth 24 pixmap -- it's
only advertised under 32 depth.  The r8g8b8 and x8r8g8b8 I believe
internally are the same PictFormat, it's just advertised under both 24
and 32bpp.  (picture.c's PictureCreateDefaultFormats() for reference)

>> I don't think we want to define that CopyArea from XRGB8888 to BGRX8888
>> shifts the 24 bits of depth up by 8 within the 32bpp pixels.
>
> I don't think you have a choice if you actually report BGRX8888 as depth
> 24 -- you're going to have depth 24 pixmaps and they'll have to work
> with both.

I think one option would be to have this extension create pixmaps with a
depth equal to the highest populated bit of the fourcc plus one.  Sure,
it's weird that rgbx8888 and xrgb888 have a different depth, but "depth"
is a pretty awful concept at this point.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170727/1a0afb16/attachment-0001.sig>


More information about the xorg-devel mailing list