swr: [rasterizer core] fix OOB check of viewport indices
authorTim Rowley <timothy.o.rowley@intel.com>
Tue, 9 Aug 2016 16:36:58 +0000 (10:36 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Wed, 10 Aug 2016 16:09:36 +0000 (11:09 -0500)
Use correct comparison intrinsic for OOB check of viewport indices.

Signed-off-by: Tim Rowley <timothy.o.rowley@intel.com>
src/gallium/drivers/swr/rasterizer/core/frontend.cpp

index a62aa966c01f135daa39ffd9bbd79900fd8bc867..7f89d8526f29960749234535c9f8535010fcc674 100644 (file)
@@ -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);
                                 }