mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
move _mesa_update_state() calls before error tests that depend on framebuffer completeness
This commit is contained in:
parent
74e9a43a2a
commit
948ab5d8a9
1 changed files with 11 additions and 11 deletions
|
|
@ -149,15 +149,15 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
|
|||
return;
|
||||
}
|
||||
|
||||
if (ctx->NewState) {
|
||||
_mesa_update_state(ctx);
|
||||
}
|
||||
|
||||
if (error_check_format_type(ctx, format, type, GL_TRUE)) {
|
||||
/* found an error */
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->NewState) {
|
||||
_mesa_update_state(ctx);
|
||||
}
|
||||
|
||||
if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
|
||||
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
|
||||
"glDrawPixels(incomplete framebuffer)" );
|
||||
|
|
@ -199,6 +199,10 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
|
|||
GET_CURRENT_CONTEXT(ctx);
|
||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
|
||||
|
||||
if (ctx->NewState) {
|
||||
_mesa_update_state(ctx);
|
||||
}
|
||||
|
||||
if (ctx->FragmentProgram.Enabled && !ctx->FragmentProgram._Enabled) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glCopyPixels (invalid fragment program)");
|
||||
|
|
@ -249,10 +253,6 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
|
|||
return;
|
||||
}
|
||||
|
||||
if (ctx->NewState) {
|
||||
_mesa_update_state(ctx);
|
||||
}
|
||||
|
||||
if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT ||
|
||||
ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
|
||||
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
|
||||
|
|
@ -304,14 +304,14 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
|
|||
return;
|
||||
}
|
||||
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
if (error_check_format_type(ctx, format, type, GL_FALSE)) {
|
||||
/* found an error */
|
||||
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)" );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue