swr/rast: code cleanup (no functional change)
authorTim Rowley <timothy.o.rowley@intel.com>
Mon, 22 May 2017 23:56:59 +0000 (18:56 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Tue, 30 May 2017 22:22:18 +0000 (17:22 -0500)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/binner.cpp

index b3fe4cfcdfe8cd143df2259b3b743b061e7fc815..daadd5f3d333a9aa33698c830adc03b637e96deb 100644 (file)
@@ -674,10 +674,14 @@ void BinTriangles(
         scisYmax = _simd_set1_epi32(state.scissorsInFixedPoint[0].ymax);
     }
 
+    // Make triangle bbox inclusive
+    bbox.xmax = _simd_sub_epi32(bbox.xmax, _simd_set1_epi32(1));
+    bbox.ymax = _simd_sub_epi32(bbox.ymax, _simd_set1_epi32(1));
+
     bbox.xmin = _simd_max_epi32(bbox.xmin, scisXmin);
     bbox.ymin = _simd_max_epi32(bbox.ymin, scisYmin);
-    bbox.xmax = _simd_min_epi32(_simd_sub_epi32(bbox.xmax, _simd_set1_epi32(1)), scisXmax);
-    bbox.ymax = _simd_min_epi32(_simd_sub_epi32(bbox.ymax, _simd_set1_epi32(1)), scisYmax);
+    bbox.xmax = _simd_min_epi32(bbox.xmax, scisXmax);
+    bbox.ymax = _simd_min_epi32(bbox.ymax, scisYmax);
 
     if (CT::IsConservativeT::value)
     {