summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxtris.c
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2004-09-03 06:32:18 +0000
committerDaniel Borca <[email protected]>2004-09-03 06:32:18 +0000
commit58c4937e124138dd11bfd36e37d401ff73f5e7c4 (patch)
tree60028460dd0e352109a621a67401feef0fd68e85 /src/mesa/drivers/glide/fxtris.c
parentf3d960054eed561addcd48c08e88e4de6874e46a (diff)
make sure the HW is clean before shooting the pipeline
Diffstat (limited to 'src/mesa/drivers/glide/fxtris.c')
-rw-r--r--src/mesa/drivers/glide/fxtris.c67
1 files changed, 25 insertions, 42 deletions
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c
index 85dade8c586..ecf68b8d9ca 100644
--- a/src/mesa/drivers/glide/fxtris.c
+++ b/src/mesa/drivers/glide/fxtris.c
@@ -1273,58 +1273,41 @@ static void fxRunPipeline( GLcontext *ctx )
*/
if (new_gl_state & _NEW_PROJECTION)
fxMesa->new_state |= FX_NEW_FOG;
- /* [dBorca] Hack alert:
- * the above _NEW_PROJECTION is not included in the test below,
- * so we may end up with fxMesa->new_state still dirty by the end
- * of the routine. The fact is, we don't have NearFar callback
- * anymore. We could use fxDDDepthRange instead, but it seems
- * fog needs to be updated only by a fog-basis.
- * Implementing fxDDDepthRange correctly is another story:
- * that, together with a presumable fxDDViewport function would set
- * fxMesa->SetupNewInputs |= VERT_BIT_CLIP;
- * which might be useful in fxBuildVertices...
- */
#endif
- if (new_gl_state & (_FX_NEW_IS_IN_HARDWARE |
- _FX_NEW_RENDERSTATE |
- _FX_NEW_SETUP_FUNCTION |
- _NEW_TEXTURE)) {
+ if (new_gl_state & _FX_NEW_IS_IN_HARDWARE)
+ fxCheckIsInHardware(ctx);
+
+ if (fxMesa->new_state)
+ fxSetupFXUnits(ctx);
- if (new_gl_state & _FX_NEW_IS_IN_HARDWARE)
- fxCheckIsInHardware(ctx);
+ if (!fxMesa->fallback) {
+ if (new_gl_state & _FX_NEW_RENDERSTATE)
+ fxDDChooseRenderState(ctx);
- if (fxMesa->new_state)
- fxSetupFXUnits(ctx);
+ if (new_gl_state & _FX_NEW_SETUP_FUNCTION)
+ fxChooseVertexState(ctx);
+ }
- if (!fxMesa->fallback) {
- if (new_gl_state & _FX_NEW_RENDERSTATE)
- fxDDChooseRenderState(ctx);
+ if (new_gl_state & _NEW_TEXTURE) {
+ struct gl_texture_unit *t0 = &ctx->Texture.Unit[fxMesa->tmu_source[0]];
+ struct gl_texture_unit *t1 = &ctx->Texture.Unit[fxMesa->tmu_source[1]];
- if (new_gl_state & _FX_NEW_SETUP_FUNCTION)
- fxChooseVertexState(ctx);
+ if (t0->_Current && FX_TEXTURE_DATA(t0)) {
+ fxMesa->s0scale = FX_TEXTURE_DATA(t0)->sScale;
+ fxMesa->t0scale = FX_TEXTURE_DATA(t0)->tScale;
+ fxMesa->inv_s0scale = 1.0 / fxMesa->s0scale;
+ fxMesa->inv_t0scale = 1.0 / fxMesa->t0scale;
}
- if (new_gl_state & _NEW_TEXTURE) {
- struct gl_texture_unit *t0 = &ctx->Texture.Unit[fxMesa->tmu_source[0]];
- struct gl_texture_unit *t1 = &ctx->Texture.Unit[fxMesa->tmu_source[1]];
-
- if (t0->_Current && FX_TEXTURE_DATA(t0)) {
- fxMesa->s0scale = FX_TEXTURE_DATA(t0)->sScale;
- fxMesa->t0scale = FX_TEXTURE_DATA(t0)->tScale;
- fxMesa->inv_s0scale = 1.0 / fxMesa->s0scale;
- fxMesa->inv_t0scale = 1.0 / fxMesa->t0scale;
- }
-
- if (t1->_Current && FX_TEXTURE_DATA(t1)) {
- fxMesa->s1scale = FX_TEXTURE_DATA(t1)->sScale;
- fxMesa->t1scale = FX_TEXTURE_DATA(t1)->tScale;
- fxMesa->inv_s1scale = 1.0 / fxMesa->s1scale;
- fxMesa->inv_t1scale = 1.0 / fxMesa->t1scale;
- }
+ if (t1->_Current && FX_TEXTURE_DATA(t1)) {
+ fxMesa->s1scale = FX_TEXTURE_DATA(t1)->sScale;
+ fxMesa->t1scale = FX_TEXTURE_DATA(t1)->tScale;
+ fxMesa->inv_s1scale = 1.0 / fxMesa->s1scale;
+ fxMesa->inv_t1scale = 1.0 / fxMesa->t1scale;
}
}
-
+
fxMesa->new_gl_state = 0;
_tnl_run_pipeline( ctx );