ADVANCE_RING();
}
- if (0 && ctx->Line.StippleFlag) {
+ if (ctx->Line.StippleFlag) {
BEGIN_RING(2);
OUT_RING( ((HC_SubA_HLP << 24) | ctx->Line.StipplePattern) );
- OUT_RING( ((HC_SubA_HLPRF << 24) | ctx->Line.StippleFactor) );
+ OUT_RING( ((HC_SubA_HLPRF << 24) | ctx->Line.StippleFactor) );
ADVANCE_RING();
}
else {
BEGIN_RING(2);
OUT_RING( ((HC_SubA_HLP << 24) | 0xFFFF) );
- OUT_RING( ((HC_SubA_HLPRF << 24) | 0x1) );
+ OUT_RING( ((HC_SubA_HLPRF << 24) | 0xFFFF) );
ADVANCE_RING();
}
}
}
- if (0 && ctx->Line.StippleFlag) {
+ if (ctx->Line.StippleFlag) {
vmesa->regEnable |= HC_HenLP_MASK;
vmesa->regHLP = ctx->Line.StipplePattern;
vmesa->regHLPRF = ctx->Line.StippleFactor;
viaSpanRenderFinish( ctx );
}
+static void viaResetLineStipple( GLcontext *ctx )
+{
+ viaContextPtr vmesa = VIA_CONTEXT(ctx);
+ vmesa->regCmdB |= HC_HLPrst_MASK;
+}
+
/**********************************************************************/
/* Render unclipped begin/end objects */
/**********************************************************************/
GLubyte *vertptr = (GLubyte *)vmesa->verts; \
const GLuint vertsize = vmesa->vertexSize; \
const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \
- (void)elt;
-#define RESET_STIPPLE
+ const GLboolean stipple = ctx->Line.StippleFlag; \
+ (void) elt; (void) stipple;
+#define RESET_STIPPLE if ( stipple ) { printf("RESET\n"); viaResetLineStipple( ctx ); }
#define RESET_OCCLUSION
#define PRESERVE_VB_DEFS
#define ELT(x) x
_DD_NEW_TRI_STIPPLE | \
_NEW_POLYGONSTIPPLE)
-/* Via does support line stipple in hardware, and it is partially
- * working in the older versions of this driver:
- */
-#define LINE_FALLBACK (DD_LINE_STIPPLE)
+#define LINE_FALLBACK (0)
#define POINT_FALLBACK (0)
#define TRI_FALLBACK (0)
#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK)
tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
tnl->Driver.Render.CopyPV = _tnl_copy_pv;
tnl->Driver.Render.Interp = _tnl_interp;
+ tnl->Driver.Render.ResetLineStipple = viaResetLineStipple;
_tnl_invalidate_vertex_state( ctx, ~0 );
_tnl_invalidate_vertices( ctx, ~0 );
tnl->Driver.Render.Start = viaRenderStart;
tnl->Driver.Render.Finish = viaRenderFinish;
tnl->Driver.Render.PrimitiveNotify = viaRenderPrimitive;
- tnl->Driver.Render.ResetLineStipple = _swrast_ResetLineStipple;
+ tnl->Driver.Render.ResetLineStipple = viaResetLineStipple;
tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
tnl->Driver.Render.CopyPV = _tnl_copy_pv;
tnl->Driver.Render.Interp = _tnl_interp;