mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
Make line stipple a fallback.
Make sure fallbacks are wrapped by SpanRenderStart/SpanRenderFinish
This commit is contained in:
parent
f102f7ae3d
commit
e972497310
5 changed files with 16 additions and 21 deletions
|
|
@ -522,7 +522,6 @@ viaCreateContext(const __GLcontextModes *mesaVis,
|
|||
vmesa->glBuffer = NULL;
|
||||
|
||||
vmesa->texHeap = mmInit(0, viaScreen->textureSize);
|
||||
vmesa->stippleInHw = 1;
|
||||
vmesa->renderIndex = ~0;
|
||||
|
||||
make_empty_list(&vmesa->TexObjList);
|
||||
|
|
|
|||
|
|
@ -251,17 +251,16 @@ static void viaSetBuffer(GLcontext *ctx, GLframebuffer *colorBuffer,
|
|||
|
||||
/* 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 );
|
||||
|
|
|
|||
|
|
@ -26,5 +26,7 @@
|
|||
#define _VIA_SPAN_H
|
||||
|
||||
extern void viaInitSpanFuncs(GLcontext *ctx);
|
||||
extern void viaSpanRenderStart( GLcontext *ctx );
|
||||
extern void viaSpanRenderFinish( GLcontext *ctx );
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ static void via_emit_state(viaContextPtr vmesa)
|
|||
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) );
|
||||
|
|
@ -1345,7 +1345,7 @@ static void viaChooseLineState(GLcontext *ctx)
|
|||
}
|
||||
}
|
||||
|
||||
if (ctx->Line.StippleFlag) {
|
||||
if (0 && ctx->Line.StippleFlag) {
|
||||
vmesa->regEnable |= HC_HenLP_MASK;
|
||||
vmesa->regHLP = ctx->Line.StipplePattern;
|
||||
vmesa->regHLPRF = ctx->Line.StippleFactor;
|
||||
|
|
@ -1513,18 +1513,6 @@ void viaValidateState( GLcontext *ctx )
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -411,7 +411,9 @@ via_fallback_tri(viaContextPtr vmesa,
|
|||
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 );
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -424,7 +426,9 @@ via_fallback_line(viaContextPtr vmesa,
|
|||
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 );
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -435,7 +439,9 @@ via_fallback_point(viaContextPtr vmesa,
|
|||
GLcontext *ctx = vmesa->glCtx;
|
||||
SWvertex v[1];
|
||||
via_translate_vertex(ctx, v0, &v[0]);
|
||||
viaSpanRenderStart( ctx );
|
||||
_swrast_Point(ctx, &v[0]);
|
||||
viaSpanRenderFinish( ctx );
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
|
|
@ -540,10 +546,11 @@ static void viaFastRenderClippedPoly(GLcontext *ctx, const GLuint *elts,
|
|||
_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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue