summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-07-14 12:10:39 -0600
committerTim Rowley <[email protected]>2016-07-20 10:22:15 -0500
commit5fe361e2c04781f674ee9d9ee4c7b731f6a9e59b (patch)
tree2d89e2e33aec74e43d0ac1d71f5f68e6099ccd86 /src
parenta123d12e1424816b4c3ac5422db7e5373df8d2fa (diff)
swr: [rasterizer core] fix for possible int32 overflow condition
Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp2
1 files changed, 1 insertions, 1 deletions
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<RT, std::false_type>
template <typename RT>
INLINE void adjustScissorEdge(const double a, const double b, __m256d &vEdge)
{
- int32_t aabs = std::abs(static_cast<int32_t>(a)), babs = std::abs(static_cast<int32_t>(b));
+ int64_t aabs = std::abs(static_cast<int64_t>(a)), babs = std::abs(static_cast<int64_t>(b));
int64_t manh = ((aabs * RT::ConservativeEdgeOffsetT::value) + (babs * RT::ConservativeEdgeOffsetT::value)) >>
((RT::PrecisionT::BitsT::value + RT::ConservativePrecisionT::BitsT::value) - RT::EdgePrecisionT::BitsT::value);