-/* $Id: t_imm_fixup.c,v 1.35 2002/04/09 16:56:52 keithw Exp $ */
+/* $Id: t_imm_fixup.c,v 1.39 2002/10/29 20:29:03 brianp Exp $ */
/*
* Mesa 3-D graphics library
/*
* Authors:
- * Keith Whitwell <keithw@valinux.com>
+ * Keith Whitwell <keith@tungstengraphics.com>
*/
#include "colormac.h"
#include "light.h"
#include "macros.h"
-#include "mem.h"
+#include "imports.h"
#include "mmath.h"
#include "state.h"
#include "mtypes.h"
for (;;) {
if ((flag[++i] & match) == 0) {
-/* fprintf(stderr, "_tnl_fixup_3f copy to %p values %f %f %f\n", */
+/* _mesa_debug(NULL, "_tnl_fixup_3f copy to %p values %f %f %f\n", */
/* data[i], */
/* data[i-1][0], */
/* data[i-1][1], */
GLuint i = start-1;
match |= VERT_BIT_END_VB;
-/* fprintf(stderr, "fixup_first_3f default: %f %f %f start: %d\n", */
+/* _mesa_debug(NULL, "fixup_first_3f default: %f %f %f start: %d\n", */
/* dflt[0], dflt[1], dflt[2], start); */
while ((flag[++i]&match) == 0)
IM->CopyTexSize = IM->TexSize;
-/* fprintf(stderr, "Fixup input, Start: %u Count: %u LastData: %u\n", */
+/* _mesa_debug(ctx, "Fixup input, Start: %u Count: %u LastData: %u\n", */
/* IM->Start, IM->Count, IM->LastData); */
/* _tnl_print_vert_flags("Orflag", orflag); */
/* _tnl_print_vert_flags("Andflag", andflag); */
struct immediate *prev,
GLuint dst, GLuint src )
{
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+/* _mesa_debug(NULL, "%s\n", __FUNCTION__); */
if (next->Material == 0) {
next->Material = (struct gl_material (*)[2])
next->Flag[dst] = VERT_BIT_ELT;
elts[i+offset] = dst;
}
-/* fprintf(stderr, "ADDING VERT_BIT_ELT!\n"); */
+/* _mesa_debug(ctx, "ADDING VERT_BIT_ELT!\n"); */
next->CopyOrFlag |= VERT_BIT_ELT;
next->CopyAndFlag &= VERT_BIT_ELT;
}
inputs->Obj.data[isrc] );
if (copy & VERT_BIT_NORMAL) {
-/* fprintf(stderr, "copy vert norm %d to %d (%p): %f %f %f\n", */
+/* _mesa_debug(ctx, "copy vert norm %d to %d (%p): %f %f %f\n", */
/* isrc, dst, */
/* next->Normal[dst], */
/* inputs->Normal.data[isrc][0], */
}
if (--tnl->ExecCopySource->ref_count == 0)
- _tnl_free_immediate( tnl->ExecCopySource );
+ _tnl_free_immediate( ctx, tnl->ExecCopySource );
tnl->ExecCopySource = next; next->ref_count++;
}
GLuint fixup;
GLuint start = IM->Start;
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+/* _mesa_debug(ctx, "%s\n", __FUNCTION__); */
IM->Evaluated = 0;
IM->CopyOrFlag = IM->OrFlag;
GLuint pintro = intro[prim];
GLuint ovf = 0;
-/* fprintf(stderr, "_tnl_get_exec_copy_verts %s\n", */
+/* _mesa_debug(ctx, "_tnl_get_exec_copy_verts %s\n", */
/* _mesa_lookup_enum_by_nr(prim)); */
if (tnl->ExecCopySource)
if (--tnl->ExecCopySource->ref_count == 0)
- _tnl_free_immediate( tnl->ExecCopySource );
+ _tnl_free_immediate( ctx, tnl->ExecCopySource );
if (prim == GL_POLYGON+1) {
tnl->ExecCopySource = 0;