summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_drawpixels.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-04-09 18:39:51 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-04-09 18:39:51 -0600
commit311e40268414649f047ee177ba22a17a2d437843 (patch)
tree41aa5d3e308e25c1753eb882eb25d1bc80918316 /src/mesa/state_tracker/st_cb_drawpixels.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_cb_drawpixels.c')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index b1affc4a91..5f8c90cbba 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -961,7 +961,7 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
}
if (type == GL_COLOR) {
- rbRead = st_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer);
+ rbRead = st_get_color_read_renderbuffer(ctx);
color = NULL;
stfp = combined_drawpix_fragment_program(ctx);
stvp = st_make_passthrough_vertex_shader(ctx->st, GL_FALSE);