From: Brian Date: Mon, 13 Aug 2007 19:56:30 +0000 (-0600) Subject: flush pipe before reading image X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb450bbb40bd9cccde74b1e2d660908e154f9cc0;p=mesa.git flush pipe before reading image --- diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index 273ed5770be..22abc104e22 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)