diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 4c9194e148f..82713bdc4f1 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -860,7 +860,8 @@ _swrast_DrawPixels( GLcontext *ctx, format, type, pixels)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(invalid PBO access)"); - goto end; + RENDER_FINISH(swrast,ctx); + return; } buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, GL_READ_ONLY_ARB, diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 916ddc1b973..806fca96b25 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -580,7 +580,8 @@ _swrast_ReadPixels( GLcontext *ctx, format, type, pixels)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(invalid PBO access)"); - goto end; + RENDER_FINISH(swrast, ctx); + return; } buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, GL_WRITE_ONLY_ARB,