mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 09:20:02 +01:00
glamor: fixes GL_INVALID_ENUM errors on ES if there is no quads
If there is no quads to draw, then we have a possibility to call glDrawElements with type as zero, which will generate GL_INVALID_ENUM error. While this error is harmless, it is annoying. Signed-off-by: Konstantin <ria.freelander@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
d1f142891e
commit
baaddf47d5
1 changed files with 4 additions and 0 deletions
|
|
@ -307,6 +307,10 @@ glamor_gldrawarrays_quads_using_indices(glamor_screen_private *glamor_priv,
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
|
/* If there is no quads to draw, just exit */
|
||||||
|
if (count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
/* For a single quad, don't bother with an index buffer. */
|
/* For a single quad, don't bother with an index buffer. */
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
goto fallback;
|
goto fallback;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue