mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
mesa: only check errors when the state change in glProvokingVertex()
When this GL call is a no-op, it should be a little faster. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
6d37bcdb79
commit
c787477378
1 changed files with 3 additions and 3 deletions
|
|
@ -73,6 +73,9 @@ _mesa_ProvokingVertex(GLenum mode)
|
|||
if (MESA_VERBOSE&VERBOSE_API)
|
||||
_mesa_debug(ctx, "glProvokingVertexEXT 0x%x\n", mode);
|
||||
|
||||
if (ctx->Light.ProvokingVertex == mode)
|
||||
return;
|
||||
|
||||
switch (mode) {
|
||||
case GL_FIRST_VERTEX_CONVENTION_EXT:
|
||||
case GL_LAST_VERTEX_CONVENTION_EXT:
|
||||
|
|
@ -82,9 +85,6 @@ _mesa_ProvokingVertex(GLenum mode)
|
|||
return;
|
||||
}
|
||||
|
||||
if (ctx->Light.ProvokingVertex == mode)
|
||||
return;
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_LIGHT);
|
||||
ctx->Light.ProvokingVertex = mode;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue