summaryrefslogtreecommitdiff
path: root/src/mesa/tnl_dd/t_dd_tritmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl_dd/t_dd_tritmp.h')
-rw-r--r--src/mesa/tnl_dd/t_dd_tritmp.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/mesa/tnl_dd/t_dd_tritmp.h b/src/mesa/tnl_dd/t_dd_tritmp.h
index 0bf32ff344..1ae70f4059 100644
--- a/src/mesa/tnl_dd/t_dd_tritmp.h
+++ b/src/mesa/tnl_dd/t_dd_tritmp.h
@@ -155,10 +155,6 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
{
facing = AREA_IS_CCW( cc ) ^ ctx->Polygon._FrontBit;
- if (DO_TWOSTENCIL && ctx->Stencil.TestTwoSide) {
- ctx->_Facing = facing; /* mixed mode rendering: for 2-sided stencil test */
- }
-
if (DO_UNFILLED) {
if (facing) {
mode = ctx->Polygon.BackMode;
@@ -271,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);
}
@@ -393,7 +389,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
#if DO_QUAD
#if DO_FULL_QUAD
-static void TAG(quad)( GLcontext *ctx,
+static void TAG(quadr)( GLcontext *ctx,
GLuint e0, GLuint e1, GLuint e2, GLuint e3 )
{
struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb;
@@ -421,10 +417,6 @@ static void TAG(quad)( GLcontext *ctx,
{
facing = AREA_IS_CCW( cc ) ^ ctx->Polygon._FrontBit;
- if (DO_TWOSTENCIL && ctx->Stencil.TestTwoSide) {
- ctx->_Facing = facing; /* mixed mode rendering: for 2-sided stencil test */
- }
-
if (DO_UNFILLED) {
if (facing) {
mode = ctx->Polygon.BackMode;
@@ -547,7 +539,7 @@ static void TAG(quad)( 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);
}
@@ -681,7 +673,7 @@ static void TAG(quad)( GLcontext *ctx,
}
}
#else
-static void TAG(quad)( GLcontext *ctx, GLuint e0,
+static void TAG(quadr)( GLcontext *ctx, GLuint e0,
GLuint e1, GLuint e2, GLuint e3 )
{
if (DO_UNFILLED) {
@@ -773,7 +765,7 @@ static void TAG(points)( GLcontext *ctx, GLuint first, GLuint last )
static void TAG(init)( void )
{
#if DO_QUAD
- TAB[IND].quad = TAG(quad);
+ TAB[IND].quad = TAG(quadr);
#endif
#if DO_TRI
TAB[IND].triangle = TAG(triangle);