summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dos/dmesa.c9
-rw-r--r--src/mesa/drivers/glide/fxapi.c2
-rw-r--r--src/mesa/drivers/glide/fxddtex.c4
-rw-r--r--src/mesa/drivers/glide/fxsetup.c2
-rw-r--r--src/mesa/drivers/glide/fxwgl.c14
5 files changed, 21 insertions, 10 deletions
diff --git a/src/mesa/drivers/dos/dmesa.c b/src/mesa/drivers/dos/dmesa.c
index 2eb260ff30e..33c17c144e7 100644
--- a/src/mesa/drivers/dos/dmesa.c
+++ b/src/mesa/drivers/dos/dmesa.c
@@ -1115,6 +1115,15 @@ DMesaVisual DMesaCreateVisual (GLint width,
freopen("MESA.LOG", "w", stderr);
}
+ if (((env = getenv("FX_GLIDE_REFRESH")) == NULL) || !atoi(env)) {
+ /* FX_GLIDE_REFRESH=0 has a special meaning for DJGPP Glide3x
+ * (switch via VESA, using default refresh) and we'll not override that.
+ */
+ char tmp[256];
+ sprintf(tmp, "FX_GLIDE_REFRESH=%u", refresh);
+ putenv(tmp);
+ }
+
return (DMesaVisual)fxMesaCreateBestContext(-1, width, height, fx_attrib);
#endif /* FX */
}
diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c
index c1dea541e21..6ed9453c9b7 100644
--- a/src/mesa/drivers/glide/fxapi.c
+++ b/src/mesa/drivers/glide/fxapi.c
@@ -203,8 +203,10 @@ gl3DfxSetPaletteEXT(GLuint * pal)
static GrScreenResolution_t fxBestResolution (int width, int height)
{
static int resolutions[][5] = {
+#if 1 /* Voodoo^2 can't fullscreen these, because of Glide */
{ 320, 200, GR_RESOLUTION_320x200 },
{ 320, 240, GR_RESOLUTION_320x240 },
+#endif
{ 512, 384, GR_RESOLUTION_512x384 },
{ 640, 400, GR_RESOLUTION_640x400 },
{ 640, 480, GR_RESOLUTION_640x480 },
diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c
index 629f0e311ea..eaca8401b8b 100644
--- a/src/mesa/drivers/glide/fxddtex.c
+++ b/src/mesa/drivers/glide/fxddtex.c
@@ -43,6 +43,7 @@
#include "image.h"
#include "teximage.h"
#include "texformat.h"
+#include "texobj.h"
#include "texstore.h"
#include "texutil.h"
@@ -365,6 +366,9 @@ fxDDTexDel(GLcontext * ctx, struct gl_texture_object *tObj)
FREE(ti);
tObj->DriverData = NULL;
+
+ /* Free mipmap images and the texture object itself */
+ _mesa_delete_texture_object(ctx, tObj);
}
/*
diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c
index 61ceb6e7ac0..17a4129eb6f 100644
--- a/src/mesa/drivers/glide/fxsetup.c
+++ b/src/mesa/drivers/glide/fxsetup.c
@@ -80,7 +80,7 @@ fxTexValidate(GLcontext * ctx, struct gl_texture_object *tObj)
* than hardware can support. Two cases:
* 1) we have mipmaps. Then we just push up to the first supported
* LOD. A possible drawback is that Mesa will ignore the skipped
- * LODs on further texture handling (including memory freeing).
+ * LODs on further texture handling.
* Will this interfere with GL_TEXTURE_[MIN|BASE]_LEVEL? How?
* 2) we don't have mipmaps. We need to rescale texture; two ways:
* a) create a new LOD and push up ti->minLevel and tObj->BaseLevel
diff --git a/src/mesa/drivers/glide/fxwgl.c b/src/mesa/drivers/glide/fxwgl.c
index 7b323dd6171..adf88a485c6 100644
--- a/src/mesa/drivers/glide/fxwgl.c
+++ b/src/mesa/drivers/glide/fxwgl.c
@@ -324,18 +324,14 @@ wglCreateContext(HDC hdc)
SetWindowLong(hWnd, GWL_WNDPROC, (LONG) __wglMonitor);
}
-#if FX_DEBUG
- /* always log when debugging */
- freopen("MESA.LOG", "w", stderr);
-#else
- /* log only if user wants */
{
- char *env = getenv("MESA_FX_INFO");
- if (env && env[0] == 'r') {
+ char *env;
+ /* always log when debugging, or if user demands */
+#if !FX_DEBUG
+ if ((env = getenv("MESA_FX_INFO")) && env[0] == 'r')
+#endif
freopen("MESA.LOG", "w", stderr);
- }
}
-#endif
{
RECT cliRect;