aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_framebuffer.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-04-09 18:39:51 -0600
committerBrian Paul <[email protected]>2008-04-09 18:39:51 -0600
commit311e40268414649f047ee177ba22a17a2d437843 (patch)
tree41aa5d3e308e25c1753eb882eb25d1bc80918316 /src/mesa/state_tracker/st_framebuffer.c
parent54d7c399a888283711bdc00f93cb54a3ce0b30eb (diff)
gallium: more elaborate tracking of front color buffer state
This fixes the case where the app calls SwapBuffers then calls glReadPixels to read the front color buffer. We now keep track of when the front buffer is a _logically_ copy of the back buffer (after SwapBuffers) and read from the back color buffer instead of the front.
Diffstat (limited to 'src/mesa/state_tracker/st_framebuffer.c')
-rw-r--r--src/mesa/state_tracker/st_framebuffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c
index ea09d9234cd..47466c97d81 100644
--- a/src/mesa/state_tracker/st_framebuffer.c
+++ b/src/mesa/state_tracker/st_framebuffer.c
@@ -188,6 +188,7 @@ st_notify_swapbuffers(struct st_framebuffer *stfb)
st_flush( ctx->st,
PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_SWAPBUFFERS,
NULL );
+ ctx->st->frontbuffer_status = FRONT_STATUS_COPY_OF_BACK;
}
}