From: Tim Rowley Date: Tue, 9 Aug 2016 16:36:58 +0000 (-0600) Subject: swr: [rasterizer core] fix OOB check of viewport indices X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b311bdf92d65a0704faf8e89caa506d6d18c07e6;p=mesa.git swr: [rasterizer core] fix OOB check of viewport indices Use correct comparison intrinsic for OOB check of viewport indices. Signed-off-by: Tim Rowley --- 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); }