summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_state.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 0dc3293ab2..f31c9f0aa3 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -498,7 +498,7 @@ static void r300Enable(GLcontext* ctx, GLenum cap, GLboolean state)
case GL_CULL_FACE:
r300UpdateCulling(ctx);
break;
-
+#ifdef HAVE_ZBS
case GL_POLYGON_OFFSET_POINT:
case GL_POLYGON_OFFSET_LINE:
WARN_ONCE("Don't know how to enable polygon offset point/line. Help me !\n");
@@ -512,6 +512,7 @@ static void r300Enable(GLcontext* ctx, GLenum cap, GLboolean state)
r300->hw.unk42B4.cmd[1] &= ~3;
}
break;
+#endif
case GL_VERTEX_PROGRAM_ARB:
//TCL_FALLBACK(rmesa->glCtx, R200_TCL_FALLBACK_TCL_DISABLE, state);
break;
@@ -816,7 +817,7 @@ static void r300DepthRange(GLcontext * ctx, GLclampd nearval, GLclampd farval)
/* =============================================================
* Polygon state
*/
-
+#ifdef HAVE_ZBS
static void r300PolygonOffset(GLcontext * ctx, GLfloat factor, GLfloat units)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
@@ -832,7 +833,7 @@ static void r300PolygonOffset(GLcontext * ctx, GLfloat factor, GLfloat units)
rmesa->hw.zbs.cmd[R300_ZBS_W_FACTOR] = r300PackFloat32(factor);
rmesa->hw.zbs.cmd[R300_ZBS_W_CONSTANT] = r300PackFloat32(constant);
}
-
+#endif
/* Routing and texture-related */
@@ -1634,6 +1635,7 @@ static void r300InvalidateState(GLcontext * ctx, GLuint new_state)
r300ResetHwState(r300);
}
+void update_zbias(GLcontext * ctx, int prim);
/**
* Completely recalculates hardware state based on the Mesa state.
@@ -1790,11 +1792,11 @@ void r300ResetHwState(r300ContextPtr r300)
r300->hw.unk4288.cmd[5] = 0x00000000;
r300->hw.unk42A0.cmd[1] = 0x00000000;
-
-#if 0
+#ifdef GA
+#ifndef HAVE_ZBS
r300->hw.unk42B4.cmd[1] = 0x00000000;
#endif
-
+#endif
r300->hw.unk42C0.cmd[1] = 0x4B7FFFFF;
r300->hw.unk42C0.cmd[2] = 0x00000000;
@@ -1993,6 +1995,7 @@ void r300InitStateFuncs(struct dd_function_table* functions)
functions->DepthRange = r300DepthRange;
functions->PointSize = r300PointSize;
-
+#ifdef HAVE_ZBS
functions->PolygonOffset = r300PolygonOffset;
+#endif
}