summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-13 13:56:30 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-13 13:56:30 -0600
commiteb450bbb40bd9cccde74b1e2d660908e154f9cc0 (patch)
treeb3f0527df7077cd02b0c0bd0c0a72ba99679276a /src
parent0095be534d633848bc12d73ed9dcc1b9aa41f00a (diff)
flush pipe before reading image
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c
index 273ed5770b..22abc104e2 100644
--- a/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/src/mesa/state_tracker/st_cb_readpixels.c
@@ -74,9 +74,17 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height,
return;
}
+ /* make sure rendering has completed */
+ pipe->flush(pipe, 0x0);
- /* XXX check pack->BufferObj !!! */
+ if (pack->BufferObj && pack->BufferObj->Name) {
+ /* reading into a PBO */
+ }
+ else {
+ /* reading into user memory/buffer */
+
+ }
strb = st_renderbuffer(ctx->ReadBuffer->_ColorReadBuffer);
if (!strb)