/* Move locking out to get reasonable span performance.
*/
-static void viaSpanRenderStart( GLcontext *ctx )
+void viaSpanRenderStart( GLcontext *ctx )
{
viaContextPtr vmesa = VIA_CONTEXT(ctx);
VIA_FINISH_PRIM(vmesa);
LOCK_HARDWARE(vmesa);
viaFlushPrimsLocked(vmesa);
WAIT_IDLE(vmesa);
-
}
-static void viaSpanRenderFinish( GLcontext *ctx )
+void viaSpanRenderFinish( GLcontext *ctx )
{
viaContextPtr vmesa = VIA_CONTEXT(ctx);
_swrast_flush( ctx );
ADVANCE_RING();
}
- if (ctx->Line.StippleFlag) {
+ if (0 && ctx->Line.StippleFlag) {
BEGIN_RING(2);
OUT_RING( ((HC_SubA_HLP << 24) | ctx->Line.StipplePattern) );
OUT_RING( ((HC_SubA_HLPRF << 24) | ctx->Line.StippleFactor) );
}
}
- if (ctx->Line.StippleFlag) {
+ if (0 && ctx->Line.StippleFlag) {
vmesa->regEnable |= HC_HenLP_MASK;
vmesa->regHLP = ctx->Line.StipplePattern;
vmesa->regHLPRF = ctx->Line.StippleFactor;
struct gl_texture_unit *texUnit1 = &ctx->Texture.Unit[1];
if (VIA_DEBUG) fprintf(stderr, "%s - in\n", __FUNCTION__);
-#if 0
- if (!(vmesa->newState & (_NEW_COLOR |
- _NEW_TEXTURE |
- _NEW_DEPTH |
- _NEW_FOG |
- _NEW_LIGHT |
- _NEW_LINE |
- _NEW_POLYGON |
- _NEW_POLYGONSTIPPLE |
- _NEW_STENCIL)))
- return;
-#endif
if (texUnit0->_ReallyEnabled || texUnit1->_ReallyEnabled || ctx->Fog.Enabled) {
vmesa->regCmdB |= HC_HVPMSK_Cs;
via_translate_vertex(ctx, v0, &v[0]);
via_translate_vertex(ctx, v1, &v[1]);
via_translate_vertex(ctx, v2, &v[2]);
+ viaSpanRenderStart( ctx );
_swrast_Triangle(ctx, &v[0], &v[1], &v[2]);
+ viaSpanRenderFinish( ctx );
}
SWvertex v[2];
via_translate_vertex(ctx, v0, &v[0]);
via_translate_vertex(ctx, v1, &v[1]);
+ viaSpanRenderStart( ctx );
_swrast_Line(ctx, &v[0], &v[1]);
+ viaSpanRenderFinish( ctx );
}
GLcontext *ctx = vmesa->glCtx;
SWvertex v[1];
via_translate_vertex(ctx, v0, &v[0]);
+ viaSpanRenderStart( ctx );
_swrast_Point(ctx, &v[0]);
+ viaSpanRenderFinish( ctx );
}
/**********************************************************************/
_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 POINT_FALLBACK (0)
-/*#define LINE_FALLBACK (DD_LINE_STIPPLE)
-*/
-#define LINE_FALLBACK (0)
#define TRI_FALLBACK (0)
#define ANY_FALLBACK_FLAGS (POINT_FALLBACK|LINE_FALLBACK|TRI_FALLBACK)
#define ANY_RASTER_FLAGS (DD_TRI_LIGHT_TWOSIDE|DD_TRI_OFFSET|DD_TRI_UNFILLED)