mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 15:10:12 +01:00
mesa: avoid redundant state setting in glClientActiveTexture
Plus add code for verbose/debugging.
This commit is contained in:
parent
33531614de
commit
72cb441c2f
1 changed files with 7 additions and 0 deletions
|
|
@ -318,11 +318,18 @@ _mesa_ClientActiveTextureARB(GLenum texture)
|
|||
GLuint texUnit = texture - GL_TEXTURE0;
|
||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
||||
|
||||
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE))
|
||||
_mesa_debug(ctx, "glClientActiveTexture %s\n",
|
||||
_mesa_lookup_enum_by_nr(texture));
|
||||
|
||||
if (texUnit >= ctx->Const.MaxTextureCoordUnits) {
|
||||
_mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(texture)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->Array.ActiveTexture == texUnit)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_ARRAY);
|
||||
ctx->Array.ActiveTexture = texUnit;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue