diff options
author | Xiang, Haihao <[email protected]> | 2008-07-04 09:53:51 +0800 |
---|---|---|
committer | Xiang, Haihao <[email protected]> | 2008-07-04 09:53:51 +0800 |
commit | 0c1e96e6d38c0acfd3fe6b4116f2a67f5bf62136 (patch) | |
tree | 43f8ce468d2044d1455366fac79bd68c8d0fd153 | |
parent | 530df581dd1a502041b44afee8023a09d5b7e59f (diff) |
mesa: fix polygon offset issue (bug #12061)
-rw-r--r-- | src/mesa/tnl_dd/t_dd_tritmp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/tnl_dd/t_dd_tritmp.h b/src/mesa/tnl_dd/t_dd_tritmp.h index 2bb890593b1..1ae70f4059f 100644 --- a/src/mesa/tnl_dd/t_dd_tritmp.h +++ b/src/mesa/tnl_dd/t_dd_tritmp.h @@ -267,7 +267,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) GLfloat bc = b * ic; if ( ac < 0.0f ) ac = -ac; if ( bc < 0.0f ) bc = -bc; - offset += MAX2( ac, bc ) * ctx->Polygon.OffsetFactor; + offset += MAX2( ac, bc ) * ctx->Polygon.OffsetFactor / ctx->DrawBuffer->_MRD; } offset *= ctx->DrawBuffer->_MRD * (REVERSE_DEPTH ? -1.0 : 1.0); } @@ -539,7 +539,7 @@ static void TAG(quadr)( GLcontext *ctx, GLfloat bc = b * ic; if ( ac < 0.0f ) ac = -ac; if ( bc < 0.0f ) bc = -bc; - offset += MAX2( ac, bc ) * ctx->Polygon.OffsetFactor; + offset += MAX2( ac, bc ) * ctx->Polygon.OffsetFactor / ctx->DrawBuffer->_MRD; } offset *= ctx->DrawBuffer->_MRD * (REVERSE_DEPTH ? -1.0 : 1.0); } |