diff options
author | keithw <keithw> | 2001-12-05 13:41:27 +0000 |
---|---|---|
committer | keithw <keithw> | 2001-12-05 13:41:27 +0000 |
commit | d533236a75b2c4ec33aa0a6374ecd8774e23209a (patch) | |
tree | ea6db5539d873bbb031bb0d1170232dfd5ca2f50 | |
parent | c84a51587b5f1e7b624fde106c9e41b70414eafc (diff) |
Correctly recalculate cull mode after vertex format change.
Document bad circularity in derived state dependencies.
-rw-r--r-- | xc/lib/GL/mesa/src/drv/mga/mgastate.c | 7 | ||||
-rw-r--r-- | xc/lib/GL/mesa/src/drv/mga/mgatris.c | 8 | ||||
-rw-r--r-- | xc/lib/GL/mesa/src/drv/mga/mgavb.c | 1 |
3 files changed, 10 insertions, 6 deletions
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgastate.c b/xc/lib/GL/mesa/src/drv/mga/mgastate.c index 045163d25..93e7d5dd3 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgastate.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgastate.c @@ -598,7 +598,7 @@ void mgaUpdateCull( GLcontext *ctx ) { mgaContextPtr mmesa = MGA_CONTEXT(ctx); GLuint mode = _CULL_DISABLE; - + if (ctx->Polygon.CullFlag && mmesa->raster_primitive == GL_TRIANGLES && ctx->Polygon.CullFaceMode != GL_FRONT_AND_BACK) @@ -608,7 +608,7 @@ void mgaUpdateCull( GLcontext *ctx ) mode ^= (_CULL_POSITIVE ^ _CULL_NEGATIVE); if (ctx->Polygon.FrontFace != GL_CCW) mode ^= (_CULL_POSITIVE ^ _CULL_NEGATIVE); - if (mmesa->vertex_format & MGA_T2) + if (ctx->Texture._ReallyEnabled == (TEXTURE0_2D|TEXTURE1_2D)) mode ^= (_CULL_POSITIVE ^ _CULL_NEGATIVE); /* warp bug? */ } @@ -790,9 +790,6 @@ void mgaEmitHwStateLocked( mgaContextPtr mmesa ) /* mmesa->sarea->wacceptseq = mmesa->hw_primitive; */ mmesa->sarea->WarpPipe = mmesa->vertex_format; mmesa->sarea->vertsize = mmesa->vertex_size; - fprintf(stderr, "setting sarea WarpPipe %x (vsize %d)\n", - mmesa->sarea->WarpPipe, - mmesa->sarea->vertsize); } mmesa->sarea->dirty |= mmesa->dirty; diff --git a/xc/lib/GL/mesa/src/drv/mga/mgatris.c b/xc/lib/GL/mesa/src/drv/mga/mgatris.c index 03e962781..c2c2a25fa 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgatris.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgatris.c @@ -775,6 +775,14 @@ static void mgaRunPipeline( GLcontext *ctx ) mgaChooseRenderState( ctx ); mmesa->new_gl_state = 0; + + /* Circularity: mgaDDUpdateHwState can affect mmesa->Fallback, + * but mgaChooseVertexState can affect mmesa->new_state. Hence + * the second check. (Fix this...) + */ + if (mmesa->new_state) { + mgaDDUpdateHwState( ctx ); + } } _tnl_run_pipeline( ctx ); diff --git a/xc/lib/GL/mesa/src/drv/mga/mgavb.c b/xc/lib/GL/mesa/src/drv/mga/mgavb.c index 121f00d10..082694198 100644 --- a/xc/lib/GL/mesa/src/drv/mga/mgavb.c +++ b/xc/lib/GL/mesa/src/drv/mga/mgavb.c @@ -435,7 +435,6 @@ void mgaChooseVertexState( GLcontext *ctx ) mmesa->vertex_format = setup_tab[ind].vertex_format; mmesa->vertex_size = setup_tab[ind].vertex_size; mmesa->vertex_stride_shift = setup_tab[ind].vertex_stride_shift; - fprintf(stderr, "vertex format %x\n", mmesa->vertex_format); } } |