ARB prog lexer: Fix lexer to eat both DOS and Unix line endings
[mesa.git] / src / mesa / tnl / t_vb_render.c
index 1a7fae57569ee884b8ba98ee3d2ab73084601679..c1bebc99423589651e0e1dcd15d7124e89d4bc13 100644 (file)
  */
 
 
-#include "glheader.h"
-#include "context.h"
-#include "enums.h"
-#include "macros.h"
-#include "imports.h"
-#include "mtypes.h"
-#include "nvfragprog.h"
-#include "math/m_matrix.h"
-#include "math/m_xform.h"
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/enums.h"
+#include "main/macros.h"
+#include "main/imports.h"
+#include "main/mtypes.h"
 
 #include "t_pipeline.h"
 
@@ -76,7 +73,8 @@
 #define EDGEFLAG_SET(idx, val) VB->EdgeFlag[idx] = val
 
 
-#define CLIPMASK (CLIP_ALL_BITS|CLIP_CULL_BIT)
+/* This does NOT include the CLIP_USER_BIT! */
+#define CLIPMASK (CLIP_FRUSTUM_BITS | CLIP_CULL_BIT)
 
 
 /* Vertices, with the possibility of clipping.
@@ -307,11 +305,11 @@ static GLboolean run_render( GLcontext *ctx,
 
       for (i = 0 ; i < VB->PrimitiveCount ; i++)
       {
-        GLuint prim = VB->Primitive[i].mode;
+        GLuint prim = _tnl_translate_prim(&VB->Primitive[i]);
         GLuint start = VB->Primitive[i].start;
         GLuint length = VB->Primitive[i].count;
 
-        assert((prim & PRIM_MODE_MASK) < GL_POLYGON+1);
+        assert((prim & PRIM_MODE_MASK) <= GL_POLYGON);
 
         if (MESA_VERBOSE & VERBOSE_PRIMS) 
            _mesa_debug(NULL, "MESA prim %s %d..%d\n",