[Pixman] [PATCH] test: Add a new benchmarker targeting affine operations

Ben Avison bavison at riscosopen.org
Tue Apr 14 11:20:50 PDT 2015

On Tue, 14 Apr 2015 11:28:51 +0100, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> you asked about reading the cache sizes; I have no idea about that.
>> +#define PAGE_SIZE (4 * 1024)
> Hm, sysconf(3) has PAGESIZE query, but I don't know if it is
> appropriate here. I also tend to forget that Windows might be relevant
> for Pixman.

I see the front page of http://www.pixman.org/ says "many platforms,
including Linux, BSD Derivatives, MacOS X, and Windows" so I expect it
would be a requirement, yes.

[various places]
> Empty line.

Do you just want to add those yourself?

> Hmm. Should I maybe add another, or modify, function to print the list
> of recognized pixel formats and operators into utils.c?

Like check-formats.c does, you mean? You could do, but perhaps the usage
might be starting to get rather unwieldy. I usually have a pretty good
idea of what I want to benchmark, but might benefit from a reminder of
the order the parameters need to go in. Perhaps only print the operators
and formats if someone uses an illegal name for one?

> Any reason we shouldn't use the same test pattern here as
> lowlevel-blt-bench is parsing? Just for the op/src/mask/dst.

Since it exists now, you might as well. I just didn't want to end up with
another enormous table to maintain like in lowlevel-blt-bench, nor did I
want to rule out being able to test things like reversing red/blue order
as part of the operation.

>> +        if ((PIXMAN_FORMAT_R(mask_format) || PIXMAN_FORMAT_G(mask_format) || PIXMAN_FORMAT_B(mask_format)))
>> +            pixman_image_set_component_alpha (mask_image, 1);
> Ah, but you use a different way to set CA. Any reason to differ from
> lowlevel-blt-bench?

Not really. It's just that component alpha operations only make sense
with a mask pixel format that includes RGB components, and it's a waste
of memory and cache space for unified alpha operations to use a mask
pixel format unless it only contains alpha - so I've long felt it's a bit
redundant to have to specify the component/unified flag in addition.


More information about the Pixman mailing list