summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-08-09 10:36:58 -0600
committerTim Rowley <[email protected]>2016-08-10 11:09:36 -0500
commitb311bdf92d65a0704faf8e89caa506d6d18c07e6 (patch)
tree8c79c31dcb399ec8b3047c081683fe8138c9ea1d
parent2eae02f77c66e9a392dd8c2dc459ddc943e30140 (diff)
swr: [rasterizer core] fix OOB check of viewport indices
Use correct comparison intrinsic for OOB check of viewport indices. Signed-off-by: Tim Rowley <[email protected]>
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/frontend.cpp4
1 files changed, 2 insertions, 2 deletions
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);
}