Added ctx->Texture._EnabledCoordUnits bitfield.
[mesa.git] / src / mesa / tnl / t_vb_render.c
index e0536c893318f1472946396849bb7562e5c8be7e..bbfa1ae704fbea815e42f8a43364a94bbd2224b4 100644 (file)
@@ -1,10 +1,10 @@
-/* $Id: t_vb_render.c,v 1.33 2002/10/29 20:29:04 brianp Exp $ */
+/* $Id: t_vb_render.c,v 1.35 2003/04/08 02:27:20 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
- * Version:  4.0.1
+ * Version:  5.1
  *
- * Copyright (C) 1999-2001  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2003  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -46,7 +46,6 @@
 #include "macros.h"
 #include "imports.h"
 #include "mtypes.h"
-#include "mmath.h"
 
 #include "math/m_matrix.h"
 #include "math/m_xform.h"
 /**********************************************************************/
 
 
-#if defined(USE_IEEE)
-#define NEGATIVE(x) (GET_FLOAT_BITS(x) & (1<<31))
-#define DIFFERENT_SIGNS(x,y) ((GET_FLOAT_BITS(x) ^ GET_FLOAT_BITS(y)) & (1<<31))
-#else
-#define NEGATIVE(x) (x < 0)
-#define DIFFERENT_SIGNS(x,y) (x * y <= 0 && x - y != 0)
-/* Could just use (x*y<0) except for the flatshading requirements.
- * Maybe there's a better way?
- */
-#endif
-
-
 #define W(i) coord[i][3]
 #define Z(i) coord[i][2]
 #define Y(i) coord[i][1]
@@ -365,9 +352,9 @@ static void check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
       if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
         inputs |= VERT_BIT_COLOR1;
 
-      if (ctx->Texture._EnabledUnits) {
+      if (ctx->Texture._EnabledCoordUnits) {
         for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) {
-           if (ctx->Texture.Unit[i]._ReallyEnabled)
+           if (ctx->Texture._EnabledCoordUnits & (1 << i))
               inputs |= VERT_BIT_TEX(i);
         }
       }