Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 71 → Rev 72

/shark/trunk/ports/mesa/src/tnl/t_vtx_exec.c
44,9 → 44,9
#include "state.h"
#include "vtxfmt.h"
 
#include "tnl/tnl.h"
#include "tnl/t_context.h"
#include "tnl/t_array_api.h"
#include "tnl.h"
#include "t_context.h"
#include "t_array_api.h"
 
static void _tnl_FlushVertices( GLcontext *, GLuint );
 
/shark/trunk/ports/mesa/src/tnl/t_vtx_x86.c
34,7 → 34,7
#include "imports.h"
#include "mmath.h"
#include "simple_list.h"
#include "tnl_vtxfmt.h"
#include "vtxfmt.h"
 
#if defined(USE_X86_ASM)
 
/shark/trunk/ports/mesa/src/tnl/t_vtx_api.c
35,7 → 35,7
#include "simple_list.h"
#include "vtxfmt.h"
 
#include "tnl_vtx_api.h"
#include "t_vtx_api.h"
 
/* Fallback versions of all the entrypoints for situations where
* codegen isn't available. This is slowed significantly by all the
/shark/trunk/ports/mesa/src/tnl/t_vtx_api.h
185,7 → 185,7
#define FIXUP2( CODE, OFFSET, CHECKVAL, NEWVAL ) \
do { \
while (*(int *)(CODE+OFFSET) != CHECKVAL) OFFSET++; \
fprintf(stderr, "%s/%d CVAL %x OFFSET %d\n", __FUNCTION__, \
cprintf("%s/%d CVAL %x OFFSET %d\n", __FUNCTION__, \
__LINE__, CHECKVAL, OFFSET); \
*(int *)(CODE+OFFSET) = (int)NEWVAL; \
OFFSET += 4; \
/shark/trunk/ports/mesa/src/tnl/t_vb_lighttmp.h
1,4 → 1,4
/* $Id: t_vb_lighttmp.h,v 1.1 2003-02-28 11:48:07 pj Exp $ */
/* $Id: t_vb_lighttmp.h,v 1.2 2003-03-13 12:20:29 giacomo Exp $ */
 
/*
* Mesa 3-D graphics library
122,7 → 122,7
(void) vstride;
 
#ifdef TRACE
fprintf(stderr, "%s\n", __FUNCTION__ );
cprintf("%s\n", __FUNCTION__ );
#endif
 
if (IDX & LIGHT_COLORMATERIAL) {
331,7 → 331,7
const GLuint nr = VB->Count;
 
#ifdef TRACE
fprintf(stderr, "%s\n", __FUNCTION__ );
cprintf("%s\n", __FUNCTION__ );
#endif
 
(void) flags;
542,7 → 542,7
const GLuint nr = VB->Count;
 
#ifdef TRACE
fprintf(stderr, "%s\n", __FUNCTION__ );
cprintf("%s\n", __FUNCTION__ );
#endif
 
(void) input; /* doesn't refer to Eye or Obj */
670,7 → 670,7
const struct gl_light *light;
 
#ifdef TRACE
fprintf(stderr, "%s\n", __FUNCTION__ );
cprintf("%s\n", __FUNCTION__ );
#endif
 
(void) flags;
810,7 → 810,7
const GLuint nr = VB->Count;
 
#ifdef TRACE
fprintf(stderr, "%s\n", __FUNCTION__ );
cprintf("%s\n", __FUNCTION__ );
#endif
 
(void) flags;
/shark/trunk/ports/mesa/src/math/m_debug_util.h
1,4 → 1,4
/* $Id: m_debug_util.h,v 1.1 2003-02-28 11:48:05 pj Exp $ */
/* $Id: m_debug_util.h,v 1.2 2003-03-13 12:20:29 giacomo Exp $ */
 
/*
* Mesa 3-D graphics library
261,7 → 261,10
}
}
 
enum { NIL = 0, ONE = 1, NEG = -1, VAR = 2 };
#define NIL 0
#define ONE 1
#define NEG -1
#define VAR 2
 
/* Ensure our arrays are correctly aligned.
*/
/shark/trunk/ports/mesa/src/math/m_xform.c
1,4 → 1,4
/* $Id: m_xform.c,v 1.1 2003-02-28 11:48:05 pj Exp $ */
/* $Id: m_xform.c,v 1.2 2003-03-13 12:20:29 giacomo Exp $ */
 
/*
* Mesa 3-D graphics library
51,7 → 51,7
#endif
 
#ifdef USE_X86_ASM
#include "X86/common_x86_asm.h"
#include "x86/common_x86_asm.h"
#endif
 
#ifdef USE_SPARC_ASM
/shark/trunk/ports/mesa/src/mmath.h
1,4 → 1,4
/* $Id: mmath.h,v 1.1 2003-02-28 11:42:03 pj Exp $ */
/* $Id: mmath.h,v 1.2 2003-03-13 12:20:29 giacomo Exp $ */
 
/*
* Mesa 3-D graphics library
334,7 → 334,7
/* default IROUND_POS macro */
#ifndef IROUND_POS
#ifdef DEBUG
#define IROUND_POS(f) (ASSERT((f) >= 0.0F), IROUND(f))
#define IROUND_POS(f) (IROUND(f))
#else
#define IROUND_POS(f) (IROUND(f))
#endif
/shark/trunk/ports/mesa/src/imports.c
1,4 → 1,4
/* $Id: imports.c,v 1.1 2003-02-28 11:42:03 pj Exp $ */
/* $Id: imports.c,v 1.2 2003-03-13 12:20:29 giacomo Exp $ */
 
/*
* Mesa 3-D graphics library
272,6 → 272,7
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86getenv(var);
#else
cprintf("Called _mesa_getenv\n");
return getenv(var);
#endif
}
360,39 → 361,42
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86atoi(s);
#else
return atoi(s);
return (int)atoi((char *)s);
#endif
}
 
 
int
_mesa_sprintf( char *str, const char *fmt, ... )
{
int r;
va_list args;
va_start( args, fmt );
va_end( args );
#if defined(XFree86LOADER) && defined(IN_MODULE)
r = xf86vsprintf( str, fmt, args );
#else
r = vsprintf( str, fmt, args );
cprintf("Called _mesa_sprintf\n");
sprintf(str,"ERROR");
r = 0;
#endif
return r;
}
 
 
void
_mesa_printf( const char *fmtString, ... )
{
char s[MAXSTRING];
va_list args;
va_start( args, fmtString );
vsnprintf(s, MAXSTRING, fmtString, args);
va_end( args );
//va_list args;
 
//va_start( args, fmtString );
//vsnprintf(s, MAXSTRING, fmtString, args);
//va_end( args );
#if defined(XFree86LOADER) && defined(IN_MODULE)
xf86printf("%s", s);
#else
printf("%s", s);
cprintf("Called _mesa_printf\n");
cprintf("%s\n",fmtString);
#endif
}
 
402,11 → 406,12
{
GLboolean debug;
char str[MAXSTRING];
va_list args;
//va_list args;
(void) ctx;
va_start( args, fmtString );
(void) vsnprintf( str, MAXSTRING, fmtString, args );
va_end( args );
//va_start( args, fmtString );
//(void) vsnprintf( str, MAXSTRING, fmtString, args );
//va_end( args );
#ifdef DEBUG
debug = GL_TRUE; /* always print warning */
#else
416,7 → 421,8
#if defined(XFree86LOADER) && defined(IN_MODULE)
xf86fprintf(stderr, "Mesa warning: %s\n", str);
#else
fprintf(stderr, "Mesa warning: %s\n", str);
cprintf("Called _mesa_warning\n");
cprintf("ERROR: %s\n", fmtString);
#endif
}
}
434,8 → 440,8
xf86fprintf(stderr, "Mesa implementation error: %s\n", s);
xf86fprintf(stderr, "Please report to the DRI project at dri.sourceforge.net\n");
#else
fprintf(stderr, "Mesa implementation error: %s\n", s);
fprintf(stderr, "Please report to the Mesa bug database at www.mesa3d.org\n" );
cprintf("Mesa implementation error: %s\n", s);
cprintf("Please report to the Mesa bug database at www.mesa3d.org\n" );
#endif
}
 
456,9 → 462,6
debugEnv = _mesa_getenv("MESA_DEBUG");
 
#ifdef DEBUG
if (debugEnv && _mesa_strstr(debugEnv, "silent"))
debug = GL_FALSE;
else
debug = GL_TRUE;
#else
if (debugEnv)
468,14 → 471,15
#endif
 
if (debug) {
/*
va_list args;
char where[MAXSTRING];
char where[MAXSTRING];*/
const char *errstr;
 
/*
va_start( args, fmtString );
vsnprintf( where, MAXSTRING, fmtString, args );
va_end( args );
 
*/
switch (error) {
case GL_NO_ERROR:
errstr = "GL_NO_ERROR";
505,7 → 509,7
errstr = "unknown";
break;
}
_mesa_debug(ctx, "Mesa user error: %s in %s\n", errstr, where);
_mesa_debug(ctx, "Mesa user error: %s in %s\n", errstr);
}
 
_mesa_record_error(ctx, error);
520,13 → 524,16
{
char s[MAXSTRING];
va_list args;
 
/*
va_start(args, fmtString);
vsnprintf(s, MAXSTRING, fmtString, args);
va_end(args);
va_end(args);*/
#if defined(XFree86LOADER) && defined(IN_MODULE)
xf86fprintf(stderr, "Mesa: %s", s);
#else
fprintf(stderr, "Mesa: %s", s);
cprintf("Called _mesa_debug\n");
cprintf("ERROR: %s\n", fmtString);
#endif
}
 
592,7 → 599,7
default_atoi(__GLcontext *gc, const char *str)
{
(void) gc;
return atoi(str);
return (int)atoi((char *)str);
}
 
static int CAPI
599,10 → 606,13
default_sprintf(__GLcontext *gc, char *str, const char *fmt, ...)
{
int r;
va_list args;
va_start( args, fmt );
r = vsprintf( str, fmt, args );
va_end( args );
//va_list args;
//va_start( args, fmt );
//r = vsprintf( str, fmt, args );
//va_end( args );
cprintf("Called default_sprintf\n");
sprintf(str, "ERROR");
r = 0;
return r;
}
 
609,13 → 619,13
static void * CAPI
default_fopen(__GLcontext *gc, const char *path, const char *mode)
{
return fopen(path, mode);
return NULL;//fopen(path, mode);
}
 
static int CAPI
default_fclose(__GLcontext *gc, void *stream)
{
return fclose((FILE *) stream);
return 0;//fclose((FILE *) stream);
}
 
static int CAPI
622,10 → 632,16
default_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
{
int r;
char s[200];
/*
va_list args;
va_start( args, fmt );
r = vfprintf( (FILE *) stream, fmt, args );
r = vsprintf(s, fmt, args );
va_end( args );
*/
cprintf("Called default_fprintf\n");
cprintf("ERROR: %s\n",fmt);
r = 0;
return r;
}
 
/shark/trunk/ports/mesa/src/swrast/s_blend.c
1,4 → 1,4
/* $Id: s_blend.c,v 1.1 2003-02-28 11:49:41 pj Exp $ */
/* $Id: s_blend.c,v 1.2 2003-03-13 12:20:29 giacomo Exp $ */
 
/*
* Mesa 3-D graphics library
38,8 → 38,8
 
 
#if defined(USE_MMX_ASM)
#include "X86/mmx.h"
#include "X86/common_x86_asm.h"
#include "x86/mmx.h"
#include "x86/common_x86_asm.h"
#define _BLENDAPI _ASMAPI
#else
#define _BLENDAPI
/shark/trunk/ports/mesa/src/imports.h
1,4 → 1,4
/* $Id: imports.h,v 1.1 2003-02-28 11:42:03 pj Exp $ */
/* $Id: imports.h,v 1.2 2003-03-13 12:20:29 giacomo Exp $ */
 
/*
* Mesa 3-D graphics library
172,7 → 172,6
extern void
_mesa_printf( const char *fmtString, ... );
 
 
extern void
_mesa_warning( __GLcontext *gc, const char *fmtString, ... );
 
/shark/trunk/ports/mesa/src/mtypes.h
1,4 → 1,4
/* $Id: mtypes.h,v 1.1 2003-02-28 11:42:03 pj Exp $ */
/* $Id: mtypes.h,v 1.2 2003-03-13 12:20:29 giacomo Exp $ */
 
/*
* Mesa 3-D graphics library
41,7 → 41,7
#include "math/m_matrix.h" /* GLmatrix */
 
#if defined(MESA_TRACE)
#include "Trace/tr_context.h"
#include "trace/tr_context.h"
#endif
 
 
/shark/trunk/ports/mesa/src/makefile
8,9 → 8,6
 
LIBRARY = osmesa
 
# C_OPT += -DUSE_MMX_ASM
# ASM_OPT += -DUSE_MMX_ASM
 
OBJS_PATH = $(BASE)/drivers/mesa/src/
 
OSMESA = accum.o api_arrayelt.o api_eval.o api_loopback.o api_noop.o api_validate.o\
17,10 → 14,10
attrib.o blend.o buffers.o clip.o colortab.o context.o convolve.o\
debug.o depth.o dispatch.o dlist.o drawpix.o enable.o enums.o eval.o\
extensions.o feedback.o fog.o get.o glapi.o glthread.o hash.o hint.o\
histogram.o image.o imports.o light.o lines.o matrix.o mmath.o pixel.o\
histogram.o image.o light.o lines.o matrix.o mmath.o pixel.o\
points.o polygon.o rastpos.o state.o stencil.o texcompress.o texformat.o\
teximage.o texobj.o texstate.o texstore.o texutil.o varray.o vpexec.o\
vpparse.o vpstate.o vtxfmt.o ./osmesa/osmesa.o ./array_cache/ac_context.o\
vpparse.o vpstate.o vtxfmt.o ./array_cache/ac_context.o\
./array_cache/ac_import.o ./swrast/s_aaline.o ./swrast/s_aatriangle.o\
./swrast/s_accum.o ./swrast/s_alphabuf.o ./swrast/s_alpha.o ./swrast/s_bitmap.o\
./swrast/s_blend.o ./swrast/s_buffers.o ./swrast/s_context.o ./swrast/s_copypix.o\
39,21 → 36,15
./math/m_debug_clip.o ./math/m_debug_norm.o\
./math/m_debug_xform.o ./math/m_eval.o ./math/m_matrix.o ./math/m_translate.o\
./math/m_vector.o ./math/m_xform.o\
./X86/common_x86_asm.o ./X86/common_x86.o ./X86/gen_matypes.o ./X86/glapi_x86.o\
./X86/mmx_blend.o ./X86/x86.o ./X86/x86_cliptest.o ./X86/x86_xform2.o\
./X86/x86_xform3.o ./X86/x86_xform4.o
./x86/common_x86_asm.o ./x86/common_x86.o ./x86/glapi_x86.o\
./x86/mmx_blend.o ./x86/x86.o ./x86/x86_cliptest.o ./x86/x86_xform2.o\
./x86/x86_xform3.o ./x86/x86_xform4.o ./osmesa/osmesa.o imports.o \
OBJS = $(OSMESA)
 
C_OPT += -I../../../drivers/linuxc24/include -I../include -I. -I.. -D__KERNEL__ -D__i368__ \
-ffast-math -fexpensive-optimizations -fstrict-aliasing -fPIC\
-malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_REENTRANT\
-DUSE_X86_ASM -DUSE_MMX_ASM
C_OPT += -I../../../drivers/linuxc24/include -I../include -I. -I..
 
ASM_OPT += -I../../../drivers/linuxc24/include -I../include -I. -I.. -D__KERNEL__ -D__i368__ \
-ffast-math -fexpensive-optimizations -fstrict-aliasing -fPIC -O\
-malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_REENTRANT\
-DUSE_X86_ASM -DUSE_MMX_ASM
ASM_OPT += -I../../../drivers/linuxc24/include -I../include -I. -I..
 
include $(BASE)/config/lib.mk
 
/shark/trunk/ports/mesa/src/osmesa/osmesa.c
1,4 → 1,4
/* $Id: osmesa.c,v 1.1 2003-02-28 11:54:35 pj Exp $ */
/* $Id: osmesa.c,v 1.2 2003-03-13 12:20:29 giacomo Exp $ */
 
/*
* Mesa 3-D graphics library
/shark/trunk/ports/mesa/src/context.c
1,4 → 1,4
/* $Id: context.c,v 1.1 2003-02-28 11:41:58 pj Exp $ */
/* $Id: context.c,v 1.2 2003-03-13 12:20:28 giacomo Exp $ */
 
/*
* Mesa 3-D graphics library
58,8 → 58,8
 
 
#if defined(MESA_TRACE)
#include "Trace/tr_context.h"
#include "Trace/tr_wrapper.h"
#include "trace/tr_context.h"
#include "trace/tr_wrapper.h"
#endif
 
#ifdef USE_SPARC_ASM
67,7 → 67,7
#endif
 
#ifndef MESA_VERBOSE
int MESA_VERBOSE = 0;
int MESA_VERBOSE = 1;
#endif
 
#ifndef MESA_DEBUG_FLAGS