[Pixman] [PATCH 2/2] sse2, mmx: Remove initial unaligned loops in fetchers
Søren Sandmann
sandmann at cs.au.dk
Wed Aug 28 16:27:08 PDT 2013
Siarhei Siamashka <siarhei.siamashka at gmail.com> writes:
> On Wed, 28 Aug 2013 16:01:27 -0400
> Søren Sandmann <sandmann at cs.au.dk> wrote:
>
>> From: Søren Sandmann Pedersen <ssp at redhat.com>
>>
>> Now that the general implementation guarantees that the iter buffers
>> are aligned to 16 bytes, there is no longer any reason for the initial
>> loop to bring the destination buffer up to an aligned position.
>
> What about the direct fetch to destination optimization?
With this patch, there is a new rule that "iterators may assume that
iter->buffer is aligned", but the old rule that "the buffer returned by
the iterator can be any alignment that the iterator wants" is still in
effect.
Since the direct fetch to destination optimization works by iterators
returning a pointer directly into the image bits and since the combiners
are still not allowed to make assumptions about the alignment of the
buffers they are given, this still works.
There has been some talk in the past [1] about have an even-more-direct
optimization, where a pointer to the destination image would be stored
in iter->buffer so that SRC operations could be done by just running the
source iterator. With this new alignment assumption, such an
optimization becomes even more impossible, but in any it was always
going to require a rather complex internal API to work because iterators
are not required to use iter->buffer at all.
Søren
[1] http://lists.freedesktop.org/archives/pixman/2011-January/000927.html
More information about the Pixman
mailing list