diff options
author | Paul Berry <[email protected]> | 2012-07-18 12:54:48 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2012-07-26 10:38:05 -0700 |
commit | 284ad9c3b29a6d6f0bade050ea9e949d67967983 (patch) | |
tree | 7c50cc152a6be64a4e31fb5545a51ce41fd33873 /src/mesa/main/readpix.c | |
parent | e72f20641a6ea7875b6021aac13e778ada3b3d50 (diff) |
mesa: Make more consistent use of _mesa_is_{user,winsys}_fbo()
A lot of code was still differentiating between between winsys and
user fbos by testing the fbo's name against zero. This converts
everything in core mesa, the state tracker, and src/mesa/program over
to use _mesa_is_user_fbo() and _mesa_is_winsys_fbo().
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/readpix.c')
-rw-r--r-- | src/mesa/main/readpix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c index 82d99fd21c9..7ac87749738 100644 --- a/src/mesa/main/readpix.c +++ b/src/mesa/main/readpix.c @@ -37,6 +37,7 @@ #include "pbo.h" #include "state.h" #include "glformats.h" +#include "fbobject.h" /** @@ -722,7 +723,8 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height, } } - if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) { + if (_mesa_is_user_fbo(ctx->ReadBuffer) && + ctx->ReadBuffer->Visual.samples > 0) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(multisample FBO)"); return; } |