Make it a local macro for the i915 driver.
v2: use conditional operator instead of bit shifting
Reviewed-by: Eric Anholt <eric@anholt.net>
+#define DD_TRI_STIPPLE (1 << 4)
#define DD_TRI_OFFSET (1 << 5)
#define DD_LINE_STIPPLE (1 << 7)
#define DD_POINT_ATTEN (1 << 9)
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) |
_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, " : ""
);
}
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))
#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)
/*@}*/
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;