From b311bdf92d65a0704faf8e89caa506d6d18c07e6 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Tue, 9 Aug 2016 10:36:58 -0600 Subject: swr: [rasterizer core] fix OOB check of viewport indices Use correct comparison intrinsic for OOB check of viewport indices. Signed-off-by: Tim Rowley --- src/gallium/drivers/swr/rasterizer/core/frontend.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp index a62aa966c01..7f89d8526f2 100644 --- a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp @@ -842,8 +842,8 @@ static void GeometryShaderStage( // OOB indices => forced to zero. simdscalari vNumViewports = _simd_set1_epi32(KNOB_NUM_VIEWPORTS_SCISSORS); - simdscalar vClearMask = _simd_cmplt_ps(vpiAttrib[0].x, _simd_castsi_ps(vNumViewports)); - vpiAttrib[0].x = _simd_and_ps(vClearMask, vpiAttrib[0].x); + simdscalari vClearMask = _simd_cmplt_epi32(_simd_castps_si(vpiAttrib[0].x), vNumViewports); + vpiAttrib[0].x = _simd_and_ps(_simd_castsi_ps(vClearMask), vpiAttrib[0].x); vViewPortIdx = _simd_castps_si(vpiAttrib[0].x); } -- cgit v1.2.3