summaryrefslogtreecommitdiffstats
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.c4
-rw-r--r--src/mesa/drivers/glide/fxdd.c12
2 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c
index 708dad51f41..a96709c4fa2 100644
--- a/src/mesa/drivers/glide/fxapi.c
+++ b/src/mesa/drivers/glide/fxapi.c
@@ -873,10 +873,6 @@ fxMesaMakeCurrent(fxMesaContext fxMesa)
_mesa_make_current(fxMesa->glCtx, fxMesa->glBuffer);
fxSetupDDPointers(fxMesa->glCtx);
-
- /* The first time we call MakeCurrent we set the initial viewport size */
- if (fxMesa->glCtx->Viewport.Width == 0)
- _mesa_set_viewport(fxMesa->glCtx, 0, 0, fxMesa->width, fxMesa->height);
}
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index a54bf8fb9c9..e222db951d2 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -43,6 +43,7 @@
#include "image.h"
#include "mtypes.h"
#include "fxdrv.h"
+#include "buffers.h"
#include "enums.h"
#include "extensions.h"
#include "macros.h"
@@ -106,7 +107,7 @@ static void fxDisableColor (fxMesaContext fxMesa)
/* Return buffer size information */
static void
-fxDDBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height)
+fxDDGetBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height)
{
GET_CURRENT_CONTEXT(ctx);
if (ctx && FX_CONTEXT(ctx)) {
@@ -121,6 +122,12 @@ fxDDBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height)
}
}
+static void
+fxDDViewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+{
+ /* poll for window size change and realloc software Z/stencil/etc if needed */
+ _mesa_ResizeBuffersMESA();
+}
/* Implements glClearColor() */
static void
@@ -2106,7 +2113,8 @@ fxSetupDDPointers(GLcontext * ctx)
ctx->Driver.ClearColor = fxDDClearColor;
ctx->Driver.Clear = fxDDClear;
ctx->Driver.DrawBuffer = fxDDSetDrawBuffer;
- ctx->Driver.GetBufferSize = fxDDBufferSize;
+ ctx->Driver.GetBufferSize = fxDDGetBufferSize;
+ ctx->Driver.Viewport = fxDDViewport;
switch (fxMesa->colDepth) {
case 15:
ctx->Driver.DrawPixels = fxDDDrawPixels555;