[Mesa-dev] [PATCH 16/23] readpix: raise priority of FBO completeness error
Ian Romanick
idr at freedesktop.org
Mon Jan 7 13:19:26 PST 2013
On 01/04/2013 06:41 PM, Jordan Justen wrote:
> GTF/gles3 test suite wants this error to have higher priority
> than the type checking.
If the ReadPixels call in the test has multiple errors, the test should
be changed. There is no requirement to generate a specific error when
multiple problems exist. Is my understanding of the test case correct?
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
> src/mesa/main/readpix.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
> index 8b1113c..f21242c 100644
> --- a/src/mesa/main/readpix.c
> +++ b/src/mesa/main/readpix.c
> @@ -749,6 +749,15 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
> return;
> }
>
> + if (ctx->NewState)
> + _mesa_update_state(ctx);
> +
> + if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
> + _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
> + "glReadPixels(incomplete framebuffer)" );
> + return;
> + }
> +
> rb = _mesa_get_read_renderbuffer(ctx, format);
> if (rb == NULL) {
> _mesa_error(ctx, GL_INVALID_OPERATION,
> @@ -789,9 +798,6 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
> }
> }
>
> - if (ctx->NewState)
> - _mesa_update_state(ctx);
> -
> err = _mesa_error_check_format_and_type(ctx, format, type);
> if (err != GL_NO_ERROR) {
> _mesa_error(ctx, err, "glReadPixels(invalid format %s and/or type %s)",
> @@ -800,12 +806,6 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
> return;
> }
>
> - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
> - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
> - "glReadPixels(incomplete framebuffer)" );
> - return;
> - }
> -
> if (_mesa_is_user_fbo(ctx->ReadBuffer) &&
> ctx->ReadBuffer->Visual.samples > 0) {
> _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(multisample FBO)");
>
More information about the mesa-dev
mailing list