summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/glide
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/glide')
-rw-r--r--src/mesa/drivers/glide/fxapi.c6
-rw-r--r--src/mesa/drivers/glide/fxdd.c29
-rw-r--r--src/mesa/drivers/glide/fxddspan.c4
-rw-r--r--src/mesa/drivers/glide/fxddtex.c14
-rw-r--r--src/mesa/drivers/glide/fxdrv.h10
-rw-r--r--src/mesa/drivers/glide/fxsetup.c8
-rw-r--r--src/mesa/drivers/glide/fxtris.c8
-rw-r--r--src/mesa/drivers/glide/fxvb.c10
8 files changed, 45 insertions, 44 deletions
diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c
index 00b9d29fac..238f491599 100644
--- a/src/mesa/drivers/glide/fxapi.c
+++ b/src/mesa/drivers/glide/fxapi.c
@@ -43,7 +43,7 @@
#include "fxdrv.h"
#include "drivers/common/driverfuncs.h"
-#include "framebuffer.h"
+#include "main/framebuffer.h"
#ifndef TDFX_DEBUG
int TDFX_DEBUG = (0
@@ -728,7 +728,7 @@ errorhandler:
FREE(fxMesa->fogTable);
}
if (fxMesa->glBuffer) {
- _mesa_unreference_framebuffer(&fxMesa->glBuffer);
+ _mesa_reference_framebuffer(&fxMesa->glBuffer, NULL);
}
if (fxMesa->glVis) {
_mesa_destroy_visual(fxMesa->glVis);
@@ -828,7 +828,7 @@ fxMesaDestroyContext(fxMesaContext fxMesa)
fxDDDestroyFxMesaContext(fxMesa); /* must be before _mesa_destroy_context */
_mesa_destroy_visual(fxMesa->glVis);
_mesa_destroy_context(fxMesa->glCtx);
- _mesa_unreference_framebuffer(&fxMesa->glBuffer);
+ _mesa_reference_framebuffer(&fxMesa->glBuffer, NULL);
fxTMClose(fxMesa); /* must be after _mesa_destroy_context */
FREE(fxMesa);
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index 4e56f7bde5..1bcf2512a6 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -40,15 +40,15 @@
#if defined(FX)
-#include "image.h"
-#include "mtypes.h"
+#include "main/image.h"
+#include "main/mtypes.h"
#include "fxdrv.h"
-#include "buffers.h"
-#include "enums.h"
-#include "extensions.h"
-#include "macros.h"
-#include "texstore.h"
-#include "teximage.h"
+#include "main/buffers.h"
+#include "main/enums.h"
+#include "main/extensions.h"
+#include "main/macros.h"
+#include "main/texstore.h"
+#include "main/teximage.h"
#include "swrast/swrast.h"
#include "swrast/s_context.h"
#include "swrast_setup/swrast_setup.h"
@@ -1773,6 +1773,8 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa)
ctx->Const.MaxTextureImageUnits = fxMesa->haveTwoTMUs ? 2 : 1;
ctx->Const.MaxTextureUnits = MAX2(ctx->Const.MaxTextureImageUnits, ctx->Const.MaxTextureCoordUnits);
+ ctx->Const.MaxDrawBuffers = 1;
+
fxMesa->new_state = _NEW_ALL;
if (!fxMesa->haveHwStencil) {
/* don't touch stencil if there is none */
@@ -1862,7 +1864,6 @@ fxDDInitExtensions(GLcontext * ctx)
}
if (fxMesa->type >= GR_SSTTYPE_Voodoo4) {
- _mesa_enable_extension(ctx, "GL_ARB_texture_compression");
_mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
_mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc");
_mesa_enable_extension(ctx, "GL_S3_s3tc");
@@ -1894,7 +1895,6 @@ fxDDInitExtensions(GLcontext * ctx)
* fxSetupSingleTMU_NoLock/fxSetupDoubleTMU_NoLock:
* grTexDownloadTable(GR_TEXTABLE_NCC0, &(ti->palette));
*/
- /*_mesa_enable_extension(ctx, "GL_ARB_texture_compression");*/
_mesa_enable_extension(ctx, "GL_SGIS_generate_mipmap");
}
@@ -1917,9 +1917,6 @@ fxDDInitExtensions(GLcontext * ctx)
}
/* core-level extensions */
- _mesa_enable_extension(ctx, "GL_EXT_multi_draw_arrays");
- _mesa_enable_extension(ctx, "GL_IBM_multimode_draw_arrays");
- _mesa_enable_extension(ctx, "GL_ARB_vertex_buffer_object");
/* dangerous */
if (getenv("MESA_FX_ALLOW_VP")) {
_mesa_enable_extension(ctx, "GL_ARB_vertex_program");
@@ -1951,12 +1948,12 @@ fx_check_IsInHardware(GLcontext * ctx)
return FX_FALLBACK_RENDER_MODE;
}
- if (ctx->Stencil.Enabled && !fxMesa->haveHwStencil) {
+ if (ctx->Stencil._Enabled && !fxMesa->haveHwStencil) {
return FX_FALLBACK_STENCIL;
}
- if (ctx->DrawBuffer->_ColorDrawBufferMask[0] != BUFFER_BIT_FRONT_LEFT &&
- ctx->DrawBuffer->_ColorDrawBufferMask[0] != BUFFER_BIT_BACK_LEFT) {
+ if ((ctx->DrawBuffer->_ColorDrawBufferIndexes[0] != BUFFER_BIT_FRONT_LEFT) &&
+ (ctx->DrawBuffer->_ColorDrawBufferIndexes[0] != BUFFER_BIT_BACK_LEFT)) {
return FX_FALLBACK_DRAW_BUFFER;
}
diff --git a/src/mesa/drivers/glide/fxddspan.c b/src/mesa/drivers/glide/fxddspan.c
index 3ea9f73dd2..d3a58a301c 100644
--- a/src/mesa/drivers/glide/fxddspan.c
+++ b/src/mesa/drivers/glide/fxddspan.c
@@ -275,6 +275,8 @@
#undef BYTESPERPIXEL
#define BYTESPERPIXEL 2
+#define VALUE_TYPE GLushort
+
#define WRITE_DEPTH( _x, _y, d ) \
*(GLushort *)(buf + _x*BYTESPERPIXEL + _y*pitch) = d
@@ -302,6 +304,8 @@
#undef BYTESPERPIXEL
#define BYTESPERPIXEL 4
+#define VALUE_TYPE GLuint
+
#define WRITE_DEPTH( _x, _y, d ) \
*(GLuint *)(buf + _x*BYTESPERPIXEL + _y*pitch) = d << 8
diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c
index cb2c8554b1..f3cd908181 100644
--- a/src/mesa/drivers/glide/fxddtex.c
+++ b/src/mesa/drivers/glide/fxddtex.c
@@ -39,13 +39,13 @@
#if defined(FX)
#include "fxdrv.h"
-#include "enums.h"
-#include "image.h"
-#include "teximage.h"
-#include "texformat.h"
-#include "texcompress.h"
-#include "texobj.h"
-#include "texstore.h"
+#include "main/enums.h"
+#include "main/image.h"
+#include "main/teximage.h"
+#include "main/texformat.h"
+#include "main/texcompress.h"
+#include "main/texobj.h"
+#include "main/texstore.h"
/* no borders! can't halve 1x1! (stride > width * comp) not allowed */
diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h
index dc19a912da..bee10de2f4 100644
--- a/src/mesa/drivers/glide/fxdrv.h
+++ b/src/mesa/drivers/glide/fxdrv.h
@@ -48,11 +48,11 @@
#include <signal.h>
#endif
-#include "context.h"
-#include "imports.h"
-#include "macros.h"
-#include "matrix.h"
-#include "mtypes.h"
+#include "main/context.h"
+#include "main/imports.h"
+#include "main/macros.h"
+#include "main/matrix.h"
+#include "main/mtypes.h"
#include "GL/fxmesa.h"
#include "fxglidew.h"
diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c
index 240e5e0b59..d48726a62a 100644
--- a/src/mesa/drivers/glide/fxsetup.c
+++ b/src/mesa/drivers/glide/fxsetup.c
@@ -41,11 +41,11 @@
#if defined(FX)
#include "fxdrv.h"
-#include "enums.h"
-#include "tnl.h"
+#include "main/enums.h"
+#include "main/texstore.h"
+#include "tnl/tnl.h"
#include "tnl/t_context.h"
-#include "swrast.h"
-#include "texstore.h"
+#include "swrast/swrast.h"
static void
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c
index 0b9b3be582..aff91fe7d4 100644
--- a/src/mesa/drivers/glide/fxtris.c
+++ b/src/mesa/drivers/glide/fxtris.c
@@ -31,10 +31,10 @@
#ifdef FX
-#include "imports.h"
-#include "mtypes.h"
-#include "macros.h"
-#include "colormac.h"
+#include "main/imports.h"
+#include "main/mtypes.h"
+#include "main/macros.h"
+#include "main/colormac.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
#include "tnl/t_context.h"
diff --git a/src/mesa/drivers/glide/fxvb.c b/src/mesa/drivers/glide/fxvb.c
index 34ada61f4e..1dc5f9891a 100644
--- a/src/mesa/drivers/glide/fxvb.c
+++ b/src/mesa/drivers/glide/fxvb.c
@@ -34,11 +34,11 @@
#ifdef FX
-#include "glheader.h"
-#include "mtypes.h"
-#include "imports.h"
-#include "macros.h"
-#include "colormac.h"
+#include "main/glheader.h"
+#include "main/mtypes.h"
+#include "main/imports.h"
+#include "main/macros.h"
+#include "main/colormac.h"
#include "math/m_translate.h"
#include "swrast_setup/swrast_setup.h"