summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer/common
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-02-16 10:53:01 -0800
committerTim Rowley <[email protected]>2017-03-20 18:04:53 -0500
commitf445b6de9cc416ba3f3a900e98baa57e090c39ed (patch)
tree1e358d3955dba3eb440357dd5d6914e60761bb76 /src/gallium/drivers/swr/rasterizer/common
parente4d1294afbd798fa145d68a1c4f4ce80622a62dc (diff)
swr: [rasterizer] Backend code adjustments
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/common')
-rw-r--r--src/gallium/drivers/swr/rasterizer/common/simdintrin.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/common/simdintrin.h b/src/gallium/drivers/swr/rasterizer/common/simdintrin.h
index ea79902a002..562408db8db 100644
--- a/src/gallium/drivers/swr/rasterizer/common/simdintrin.h
+++ b/src/gallium/drivers/swr/rasterizer/common/simdintrin.h
@@ -660,6 +660,15 @@ simdscalar vMask(int32_t mask)
}
INLINE
+simdscalari vMaski(int32_t mask)
+{
+ __m256i vec = _mm256_set1_epi32(mask);
+ const __m256i bit = _mm256_set_epi32(0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01);
+ vec = _simd_and_si(vec, bit);
+ return _simd_cmplt_epi32(_mm256_setzero_si256(), vec);
+}
+
+INLINE
void _simd_mov(simdscalar &r, unsigned int rlane, simdscalar& s, unsigned int slane)
{
OSALIGNSIMD(float) rArray[KNOB_SIMD_WIDTH], sArray[KNOB_SIMD_WIDTH];