fragment program execution
[mesa.git] / src / mesa / tnl / t_imm_exec.c
index f4ee1501cb199165da741b37a8698a3507ed6eb4..fb149a123de0e7a1fcc47f0bb8cdbad70d0ecba8 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: t_imm_exec.c,v 1.40 2002/06/13 04:49:17 brianp Exp $ */
+/* $Id: t_imm_exec.c,v 1.43 2002/10/24 23:57:25 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -36,7 +36,7 @@
 #include "enums.h"
 #include "dlist.h"
 #include "macros.h"
-#include "mem.h"
+#include "imports.h"
 #include "mmath.h"
 #include "light.h"
 #include "state.h"
@@ -72,7 +72,7 @@ static void reset_input( GLcontext *ctx,
       MEMSET(IM->Flag + start, 0, sizeof(GLuint) * (IM->Count+2-start));
 
    if (MESA_VERBOSE & VERBOSE_IMMEDIATE)
-      _mesa_debug("reset_input: IM(%d) new %x\n", IM->id, beginstate);
+      _mesa_debug(ctx, "reset_input: IM(%d) new %x\n", IM->id, beginstate);
 
    IM->Start = start;
    IM->Count = start;
@@ -295,6 +295,7 @@ static void _tnl_vb_bind_immediate( GLcontext *ctx, struct immediate *IM )
       tmp->Normal.data = IM->Attrib[VERT_ATTRIB_NORMAL] + start;
       tmp->Normal.start = (GLfloat *) (IM->Attrib[VERT_ATTRIB_NORMAL] + start);
       tmp->Normal.count = count;
+      tmp->Normal.size = 3; /* just to be safe */
       VB->NormalPtr = &tmp->Normal;
       if (IM->NormalLengthPtr)
         VB->NormalLengthPtr = IM->NormalLengthPtr + start;