mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-23 12:40:29 +01:00
mesa: do state validation in _mesa_valid_to_render()
...rather than checking/validating before all the calls to _mesa_valid_to_render() and valid_to_render(). The next patch will actually fix some bugs...
This commit is contained in:
parent
6e68898b05
commit
23eda89ec8
2 changed files with 4 additions and 9 deletions
|
|
@ -190,9 +190,6 @@ _mesa_validate_DrawElements(GLcontext *ctx,
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
if (!check_valid_to_render(ctx, "glDrawElements"))
|
||||
return GL_FALSE;
|
||||
|
||||
|
|
@ -254,9 +251,6 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
if (!check_valid_to_render(ctx, "glDrawRangeElements"))
|
||||
return GL_FALSE;
|
||||
|
||||
|
|
@ -304,9 +298,6 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
|
|||
return GL_FALSE;
|
||||
}
|
||||
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
if (!check_valid_to_render(ctx, "glDrawArrays"))
|
||||
return GL_FALSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -1580,6 +1580,10 @@ _mesa_set_mvp_with_dp4( GLcontext *ctx,
|
|||
GLboolean
|
||||
_mesa_valid_to_render(GLcontext *ctx, const char *where)
|
||||
{
|
||||
/* This depends on having up to date derived state (shaders) */
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
if (ctx->Shader.CurrentProgram) {
|
||||
/* using shaders */
|
||||
if (!ctx->Shader.CurrentProgram->LinkStatus) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue