mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-04 23:28:05 +02: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>
(cherry picked from commit baaddf47d5)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1636>
This commit is contained in:
parent
feb860014d
commit
3078e49257
1 changed files with 4 additions and 0 deletions
|
|
@ -310,6 +310,10 @@ glamor_gldrawarrays_quads_using_indices(glamor_screen_private *glamor_priv,
|
|||
{
|
||||
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. */
|
||||
if (count == 1)
|
||||
goto fallback;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue