xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Sep 20 02:59:18 UTC 2023


 glamor/glamor.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit baaddf47d593b51d215d836a796b95a3cb14a220
Author: Konstantin <ria.freelander at gmail.com>
Date:   Fri Dec 2 16:22:15 2022 +0300

    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 at gmail.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>

diff --git a/glamor/glamor.c b/glamor/glamor.c
index 617766c2a..848b484cf 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -307,6 +307,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;


More information about the xorg-commit mailing list