diff options
author | Brian <[email protected]> | 2007-10-17 16:18:45 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-10-17 16:18:45 -0600 |
commit | 49adf51eeec31c9f3c995a70acc5008522689708 (patch) | |
tree | 9a722e6d128a8344d3334602d8eb79ffed74b8b5 /src/mesa/main/drawpix.c | |
parent | 420c062cb68e4e313ef34bd879852a003101169e (diff) |
Add some FLUSH_CURRENT() calls.
Without these we can find ourselves in _mesa_load_state_parameters()
computing derived lighting/material values whhen the current material
properties haven't been updated from the VBO.
This may be a somewhat wide-spread problem that needs more attention...
Diffstat (limited to 'src/mesa/main/drawpix.c')
-rw-r--r-- | src/mesa/main/drawpix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index 296dcf8f0bc..e4be0d496e9 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -276,6 +276,8 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + FLUSH_CURRENT(ctx, 0); + if (width < 0 || height < 0) { _mesa_error( ctx, GL_INVALID_VALUE, "glReadPixels(width=%d height=%d)", width, height ); |