Mesa (master): swr: [rasterizer core] fix for possible int32 overflow condition
Tim Rowley
torowley at kemper.freedesktop.org
Wed Jul 20 15:22:23 UTC 2016
Module: Mesa
Branch: master
Commit: 5fe361e2c04781f674ee9d9ee4c7b731f6a9e59b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5fe361e2c04781f674ee9d9ee4c7b731f6a9e59b
Author: Tim Rowley <timothy.o.rowley at intel.com>
Date: Thu Jul 14 12:10:39 2016 -0600
swr: [rasterizer core] fix for possible int32 overflow condition
Signed-off-by: Tim Rowley <timothy.o.rowley at intel.com>
---
src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp b/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp
index 897556a..1909ddb 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);
More information about the mesa-commit
mailing list