summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-04-16 19:06:22 -0600
committerBrian Paul <brianp@vmware.com>2013-04-17 11:59:40 -0600
commitc6a81448f8d55a510d8e32cf28e1e174bf2574dd (patch)
tree5c7a2327cc77fae5397ee64c294ce12b40894b43 /src
parent4f57fbb507c77a627c9660756ce1b7ab8bcfeb78 (diff)
mesa: remove DD_POINT_ATTEN flag
For the i915 driver, make it a local macro. v2: use conditional operator instead of bit shifting Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c4
-rw-r--r--src/mesa/main/debug.c5
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/points.c5
-rw-r--r--src/mesa/main/state.c8
5 files changed, 5 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 65b494910cd..24a84cbea5b 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -945,6 +945,7 @@ intelFastRenderClippedPoly(struct gl_context * ctx, const GLuint * elts, GLuint
#define DD_LINE_STIPPLE (1 << 7)
+#define DD_POINT_ATTEN (1 << 9)
#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)
@@ -955,7 +956,8 @@ intelChooseRenderState(struct gl_context * ctx)
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct intel_context *intel = intel_context(ctx);
GLuint flags = ctx->_TriangleCaps |
- (ctx->Line.StippleFlag ? DD_LINE_STIPPLE : 0);
+ (ctx->Line.StippleFlag ? DD_LINE_STIPPLE : 0) |
+ (ctx->Point._Attenuated ? DD_POINT_ATTEN : 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 28da81f37be..aae1d02bdb8 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -100,15 +100,14 @@ void
_mesa_print_tri_caps( const char *name, GLuint flags )
{
_mesa_debug(NULL,
- "%s: (0x%x) %s%s%s%s%s%s\n",
+ "%s: (0x%x) %s%s%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_OFFSET) ? "tri-offset, " : "",
- (flags & DD_TRI_SMOOTH) ? "tri-smooth, " : "",
- (flags & DD_POINT_ATTEN) ? "point-atten, " : ""
+ (flags & DD_TRI_SMOOTH) ? "tri-smooth, " : ""
);
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index fa58b170172..f91f3520994 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_POINT_ATTEN (1 << 9)
/*@}*/
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index c925d4cfd0c..3239c6f2804 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -122,11 +122,6 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
ctx->Point._Attenuated = (ctx->Point.Params[0] != 1.0 ||
ctx->Point.Params[1] != 0.0 ||
ctx->Point.Params[2] != 0.0);
-
- if (ctx->Point._Attenuated)
- ctx->_TriangleCaps |= DD_POINT_ATTEN;
- else
- ctx->_TriangleCaps &= ~DD_POINT_ATTEN;
break;
case GL_POINT_SIZE_MIN_EXT:
if (params[0] < 0.0F) {
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 4e66310afed..628e2755b20 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -343,14 +343,6 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
ctx->_TriangleCaps = 0;
/*
- * Points
- */
- if (1/*new_state & _NEW_POINT*/) {
- if (ctx->Point._Attenuated)
- ctx->_TriangleCaps |= DD_POINT_ATTEN;
- }
-
- /*
* Polygons
*/
if (1/*new_state & _NEW_POLYGON*/) {