[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:44:46 UTC 2018


Quoting Maarten Lankhorst (2018-08-03 12:02:38)
> Op 03-08-18 om 07:01 schreef Bryce Harrington:
> > On Wed, Aug 01, 2018 at 02:41:33PM +0200, Maarten Lankhorst wrote:
> >> 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,
> > Just out of curiosity, why are these routines named with float twice?
> >
> > Bryce
> All the fetch/store functions are named fetch_scanline_<format>_float, with format being rgb_float
> that gave a double float.

Would it be consistent with elsewhere to call it rgbaf? We trade one
confusion (float_float) for another (rgba, f).
-Chris


More information about the Pixman mailing list