mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
mesa: stop using _mesa_error_check_format_type() in glReadPixels
Basically the same story as the previous commit. But we were already calling _mesa_source_buffer_exists() in ReadPixels(). Yeah, we were calling it twice. Signed-off-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
6bed7a861d
commit
b8f7eef4ef
1 changed files with 7 additions and 2 deletions
|
|
@ -697,6 +697,8 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
|
||||||
GLenum format, GLenum type, GLsizei bufSize,
|
GLenum format, GLenum type, GLsizei bufSize,
|
||||||
GLvoid *pixels )
|
GLvoid *pixels )
|
||||||
{
|
{
|
||||||
|
GLenum err;
|
||||||
|
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
|
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
|
||||||
|
|
||||||
|
|
@ -718,8 +720,11 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
|
||||||
if (ctx->NewState)
|
if (ctx->NewState)
|
||||||
_mesa_update_state(ctx);
|
_mesa_update_state(ctx);
|
||||||
|
|
||||||
if (_mesa_error_check_format_type(ctx, format, type, GL_FALSE)) {
|
err = _mesa_error_check_format_and_type(ctx, format, type);
|
||||||
/* found an error */
|
if (err != GL_NO_ERROR) {
|
||||||
|
_mesa_error(ctx, err, "glReadPixels(invalid format %s and/or type %s)",
|
||||||
|
_mesa_lookup_enum_by_nr(format),
|
||||||
|
_mesa_lookup_enum_by_nr(type));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue