aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.h3
-rw-r--r--src/mesa/state_tracker/st_manager.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.h b/src/mesa/state_tracker/st_cb_fbo.h
index d3e05547729..351fb9a02ef 100644
--- a/src/mesa/state_tracker/st_cb_fbo.h
+++ b/src/mesa/state_tracker/st_cb_fbo.h
@@ -85,7 +85,8 @@ static inline struct st_framebuffer *
st_ws_framebuffer(struct gl_framebuffer *fb)
{
/* FBO cannot be casted. See st_new_framebuffer */
- if (fb && _mesa_is_winsys_fbo(fb))
+ if (fb && _mesa_is_winsys_fbo(fb) &&
+ fb != _mesa_get_incomplete_framebuffer())
return (struct st_framebuffer *) fb;
return NULL;
}
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index b9e46fd07e6..d8177f20e30 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -844,13 +844,14 @@ st_manager_flush_frontbuffer(struct st_context *st)
struct st_framebuffer *stfb = st_ws_framebuffer(st->ctx->DrawBuffer);
struct st_renderbuffer *strb = NULL;
+ assert(st->ctx->DrawBuffer != _mesa_get_incomplete_framebuffer());
+
if (stfb)
strb = st_renderbuffer(stfb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
if (!strb)
return;
/* never a dummy fb */
- assert(&stfb->Base != _mesa_get_incomplete_framebuffer());
stfb->iface->flush_front(&st->iface, stfb->iface, ST_ATTACHMENT_FRONT_LEFT);
}