i965: Make sure the VS URB size is big enough to fit a VF VUE.
[mesa.git] / src / mesa / tnl / t_vb_render.c
index e322d65c60157e3b6034e74ca25e3fe029ccbd03..c1bebc99423589651e0e1dcd15d7124e89d4bc13 100644 (file)
  */
 
 
-#include "glheader.h"
-#include "context.h"
-#include "enums.h"
-#include "macros.h"
-#include "imports.h"
-#include "mtypes.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"
 
@@ -73,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.
@@ -304,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",