[Mesa-dev] [PATCH 3/4] i965/tiled_memcpy: Provide SSE2 for RGBA8 <-> BGRA8 swizzle.

Emil Velikov emil.l.velikov at gmail.com
Tue Apr 12 14:23:16 UTC 2016


On 12 April 2016 at 14:57, Roland Scheidegger <sroland at vmware.com> wrote:
> Am 12.04.2016 um 13:00 schrieb Emil Velikov:
>> On 11 April 2016 at 20:05, Matt Turner <mattst88 at gmail.com> wrote:
>>> From: Roland Scheidegger <sroland at vmware.com>
>>>
>>> The existing code uses SSSE3, and because it isn't compiled in a
>>> separate file compiled with that...
>> Just a note (not meant to derail things):
>>
>> One should be able to compile just hunks of the code with sse2/sss3/other.
>> Although I'm not sure how portable it is (wrt clang/msvc/etc)
>>
>
> Do you mean within the same file? That would be interesting (albeit I
> have my doubts it would be portable). Though for this case it's probably
> not really worth bothering...
>
Something like the following should work.

int sse3_func (void) __attribute__ ((__target__ ("sse3")));

For GCC ('target' section in [1] [2]) and the same for clang [3] (not
100% on this one). No idea about MSVC.

Never tried it personally, nor am I advocating that this has to be
done here. Just throwing it out there.

-Emil

[1] https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes
[2] https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html#x86-Function-Attributes
[3] http://clang.llvm.org/doxygen/emmintrin_8h_source.html


More information about the mesa-dev mailing list