From: Tim Rowley Date: Mon, 22 May 2017 23:56:59 +0000 (-0500) Subject: swr/rast: code cleanup (no functional change) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c606edb578a5a98d7afe7c66dc340548c3d12add;p=mesa.git swr/rast: code cleanup (no functional change) Reviewed-by: Bruce Cherniak --- 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) {