summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-04-16 19:06:22 -0600
committerBrian Paul <[email protected]>2013-04-17 11:59:41 -0600
commitb32fb8ac9e05b78d2bd07fcaf0d5f68525c4aa3b (patch)
tree8df87174b25eac9bd7305b73a77296dfb922f075
parentdfb1474aac97b94b36eed56954cbf2fadd0edded (diff)
mesa: remove DD_TRI_STIPPLE flag
Make it a local macro for the i915 driver. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c2
-rw-r--r--src/mesa/main/debug.c3
-rw-r--r--src/mesa/main/enable.c1
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/state.c2
5 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 1c7fa886741..e62fd612aae 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -944,6 +944,7 @@ intelFastRenderClippedPoly(struct gl_context * ctx, const GLuint * elts, GLuint
+#define DD_TRI_STIPPLE (1 << 4)
#define DD_TRI_OFFSET (1 << 5)
#define DD_LINE_STIPPLE (1 << 7)
#define DD_POINT_ATTEN (1 << 9)
@@ -957,6 +958,7 @@ intelChooseRenderState(struct gl_context * ctx)
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct intel_context *intel = intel_context(ctx);
GLuint flags = ctx->_TriangleCaps |
+ (ctx->Polygon.StippleFlag ? DD_TRI_STIPPLE : 0) |
((ctx->Polygon.OffsetPoint ||
ctx->Polygon.OffsetLine ||
ctx->Polygon.OffsetFill) ? DD_TRI_OFFSET : 0) |
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index d4ae741a2a4..77629b9f125 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -100,12 +100,11 @@ void
_mesa_print_tri_caps( const char *name, GLuint flags )
{
_mesa_debug(NULL,
- "%s: (0x%x) %s%s%s%s\n",
+ "%s: (0x%x) %s%s%s\n",
name,
flags,
(flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "",
(flags & DD_TRI_UNFILLED) ? "tri-unfilled, " : "",
- (flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "",
(flags & DD_TRI_SMOOTH) ? "tri-smooth, " : ""
);
}
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 88119295a77..fe157162490 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -632,7 +632,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.StippleFlag = state;
- ctx->_TriangleCaps ^= DD_TRI_STIPPLE;
break;
case GL_POLYGON_OFFSET_POINT:
if (!_mesa_is_desktop_gl(ctx))
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 2928695e8fc..3d77fbac274 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3170,7 +3170,6 @@ struct gl_matrix_stack
#define DD_TRI_LIGHT_TWOSIDE (1 << 1)
#define DD_TRI_UNFILLED (1 << 2)
#define DD_TRI_SMOOTH (1 << 3)
-#define DD_TRI_STIPPLE (1 << 4)
/*@}*/
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index eeac711a3d1..01059fa32d7 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -332,8 +332,6 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
if (1/*new_state & _NEW_POLYGON*/) {
if (ctx->Polygon.SmoothFlag)
ctx->_TriangleCaps |= DD_TRI_SMOOTH;
- if (ctx->Polygon.StippleFlag)
- ctx->_TriangleCaps |= DD_TRI_STIPPLE;
if (ctx->Polygon.FrontMode != GL_FILL
|| ctx->Polygon.BackMode != GL_FILL)
ctx->_TriangleCaps |= DD_TRI_UNFILLED;