From 5fe361e2c04781f674ee9d9ee4c7b731f6a9e59b Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Thu, 14 Jul 2016 12:10:39 -0600 Subject: swr: [rasterizer core] fix for possible int32 overflow condition Signed-off-by: Tim Rowley --- src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp b/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp index 897556a052c..1909ddbcd6a 100644 --- a/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp @@ -353,7 +353,7 @@ struct adjustEdgeConservative template INLINE void adjustScissorEdge(const double a, const double b, __m256d &vEdge) { - int32_t aabs = std::abs(static_cast(a)), babs = std::abs(static_cast(b)); + int64_t aabs = std::abs(static_cast(a)), babs = std::abs(static_cast(b)); int64_t manh = ((aabs * RT::ConservativeEdgeOffsetT::value) + (babs * RT::ConservativeEdgeOffsetT::value)) >> ((RT::PrecisionT::BitsT::value + RT::ConservativePrecisionT::BitsT::value) - RT::EdgePrecisionT::BitsT::value); -- cgit v1.2.3