summaryrefslogtreecommitdiffstats
path: root/src/mesa
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:40 -0600
commit8ac8ae83609d5d5f28037ccd5b81ce5e40db2d33 (patch)
treeb7f68f0c73f16a1e38af931ab86e1c3187447a3f /src/mesa
parent55b2033f0a4896a7930469711a052083c15edd3f (diff)
mesa: remove DD_LINE_STIPPLE flag
For the i915 driver, make it a local macro. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c4
-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.c8
5 files changed, 4 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index b97fc98d945..65b494910cd 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_LINE_STIPPLE (1 << 7)
#define ANY_FALLBACK_FLAGS (DD_LINE_STIPPLE | DD_TRI_STIPPLE | DD_POINT_ATTEN)
#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE | DD_TRI_OFFSET | DD_TRI_UNFILLED)
@@ -953,7 +954,8 @@ intelChooseRenderState(struct gl_context * ctx)
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct intel_context *intel = intel_context(ctx);
- GLuint flags = ctx->_TriangleCaps;
+ GLuint flags = ctx->_TriangleCaps |
+ (ctx->Line.StippleFlag ? DD_LINE_STIPPLE : 0);
const struct gl_fragment_program *fprog = ctx->FragmentProgram._Current;
bool have_wpos = (fprog && (fprog->Base.InputsRead & VARYING_BIT_POS));
GLuint index = 0;
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 7dd108c25d5..533c5ed6ced 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -100,7 +100,7 @@ void
_mesa_print_tri_caps( const char *name, GLuint flags )
{
_mesa_debug(NULL,
- "%s: (0x%x) %s%s%s%s%s%s%s%s\n",
+ "%s: (0x%x) %s%s%s%s%s%s%s\n",
name,
flags,
(flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "",
@@ -108,7 +108,6 @@ _mesa_print_tri_caps( const char *name, GLuint flags )
(flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "",
(flags & DD_TRI_OFFSET) ? "tri-offset, " : "",
(flags & DD_TRI_SMOOTH) ? "tri-smooth, " : "",
- (flags & DD_LINE_STIPPLE) ? "line-stipple, " : "",
(flags & DD_POINT_SMOOTH) ? "point-smooth, " : "",
(flags & DD_POINT_ATTEN) ? "point-atten, " : ""
);
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 5c36e050114..ce92a4222a7 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -439,7 +439,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.StippleFlag = state;
- ctx->_TriangleCaps ^= DD_LINE_STIPPLE;
break;
case GL_INDEX_LOGIC_OP:
if (ctx->API != API_OPENGL_COMPAT)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 6aa3ab15cb7..0b12e489fe1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3172,7 +3172,6 @@ struct gl_matrix_stack
#define DD_TRI_SMOOTH (1 << 3)
#define DD_TRI_STIPPLE (1 << 4)
#define DD_TRI_OFFSET (1 << 5)
-#define DD_LINE_STIPPLE (1 << 7)
#define DD_POINT_SMOOTH (1 << 8)
#define DD_POINT_ATTEN (1 << 9)
/*@}*/
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index e5e98dc5ee5..6578b375e8b 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -353,14 +353,6 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
}
/*
- * Lines
- */
- if (1/*new_state & _NEW_LINE*/) {
- if (ctx->Line.StippleFlag)
- ctx->_TriangleCaps |= DD_LINE_STIPPLE;
- }
-
- /*
* Polygons
*/
if (1/*new_state & _NEW_POLYGON*/) {