diff options
author | Tim Rowley <[email protected]> | 2017-05-17 17:39:33 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2017-05-30 17:21:36 -0500 |
commit | 5ea9a30f50dabe60fe95c9077457915dd5ed52c4 (patch) | |
tree | b06954a5a67e62cddbcebcc374747988a86bb6bf /src/gallium/drivers/swr/rasterizer/common/simdintrin.h | |
parent | fb9f7bd717dbaf94a744d352029603a273c7d332 (diff) |
swr/rast: SIMD16 FE - fix/use SIMD16 calcDeterminantIntVertical()
Stop double pumping the SIMD8 version.
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/common/simdintrin.h')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/common/simdintrin.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/common/simdintrin.h b/src/gallium/drivers/swr/rasterizer/common/simdintrin.h index 61c0c5461a3..ed6e56b5e26 100644 --- a/src/gallium/drivers/swr/rasterizer/common/simdintrin.h +++ b/src/gallium/drivers/swr/rasterizer/common/simdintrin.h @@ -456,6 +456,28 @@ __m256i _simd_cvtepu16_epi32(__m128i a) } INLINE +__m256i _simd_cvtepu16_epi64(__m128i a) +{ + __m128i resultlo = _mm_cvtepu16_epi64(a); + __m128i resulthi = _mm_cvtepu16_epi64(_mm_srli_si128(a, 4)); + + __m256i result = _mm256_castsi128_si256(resultlo); + + return _mm256_insertf128_si256(result, resulthi, 1); +} + +INLINE +__m256i _simd_cvtepu32_epi64(__m128i a) +{ + __m128i resultlo = _mm_cvtepu32_epi64(a); + __m128i resulthi = _mm_cvtepu32_epi64(_mm_srli_si128(a, 8)); + + __m256i result = _mm256_castsi128_si256(resultlo); + + return _mm256_insertf128_si256(result, resulthi, 1); +} + +INLINE __m256i _simd_packus_epi16(__m256i a, __m256i b) { __m128i alo = _mm256_extractf128_si256(a, 0); @@ -582,6 +604,8 @@ __m256i _simd_packs_epi32(__m256i a, __m256i b) #define _simd_cvtepu8_epi16 _mm256_cvtepu8_epi16 #define _simd_cvtepu8_epi32 _mm256_cvtepu8_epi32 #define _simd_cvtepu16_epi32 _mm256_cvtepu16_epi32 +#define _simd_cvtepu16_epi64 _mm256_cvtepu16_epi64 +#define _simd_cvtepu32_epi64 _mm256_cvtepu32_epi64 #define _simd_packus_epi16 _mm256_packus_epi16 #define _simd_packs_epi16 _mm256_packs_epi16 #define _simd_packus_epi32 _mm256_packus_epi32 |