summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/swrast/swrast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/swrast/swrast.c')
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 94758e60862..8e8d6bd628e 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -36,6 +36,7 @@
#include "main/api_exec.h"
#include "main/context.h"
#include "main/extensions.h"
+#include "main/fbobject.h"
#include "main/formats.h"
#include "main/framebuffer.h"
#include "main/imports.h"
@@ -679,7 +680,7 @@ swrast_check_and_update_window_size( struct gl_context *ctx, struct gl_framebuff
{
GLsizei width, height;
- if (!fb)
+ if (!fb || fb == _mesa_get_incomplete_framebuffer())
return;
get_window_size(fb, &width, &height);
@@ -877,6 +878,12 @@ dri_make_current(__DRIcontext * cPriv,
mesaDraw = &draw->Base;
mesaRead = &read->Base;
}
+ else {
+ struct gl_framebuffer *incomplete
+ = _mesa_get_incomplete_framebuffer();
+ mesaDraw = incomplete;
+ mesaRead = incomplete;
+ }
/* check for same context and buffer */
if (mesaCtx == _mesa_get_current_context()