summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2010-03-16 19:46:40 +0100
committerLuc Verhaegen <libv@skynet.be>2010-03-16 19:46:40 +0100
commitd77683c162ece79cf603e2c7e017f693ecfeef8f (patch)
treeeca0768a50a1908a194b0b8d7336e1fbd75393c2
parenta5fb386789fa00eaadd81fe8bf0243572471b05e (diff)
Import tdfx dri driver from mesa 7.8-rc1.HEAD7.8.17.8.07.8-rc17.8master
-rw-r--r--configure.ac6
-rw-r--r--src/tdfx_context.c16
-rw-r--r--src/tdfx_context.h20
-rw-r--r--src/tdfx_lock.c8
-rw-r--r--src/tdfx_pixels.c18
-rw-r--r--src/tdfx_render.c8
-rw-r--r--src/tdfx_screen.c30
-rw-r--r--src/tdfx_screen.h2
-rw-r--r--src/tdfx_span.c10
-rw-r--r--src/tdfx_state.c2
-rw-r--r--src/tdfx_tex.c4
-rw-r--r--src/tdfx_texstate.c8
-rw-r--r--src/tdfx_tris.c1
-rw-r--r--src/tdfx_vb.c18
-rw-r--r--src/tdfx_vbtmp.h30
15 files changed, 99 insertions, 82 deletions
diff --git a/configure.ac b/configure.ac
index b92a890..6692726 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script
AC_PREREQ(2.57)
-AC_INIT([mesa-dri-tdfx], 7.7.0, [], mesa-dri-tdfx)
+AC_INIT([mesa-dri-tdfx], 7.8.0, [], mesa-dri-tdfx)
AM_INIT_AUTOMAKE([dist-bzip2])
@@ -16,8 +16,8 @@ AC_PROG_CC
AC_HEADER_STDC
PKG_CHECK_MODULES([DRM], [libdrm >= 2.3.0])
-PKG_CHECK_MODULES([DRI], [libmesadri >= 7.7.0 libmesadri < 7.8.0
- libmesadricommon >= 7.7.0 libmesadricommon < 7.8.0])
+PKG_CHECK_MODULES([DRI], [libmesadri >= 7.8.0 libmesadri < 7.9.0
+ libmesadricommon >= 7.8.0 libmesadricommon < 7.9.0])
AC_OUTPUT([
Makefile
diff --git a/src/tdfx_context.c b/src/tdfx_context.c
index e742d41..edb1875 100644
--- a/src/tdfx_context.c
+++ b/src/tdfx_context.c
@@ -165,12 +165,12 @@ static const struct dri_debug_control debug_control[] =
};
GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate )
{
tdfxContextPtr fxMesa;
GLcontext *ctx, *shareCtx;
- __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
+ __DRIscreen *sPriv = driContextPriv->driScreenPriv;
tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private;
TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) ((char *) sPriv->pSAREA +
sizeof(drm_sarea_t));
@@ -441,7 +441,7 @@ static GLboolean tdfxInitVertexFormats( tdfxContextPtr fxMesa )
* Initialize the state in an tdfxContextPtr struct.
*/
static GLboolean
-tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, tdfxContextPtr fxMesa )
+tdfxInitContext( __DRIdrawable *driDrawPriv, tdfxContextPtr fxMesa )
{
/* KW: Would be nice to make one of these a member of the other.
*/
@@ -563,7 +563,7 @@ tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, tdfxContextPtr fxMesa )
void
-tdfxDestroyContext( __DRIcontextPrivate *driContextPriv )
+tdfxDestroyContext( __DRIcontext *driContextPriv )
{
tdfxContextPtr fxMesa = (tdfxContextPtr) driContextPriv->driverPrivate;
@@ -607,7 +607,7 @@ tdfxDestroyContext( __DRIcontextPrivate *driContextPriv )
GLboolean
-tdfxUnbindContext( __DRIcontextPrivate *driContextPriv )
+tdfxUnbindContext( __DRIcontext *driContextPriv )
{
GET_CURRENT_CONTEXT(ctx);
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
@@ -626,9 +626,9 @@ tdfxUnbindContext( __DRIcontextPrivate *driContextPriv )
GLboolean
-tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv )
+tdfxMakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv )
{
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)driContextPriv );
diff --git a/src/tdfx_context.h b/src/tdfx_context.h
index 3bcb545..6e25cac 100644
--- a/src/tdfx_context.h
+++ b/src/tdfx_context.h
@@ -892,18 +892,18 @@ struct tdfx_context {
char rendererString[100];
/* stuff added for DRI */
- __DRIscreenPrivate *driScreen;
- __DRIcontextPrivate *driContext;
+ __DRIscreen *driScreen;
+ __DRIcontext *driContext;
/**
* DRI drawable bound to this context for drawing.
*/
- __DRIdrawablePrivate *driDrawable;
+ __DRIdrawable *driDrawable;
/**
* DRI drawable bound to this context for reading.
*/
- __DRIdrawablePrivate *driReadable;
+ __DRIdrawable *driReadable;
drm_context_t hHWContext;
drm_hw_lock_t *driHwLock;
@@ -938,19 +938,19 @@ struct tdfx_context {
extern GLboolean
tdfxCreateContext( const __GLcontextModes *mesaVis,
- __DRIcontextPrivate *driContextPriv,
+ __DRIcontext *driContextPriv,
void *sharedContextPrivate );
extern void
-tdfxDestroyContext( __DRIcontextPrivate *driContextPriv );
+tdfxDestroyContext( __DRIcontext *driContextPriv );
extern GLboolean
-tdfxUnbindContext( __DRIcontextPrivate *driContextPriv );
+tdfxUnbindContext( __DRIcontext *driContextPriv );
extern GLboolean
-tdfxMakeCurrent( __DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawPriv,
- __DRIdrawablePrivate *driReadPriv );
+tdfxMakeCurrent( __DRIcontext *driContextPriv,
+ __DRIdrawable *driDrawPriv,
+ __DRIdrawable *driReadPriv );
extern GLboolean
tdfxInitGlide( tdfxContextPtr tmesa );
diff --git a/src/tdfx_lock.c b/src/tdfx_lock.c
index c00f537..f218e4e 100644
--- a/src/tdfx_lock.c
+++ b/src/tdfx_lock.c
@@ -44,10 +44,10 @@
void tdfxGetLock( tdfxContextPtr fxMesa )
{
- __DRIcontextPrivate *cPriv = fxMesa->driContext;
- __DRIdrawablePrivate *const drawable = cPriv->driDrawablePriv;
- __DRIdrawablePrivate *const readable = cPriv->driReadablePriv;
- __DRIscreenPrivate *sPriv = drawable->driScreenPriv;
+ __DRIcontext *cPriv = fxMesa->driContext;
+ __DRIdrawable *const drawable = cPriv->driDrawablePriv;
+ __DRIdrawable *const readable = cPriv->driReadablePriv;
+ __DRIscreen *sPriv = drawable->driScreenPriv;
TDFXSAREAPriv *saPriv = (TDFXSAREAPriv *) (((char *) sPriv->pSAREA) +
fxMesa->fxScreen->sarea_priv_offset);
unsigned int stamp = drawable->lastStamp;
diff --git a/src/tdfx_pixels.c b/src/tdfx_pixels.c
index c213e67..5a71840 100644
--- a/src/tdfx_pixels.c
+++ b/src/tdfx_pixels.c
@@ -494,7 +494,7 @@ tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y,
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
GrLfbInfo_t info;
- __DRIdrawablePrivate *const readable = fxMesa->driReadable;
+ __DRIdrawable *const readable = fxMesa->driReadable;
const GLint winX = readable->x;
const GLint winY = readable->y + readable->h - 1;
const GLint scrX = winX + x;
@@ -519,7 +519,7 @@ tdfx_readpixels_R5G6B5(GLcontext * ctx, GLint x, GLint y,
const GLint widthInBytes = width * 2;
GLint row;
for (row = 0; row < height; row++) {
- MEMCPY(dst, src, widthInBytes);
+ memcpy(dst, src, widthInBytes);
dst += dstStride;
src -= srcStride;
}
@@ -552,7 +552,7 @@ tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
GrLfbInfo_t info;
- __DRIdrawablePrivate *const readable = fxMesa->driReadable;
+ __DRIdrawable *const readable = fxMesa->driReadable;
const GLint winX = readable->x;
const GLint winY = readable->y + readable->h - 1;
const GLint scrX = winX + x;
@@ -578,7 +578,7 @@ tdfx_readpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
{
GLint row;
for (row = 0; row < height; row++) {
- MEMCPY(dst, src, widthInBytes);
+ memcpy(dst, src, widthInBytes);
dst += dstStride;
src -= srcStride;
}
@@ -610,10 +610,10 @@ tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
ctx->Fog.Enabled ||
ctx->Scissor.Enabled ||
ctx->Stencil._Enabled ||
- !ctx->Color.ColorMask[0] ||
- !ctx->Color.ColorMask[1] ||
- !ctx->Color.ColorMask[2] ||
- !ctx->Color.ColorMask[3] ||
+ !ctx->Color.ColorMask[0][0] ||
+ !ctx->Color.ColorMask[0][1] ||
+ !ctx->Color.ColorMask[0][2] ||
+ !ctx->Color.ColorMask[0][3] ||
ctx->Color.ColorLogicOpEnabled ||
ctx->Texture._EnabledUnits ||
fxMesa->Fallback)
@@ -672,7 +672,7 @@ tdfx_drawpixels_R8G8B8A8(GLcontext * ctx, GLint x, GLint y,
(format == GL_BGRA && type == GL_UNSIGNED_BYTE)) {
GLint row;
for (row = 0; row < height; row++) {
- MEMCPY(dst, src, widthInBytes);
+ memcpy(dst, src, widthInBytes);
dst -= dstStride;
src += srcStride;
}
diff --git a/src/tdfx_render.c b/src/tdfx_render.c
index 2cd8e12..979bcd4 100644
--- a/src/tdfx_render.c
+++ b/src/tdfx_render.c
@@ -76,8 +76,8 @@ static void tdfxClear( GLcontext *ctx, GLbitfield mask )
if (fxMesa->glCtx->Visual.redBits != 8) {
/* can only do color masking if running in 24/32bpp on Napalm */
- if (ctx->Color.ColorMask[RCOMP] != ctx->Color.ColorMask[GCOMP] ||
- ctx->Color.ColorMask[GCOMP] != ctx->Color.ColorMask[BCOMP]) {
+ if (ctx->Color.ColorMask[0][RCOMP] != ctx->Color.ColorMask[0][GCOMP] ||
+ ctx->Color.ColorMask[0][GCOMP] != ctx->Color.ColorMask[0][BCOMP]) {
softwareMask |= (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT));
mask &= ~(BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT);
}
@@ -556,7 +556,7 @@ static void uploadTextureImages( tdfxContextPtr fxMesa )
*/
void tdfxUploadClipping( tdfxContextPtr fxMesa )
{
- __DRIdrawablePrivate *dPriv = fxMesa->driDrawable;
+ __DRIdrawable *dPriv = fxMesa->driDrawable;
assert(dPriv);
@@ -721,7 +721,7 @@ void tdfxEmitHwStateLocked( tdfxContextPtr fxMesa )
fxMesa->Glide.grColorMask( fxMesa->Color.ColorMask[RCOMP] ||
fxMesa->Color.ColorMask[GCOMP] ||
fxMesa->Color.ColorMask[BCOMP],
- /*fxMesa->Color.ColorMask[ACOMP]*/GL_FALSE/*[dBorca] no-no*/ );
+ /*fxMesa->Color.ColorMask[0][ACOMP]*/GL_FALSE/*[dBorca] no-no*/ );
}
fxMesa->dirty &= ~TDFX_UPLOAD_COLOR_MASK;
}
diff --git a/src/tdfx_screen.c b/src/tdfx_screen.c
index 9e5f2b8..26de095 100644
--- a/src/tdfx_screen.c
+++ b/src/tdfx_screen.c
@@ -68,7 +68,7 @@ static const __DRIextension *tdfxExtensions[] = {
static const GLuint __driNConfigOptions = 1;
static GLboolean
-tdfxCreateScreen( __DRIscreenPrivate *sPriv )
+tdfxCreateScreen( __DRIscreen *sPriv )
{
tdfxScreenPrivate *fxScreen;
TDFXDRIPtr fxDRIPriv = (TDFXDRIPtr) sPriv->pDevPriv;
@@ -119,7 +119,7 @@ tdfxCreateScreen( __DRIscreenPrivate *sPriv )
static void
-tdfxDestroyScreen( __DRIscreenPrivate *sPriv )
+tdfxDestroyScreen( __DRIscreen *sPriv )
{
tdfxScreenPrivate *fxScreen = (tdfxScreenPrivate *) sPriv->private;
@@ -137,7 +137,7 @@ tdfxDestroyScreen( __DRIscreenPrivate *sPriv )
static GLboolean
-tdfxInitDriver( __DRIscreenPrivate *sPriv )
+tdfxInitDriver( __DRIscreen *sPriv )
{
if ( TDFX_DEBUG & DEBUG_VERBOSE_DRI ) {
fprintf( stderr, "%s( %p )\n", __FUNCTION__, (void *)sPriv );
@@ -153,8 +153,8 @@ tdfxInitDriver( __DRIscreenPrivate *sPriv )
static GLboolean
-tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv,
- __DRIdrawablePrivate *driDrawPriv,
+tdfxCreateBuffer( __DRIscreen *driScrnPriv,
+ __DRIdrawable *driDrawPriv,
const __GLcontextModes *mesaVis,
GLboolean isPixmap )
{
@@ -225,14 +225,14 @@ tdfxCreateBuffer( __DRIscreenPrivate *driScrnPriv,
static void
-tdfxDestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
+tdfxDestroyBuffer(__DRIdrawable *driDrawPriv)
{
_mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL);
}
static void
-tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
+tdfxSwapBuffers( __DRIdrawable *driDrawPriv )
{
GET_CURRENT_CONTEXT(ctx);
@@ -251,7 +251,7 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
* we have to do a glFinish (per the GLX spec).
*/
if ( ctx ) {
- __DRIdrawablePrivate *curDrawPriv;
+ __DRIdrawable *curDrawPriv;
fxMesa = TDFX_CONTEXT(ctx);
curDrawPriv = fxMesa->driContext->driDrawablePriv;
@@ -295,6 +295,8 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
}
#endif
+ assert(fxMesa);
+
if (fxMesa->scissoredClipRects) {
/* restore clip rects without scissor box */
fxMesa->Glide.grDRIPosition( driDrawPriv->x, driDrawPriv->y,
@@ -339,7 +341,7 @@ tdfxSwapBuffers( __DRIdrawablePrivate *driDrawPriv )
}
static const __DRIconfig **
-tdfxFillInModes(__DRIscreenPrivate *psp,
+tdfxFillInModes(__DRIscreen *psp,
unsigned pixel_bits,
unsigned depth_bits,
unsigned stencil_bits,
@@ -383,7 +385,8 @@ tdfxFillInModes(__DRIscreenPrivate *psp,
stencil_bits_array,
deep ? 2 : 4,
db_modes, 2,
- msaa_samples_array, 1);
+ msaa_samples_array, 1,
+ GL_TRUE);
}
/**
@@ -438,3 +441,10 @@ const struct __DriverAPIRec driDriverAPI = {
.WaitForSBC = NULL,
.SwapBuffersMSC = NULL
};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driLegacyExtension.base,
+ NULL
+};
diff --git a/src/tdfx_screen.h b/src/tdfx_screen.h
index 5a68898..6aa42e8 100644
--- a/src/tdfx_screen.h
+++ b/src/tdfx_screen.h
@@ -61,7 +61,7 @@ typedef struct {
int textureOffset;
int textureSize;
- __DRIscreenPrivate *driScrnPriv;
+ __DRIscreen *driScrnPriv;
unsigned int sarea_priv_offset;
/* Configuration cache with default values for all contexts */
diff --git a/src/tdfx_span.c b/src/tdfx_span.c
index 6b38fa5..3879d50 100644
--- a/src/tdfx_span.c
+++ b/src/tdfx_span.c
@@ -47,7 +47,7 @@
#define LOCAL_VARS \
driRenderbuffer *drb = (driRenderbuffer *) rb; \
- __DRIdrawablePrivate *const dPriv = drb->dPriv; \
+ __DRIdrawable *const dPriv = drb->dPriv; \
GLuint pitch = drb->backBuffer ? info.strideInBytes \
: (drb->pitch * drb->cpp); \
const GLuint bottom = dPriv->h - 1; \
@@ -104,7 +104,7 @@
#define HW_READ_CLIPLOOP() \
do { \
- const __DRIdrawablePrivate *dPriv = fxMesa->driDrawable; \
+ const __DRIdrawable *dPriv = fxMesa->driDrawable; \
drm_clip_rect_t *rect = dPriv->pClipRects; \
int _nc = dPriv->numClipRects; \
while (_nc--) { \
@@ -264,7 +264,7 @@ generate_vismask(const tdfxContextPtr fxMesa, GLint x, GLint y, GLint n,
GLint i, j;
/* Ensure we clear the visual mask */
- MEMSET(vismask, 0, n);
+ memset(vismask, 0, n);
/* turn on flags for all visible pixels */
for (i = 0; i < fxMesa->numClipRects; i++) {
@@ -273,14 +273,14 @@ generate_vismask(const tdfxContextPtr fxMesa, GLint x, GLint y, GLint n,
if (y >= rect->y1 && y < rect->y2) {
if (x >= rect->x1 && x + n <= rect->x2) {
/* common case, whole span inside cliprect */
- MEMSET(vismask, 1, n);
+ memset(vismask, 1, n);
return;
}
if (x < rect->x2 && x + n >= rect->x1) {
/* some of the span is inside the rect */
GLint start, end;
if (!initialized) {
- MEMSET(vismask, 0, n);
+ memset(vismask, 0, n);
initialized = GL_TRUE;
}
if (x < rect->x1)
diff --git a/src/tdfx_state.c b/src/tdfx_state.c
index 16b0bfc..dcbc764 100644
--- a/src/tdfx_state.c
+++ b/src/tdfx_state.c
@@ -617,7 +617,7 @@ static int intersect_rect( drm_clip_rect_t *out,
void tdfxUpdateClipping( GLcontext *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = fxMesa->driDrawable;
+ __DRIdrawable *dPriv = fxMesa->driDrawable;
if ( TDFX_DEBUG & DEBUG_VERBOSE_API ) {
fprintf( stderr, "%s()\n", __FUNCTION__ );
diff --git a/src/tdfx_tex.c b/src/tdfx_tex.c
index e31ae97..1c51452 100644
--- a/src/tdfx_tex.c
+++ b/src/tdfx_tex.c
@@ -1660,7 +1660,7 @@ tdfxCompressedTexImage2D (GLcontext *ctx, GLenum target,
texImage->Data);
ti->padded = GL_TRUE;
} else {
- MEMCPY(texImage->Data, data, compressedSize);
+ memcpy(texImage->Data, data, compressedSize);
}
RevalidateTexture(ctx, texObj);
@@ -1707,7 +1707,7 @@ tdfxCompressedTexSubImage2D( GLcontext *ctx, GLenum target,
rows = height / 4; /* [dBorca] hardcoded 4, but works for FXT1/DXTC */
for (i = 0; i < rows; i++) {
- MEMCPY(dest, data, srcRowStride);
+ memcpy(dest, data, srcRowStride);
dest += destRowStride;
data = (GLvoid *)((intptr_t)data + (intptr_t)srcRowStride);
}
diff --git a/src/tdfx_texstate.c b/src/tdfx_texstate.c
index 6658b4d..b04f48c 100644
--- a/src/tdfx_texstate.c
+++ b/src/tdfx_texstate.c
@@ -2142,11 +2142,13 @@ tdfxUpdateTextureBinding( GLcontext *ctx )
ctx->Texture.Unit[0]._ReallyEnabled == 0) {
/* Only unit 0 2D enabled */
if (shared->umaTexMemory) {
+ assert(ti0);
fxMesa->TexSource[0].StartAddress = ti0->tm[0]->startAddr;
fxMesa->TexSource[0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH;
fxMesa->TexSource[0].Info = &(ti0->info);
}
else {
+ assert(ti0);
if (ti0->LODblend && ti0->whichTMU == TDFX_TMU_SPLIT) {
fxMesa->TexSource[0].StartAddress = ti0->tm[TDFX_TMU0]->startAddr;
fxMesa->TexSource[0].EvenOdd = GR_MIPMAPLEVELMASK_ODD;
@@ -2185,20 +2187,26 @@ tdfxUpdateTextureBinding( GLcontext *ctx )
/* Both 2D enabled */
if (shared->umaTexMemory) {
const FxU32 tmu0 = 0, tmu1 = 1;
+
+ assert(ti0);
fxMesa->TexSource[tmu0].StartAddress = ti0->tm[0]->startAddr;
fxMesa->TexSource[tmu0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH;
fxMesa->TexSource[tmu0].Info = &(ti0->info);
+ assert(ti1);
fxMesa->TexSource[tmu1].StartAddress = ti1->tm[0]->startAddr;
fxMesa->TexSource[tmu1].EvenOdd = GR_MIPMAPLEVELMASK_BOTH;
fxMesa->TexSource[tmu1].Info = &(ti1->info);
}
else {
const FxU32 tmu0 = 0, tmu1 = 1;
+
+ assert(ti0);
fxMesa->TexSource[tmu0].StartAddress = ti0->tm[tmu0]->startAddr;
fxMesa->TexSource[tmu0].EvenOdd = GR_MIPMAPLEVELMASK_BOTH;
fxMesa->TexSource[tmu0].Info = &(ti0->info);
+ assert(ti1);
fxMesa->TexSource[tmu1].StartAddress = ti1->tm[tmu1]->startAddr;
fxMesa->TexSource[tmu1].EvenOdd = GR_MIPMAPLEVELMASK_BOTH;
fxMesa->TexSource[tmu1].Info = &(ti1->info);
diff --git a/src/tdfx_tris.c b/src/tdfx_tris.c
index 8824988..d65833c 100644
--- a/src/tdfx_tris.c
+++ b/src/tdfx_tris.c
@@ -320,7 +320,6 @@ static struct {
#define DO_POINTS 1
#define DO_FULL_QUAD 1
-#define HAVE_RGBA 1
#define HAVE_SPEC 0
#define HAVE_HW_FLATSHADE 0
#define HAVE_BACK_COLORS 0
diff --git a/src/tdfx_vb.c b/src/tdfx_vb.c
index d6fcf98..546d89a 100644
--- a/src/tdfx_vb.c
+++ b/src/tdfx_vb.c
@@ -64,11 +64,11 @@ static void interp_extras( GLcontext *ctx,
/*fprintf(stderr, "%s\n", __FUNCTION__);*/
- if (VB->ColorPtr[1]) {
+ if (VB->BackfaceColorPtr) {
INTERP_4F( t,
- GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], out),
- GET_COLOR(VB->ColorPtr[1], in) );
+ GET_COLOR(VB->BackfaceColorPtr, dst),
+ GET_COLOR(VB->BackfaceColorPtr, out),
+ GET_COLOR(VB->BackfaceColorPtr, in) );
}
if (VB->EdgeFlag) {
@@ -83,9 +83,9 @@ static void copy_pv_extras( GLcontext *ctx, GLuint dst, GLuint src )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- if (VB->ColorPtr[1]) {
- COPY_4FV( GET_COLOR(VB->ColorPtr[1], dst),
- GET_COLOR(VB->ColorPtr[1], src) );
+ if (VB->BackfaceColorPtr) {
+ COPY_4FV( GET_COLOR(VB->BackfaceColorPtr, dst),
+ GET_COLOR(VB->BackfaceColorPtr, src) );
}
setup_tab[TDFX_CONTEXT(ctx)->SetupIndex].copy_pv(ctx, dst, src);
@@ -331,7 +331,7 @@ void tdfxInitVB( GLcontext *ctx )
firsttime = 0;
}
- fxMesa->verts = ALIGN_MALLOC(size * sizeof(tdfxVertex), 32);
+ fxMesa->verts = _mesa_align_malloc(size * sizeof(tdfxVertex), 32);
fxMesa->vertexFormat = TDFX_LAYOUT_TINY;
fxMesa->SetupIndex = TDFX_XYZ_BIT|TDFX_RGBA_BIT;
}
@@ -341,7 +341,7 @@ void tdfxFreeVB( GLcontext *ctx )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
if (fxMesa->verts) {
- ALIGN_FREE(fxMesa->verts);
+ _mesa_align_free(fxMesa->verts);
fxMesa->verts = 0;
}
}
diff --git a/src/tdfx_vbtmp.h b/src/tdfx_vbtmp.h
index 9b78076..19baf7d 100644
--- a/src/tdfx_vbtmp.h
+++ b/src/tdfx_vbtmp.h
@@ -58,32 +58,32 @@ static void TAG(emit)( GLcontext *ctx,
/* fprintf(stderr, "%s\n", __FUNCTION__); */
if (IND & TDFX_TEX0_BIT) {
- tc0_stride = VB->TexCoordPtr[tmu0_source]->stride;
- tc0 = VB->TexCoordPtr[tmu0_source]->data;
+ tc0_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu0_source]->stride;
+ tc0 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu0_source]->data;
u0scale = fxMesa->sScale0;
v0scale = fxMesa->tScale0;
if (IND & TDFX_PTEX_BIT)
- tc0_size = VB->TexCoordPtr[tmu0_source]->size;
+ tc0_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu0_source]->size;
}
if (IND & TDFX_TEX1_BIT) {
- tc1 = VB->TexCoordPtr[tmu1_source]->data;
- tc1_stride = VB->TexCoordPtr[tmu1_source]->stride;
+ tc1 = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu1_source]->data;
+ tc1_stride = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu1_source]->stride;
u1scale = fxMesa->sScale1;
v1scale = fxMesa->tScale1;
if (IND & TDFX_PTEX_BIT)
- tc1_size = VB->TexCoordPtr[tmu1_source]->size;
+ tc1_size = VB->AttribPtr[_TNL_ATTRIB_TEX0 + tmu1_source]->size;
}
if (IND & TDFX_RGBA_BIT) {
- col = VB->ColorPtr[0]->data;
- col_stride = VB->ColorPtr[0]->stride;
- col_size = VB->ColorPtr[0]->size;
+ col = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->data;
+ col_stride = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->stride;
+ col_size = VB->AttribPtr[_TNL_ATTRIB_COLOR0]->size;
}
if (IND & TDFX_FOGC_BIT) {
- fog = VB->FogCoordPtr->data;
- fog_stride = VB->FogCoordPtr->stride;
+ fog = VB->AttribPtr[_TNL_ATTRIB_FOG]->data;
+ fog_stride = VB->AttribPtr[_TNL_ATTRIB_FOG]->stride;
}
{
@@ -168,14 +168,14 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
if (IND & TDFX_TEX1_BIT) {
- if (VB->TexCoordPtr[0] == 0)
- VB->TexCoordPtr[0] = VB->TexCoordPtr[1];
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0] == 0)
+ VB->AttribPtr[_TNL_ATTRIB_TEX0] = VB->AttribPtr[_TNL_ATTRIB_TEX1];
- if (VB->TexCoordPtr[1]->size == 4)
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX1]->size == 4)
return GL_FALSE;
}
- if (VB->TexCoordPtr[0]->size == 4)
+ if (VB->AttribPtr[_TNL_ATTRIB_TEX0]->size == 4)
return GL_FALSE;
}