flush pipe before reading image
authorBrian <brian.paul@tungstengraphics.com>
Mon, 13 Aug 2007 19:56:30 +0000 (13:56 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Mon, 13 Aug 2007 19:56:30 +0000 (13:56 -0600)
src/mesa/state_tracker/st_cb_readpixels.c

index 273ed5770be89c006e31fcf419f26b23d2891fd5..22abc104e22dae0fd343a5229712bc80140e296e 100644 (file)
@@ -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)