[Pixman] [PATCH 1/2] pixman: Add support for argb/xrgb float formats, v3.

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 3 08:56:45 UTC 2018


Quoting Chris Wilson (2018-10-03 09:47:47)
> Quoting Maarten Lankhorst (2018-08-01 13:41:33)
> > Pixman is already using the floating point formats internally, expose
> > this capability in case someone wants to support higher bit per
> > component formats.
> > 
> > This is useful for igt which depends on cairo to do the rendering.
> > It can use it to convert floats internally to planar Y'CbCr formats,
> > or to F16.
> > 
> > Changes since v1:
> > - Use RGBA 128 bits and RGB 96 bits memory layouts, to better match the opengl format.
> > Changes since v2:
> > - Add asserts in accessor and for strides to force alignment.
> > - Move test changes to their own commit.
> > 
> > Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> > ---
> >  pixman/pixman-access.c     | 128 ++++++++++++++++++++++++++++++++++++-
> >  pixman/pixman-bits-image.c |   3 +
> >  pixman/pixman-image.c      |   4 ++
> >  pixman/pixman.h            |  32 ++++++----
> >  4 files changed, 155 insertions(+), 12 deletions(-)
> > 
> > diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
> > index 4f0642d77785..10fa049becf4 100644
> > --- a/pixman/pixman-access.c
> > +++ b/pixman/pixman-access.c
> > @@ -642,6 +642,48 @@ fetch_scanline_a2r10g10b10_float (bits_image_t *  image,
> >  }
> >  
> >  /* Expects a float buffer */
> > +#ifndef PIXMAN_FB_ACCESSORS
> > +static void
> > +fetch_scanline_rgb_float_float (bits_image_t   *image,
> > +                               int             x,
> > +                               int             y,
> > +                               int             width,
> > +                               uint32_t *      b,
> > +                               const uint32_t *mask)
> > +{
> > +    const float *bits = (float *)image->bits + y * image->rowstride;
> 
> rowstride is in bytes, is it not?

No, it's in units of uint32_t.
-Chris


More information about the Pixman mailing list