summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-05-22 18:56:59 -0500
committerTim Rowley <[email protected]>2017-05-30 17:22:18 -0500
commitc606edb578a5a98d7afe7c66dc340548c3d12add (patch)
treea090075b84848df63e85093c8f3a06e1bd9c1cd4 /src/gallium/drivers/swr/rasterizer
parentb10c9507cee20edc7cd41682b50c62bb8abef85b (diff)
swr/rast: code cleanup (no functional change)
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/binner.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/binner.cpp b/src/gallium/drivers/swr/rasterizer/core/binner.cpp
index b3fe4cfcdfe..daadd5f3d33 100644
--- a/src/gallium/drivers/swr/rasterizer/core/binner.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/binner.cpp
@@ -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)
{