[PATCH xserver 3/3] render: Fix default picture format initialization
Keith Packard
keithp at keithp.com
Fri Feb 23 23:57:24 UTC 2018
Adam Jackson <ajax at redhat.com> writes:
> This is at the bottom of fbPictureInit. This is code that every driver
> already runs. The loop will find that a pixmap of depth 16 has 16 bits
> per pixel, and since that's larger than 12, it will add x4r4g4b4.
But, a pixmap of depth 15 or 16 cannot support r5g6b5 formats, and that's what
the tests do -- eliminate offering formats which require more bits than
the depth of the drawable.
> You might be right that we _should not_ expose formats not present in
> the hardware, though Render has kinda already lost that fight by making
> a1 and a4 mandatory. But the Render code today, and forever, is making
> the assertion that the code above it _will_ handle these formats.
We just need to make sure we don't promise to store bits beyond the
depth of the drawable.
--
-keith
-------------- 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/20180223/a1bfab6d/attachment.sig>
More information about the xorg-devel
mailing list