summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_framebuffer.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c
index 6fd731d209d..aaa7d42ae06 100644
--- a/src/mesa/state_tracker/st_framebuffer.c
+++ b/src/mesa/state_tracker/st_framebuffer.c
@@ -286,15 +286,17 @@ st_notify_swapbuffers_complete(struct st_framebuffer *stfb)
if (ctx && ctx->DrawBuffer == &stfb->Base) {
struct st_renderbuffer *strb;
- int i;
-
- for (i = 0; i < BUFFER_COUNT; i++) {
- if (stfb->Base.Attachment[i].Renderbuffer) {
- strb = st_renderbuffer(stfb->Base.Attachment[i].Renderbuffer);
- if (strb->surface)
- strb->surface->status = PIPE_SURFACE_STATUS_UNDEFINED;
- }
- }
+
+ /* Mark back color buffers as undefined */
+ strb = st_renderbuffer(stfb->Base.Attachment[BUFFER_BACK_LEFT].
+ Renderbuffer);
+ if (strb && strb->surface)
+ strb->surface->status = PIPE_SURFACE_STATUS_UNDEFINED;
+
+ strb = st_renderbuffer(stfb->Base.Attachment[BUFFER_BACK_RIGHT].
+ Renderbuffer);
+ if (strb && strb->surface)
+ strb->surface->status = PIPE_SURFACE_STATUS_UNDEFINED;
}
}