diff options
author | Matt Turner <[email protected]> | 2014-06-14 22:31:33 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-06-17 10:18:20 -0700 |
commit | 83649587c6a10a99d00a01eb72a6563a61aaf8a7 (patch) | |
tree | e27c3af5a159bce88edbf76f43aef0b352f3bfdc /src/mesa/drivers/dri/i965/intel_tex_subimage.c | |
parent | 52a4065493febf9a7f7ed7801c90a1515526c9ad (diff) |
i965: Use standard SSE intrinsics instead of gcc built-ins.
Let's this file compile with clang.
Reviewed-by: Frank Henigman <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_tex_subimage.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_subimage.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c index 5d797500e8b..9cfff7aa55c 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c @@ -42,6 +42,10 @@ #include "intel_mipmap_tree.h" #include "intel_blit.h" +#ifdef __SSSE3__ +#include <tmmintrin.h> +#endif + #define FILE_DEBUG_FLAG DEBUG_TEXTURE #define ALIGN_DOWN(a, b) ROUND_DOWN_TO(a, b) @@ -174,13 +178,11 @@ err: static const uint8_t rgba8_permutation[16] = { 2,1,0,3, 6,5,4,7, 10,9,8,11, 14,13,12,15 }; -typedef char v16 __attribute__((vector_size(16))); - /* NOTE: dst must be 16 byte aligned */ #define rgba8_copy_16(dst, src) \ - *(v16*)(dst) = __builtin_ia32_pshufb128( \ - (v16) __builtin_ia32_loadups((float*)(src)), \ - *(v16*) rgba8_permutation \ + *(__m128i *)(dst) = _mm_shuffle_epi8( \ + (__m128i) _mm_loadu_ps((float *)(src)), \ + *(__m128i *) rgba8_permutation \ ) #endif |