Re: [PATCH xserver 3/3] render: Fix default picture format initialization

2018-02-26 Thread Adam Jackson
On Fri, 2018-02-23 at 15:57 -0800, Keith Packard wrote: > > 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

Re: [PATCH xserver 3/3] render: Fix default picture format initialization

2018-02-26 Thread Michel Dänzer
On 2018-02-24 12:58 AM, Keith Packard wrote: > Michel Dänzer writes: > >> On 2018-02-22 10:53 PM, Adam Jackson wrote: >>> "depth" for a picture format is the sum of bits of a/r/g/b, and not x. >>> The default format list was creating an x8r8g8b8 format at depth 32, >>> which

Re: [PATCH xserver 3/3] render: Fix default picture format initialization

2018-02-23 Thread Keith Packard
Adam Jackson writes: > What would this mean? If I point this picture at a depth-30 pixmap, is > the intent really "draw into this as though it was x8r8g8b8"? Is there > a world where that's useful? I agree that it probably isn't useful, but we need to be careful with the

Re: [PATCH xserver 3/3] render: Fix default picture format initialization

2018-02-23 Thread Keith Packard
Michel Dänzer writes: > On 2018-02-22 10:53 PM, Adam Jackson wrote: >> "depth" for a picture format is the sum of bits of a/r/g/b, and not x. >> The default format list was creating an x8r8g8b8 format at depth 32, >> which is wrong. Likewise, servers supporting depth 30 would

Re: [PATCH xserver 3/3] render: Fix default picture format initialization

2018-02-23 Thread Keith Packard
Adam Jackson 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

Re: [PATCH xserver 3/3] render: Fix default picture format initialization

2018-02-23 Thread Adam Jackson
On Thu, 2018-02-22 at 16:52 -0800, Keith Packard wrote: > > switch (bpp) { > > case 16: > > /* depth 12 formats */ > > -if (pDepth->depth >= 12) { > > -addFormat(formats, , PICT_x4r4g4b4, > > pDepth->depth); > > -

Re: [PATCH xserver 3/3] render: Fix default picture format initialization

2018-02-23 Thread Adam Jackson
On Fri, 2018-02-23 at 10:51 +0100, Michel Dänzer wrote: > On 2018-02-22 10:53 PM, Adam Jackson wrote: > > "depth" for a picture format is the sum of bits of a/r/g/b, and not x. > > The default format list was creating an x8r8g8b8 format at depth 32, > > which is wrong. Likewise, servers supporting

Re: [PATCH xserver 3/3] render: Fix default picture format initialization

2018-02-23 Thread Michel Dänzer
On 2018-02-22 10:53 PM, Adam Jackson wrote: > "depth" for a picture format is the sum of bits of a/r/g/b, and not x. > The default format list was creating an x8r8g8b8 format at depth 32, > which is wrong. Likewise, servers supporting depth 30 would get an > x8r8g8b8 format at depth 30, which is

Re: [PATCH xserver 3/3] render: Fix default picture format initialization

2018-02-22 Thread Keith Packard
Adam Jackson writes: > "depth" for a picture format is the sum of bits of a/r/g/b, and not x. > The default format list was creating an x8r8g8b8 format at depth 32, > which is wrong. Likewise, servers supporting depth 30 would get an > x8r8g8b8 format at depth 30, which is

RE: [PATCH xserver 3/3] render: Fix default picture format initialization

2018-02-22 Thread Peter Harris
> "depth" for a picture format is the sum of bits of a/r/g/b, and not x. > The default format list was creating an x8r8g8b8 format at depth 32, > which is wrong. Likewise, servers supporting depth 30 would get an > x8r8g8b8 format at depth 30, which is nonsense. > formats[nformats].format =