mesa: Move simple_list.h to src/util.
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_swtcl.c
index 1e8016271838153e20ebf19b453b92361c6f95da..5a6cede4b1a9a3f881fc8731ce87ed8dff336292 100644 (file)
@@ -29,7 +29,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 /*
  * Authors:
- *   Keith Whitwell <keith@tungstengraphics.com>
+ *   Keith Whitwell <keithw@vmware.com>
  */
 
 #include "main/glheader.h"
@@ -38,7 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "main/enums.h"
 #include "main/imports.h"
 #include "main/macros.h"
-#include "main/simple_list.h"
+#include "util/simple_list.h"
 
 #include "math/m_xform.h"
 
@@ -189,7 +189,8 @@ static void radeonSetVertexFormat( struct gl_context *ctx )
                          radeon_cp_vc_frmts[i][0] );
               break;
            case 3:
-              if (ctx->Texture.Unit[i]._ReallyEnabled & (TEXTURE_CUBE_BIT) ) {
+              if (ctx->Texture.Unit[i]._Current &&
+                   ctx->Texture.Unit[i]._Current->Target == GL_TEXTURE_CUBE_MAP) {
                   EMIT_ATTR( _TNL_ATTRIB_TEX0+i, EMIT_3F,
                              radeon_cp_vc_frmts[i][1] );
                } else {
@@ -198,7 +199,8 @@ static void radeonSetVertexFormat( struct gl_context *ctx )
                }
                break;
            case 4:
-              if (ctx->Texture.Unit[i]._ReallyEnabled & (TEXTURE_CUBE_BIT) ) {
+              if (ctx->Texture.Unit[i]._Current &&
+                   ctx->Texture.Unit[i]._Current->Target == GL_TEXTURE_CUBE_MAP) {
                  EMIT_ATTR( _TNL_ATTRIB_TEX0+i, EMIT_3F,
                             radeon_cp_vc_frmts[i][1] );
               } else {
@@ -534,8 +536,8 @@ static struct {
 
 #define DO_FALLBACK  0
 #define DO_OFFSET    0
-#define DO_UNFILLED (IND & RADEON_UNFILLED_BIT)
-#define DO_TWOSIDE  (IND & RADEON_TWOSIDE_BIT)
+#define DO_UNFILLED ((IND & RADEON_UNFILLED_BIT) != 0)
+#define DO_TWOSIDE  ((IND & RADEON_TWOSIDE_BIT) != 0)
 #define DO_FLAT      0
 #define DO_TRI       1
 #define DO_QUAD      1