xserver: Branch 'xwayland-21.1'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 19 07:43:39 UTC 2021


 hw/xwayland/xwayland-glamor.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 6573da8ce469c4f580a96c6cd59a3c1072e7eb3e
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Mon Nov 1 13:05:56 2021 +0100

    xwayland: Store EGLContext pointer in lastGLContext
    
    We were storing the pointer to struct glamor_context. However, glamor
    itself is storing the EGLContext pointer since the commit below. Since
    the two values could never be equal, this resulted in constant
    superfluous eglMakeCurrent calls. The implicit glFlush triggered by
    those couldn't be good for performance.
    
    Fixes: 7c88977d338a "glamor: Store the actual EGL/GLX context pointer in lastGLContext"
    Reviewed-by: Olivier Fourdan <ofourdan at redhat.com>
    
    
    (cherry picked from commit b656b0aa5d41270fe60be245582f1ff6f1dbbb9c)

diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index e940f9fd7..deb398f91 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -58,10 +58,12 @@ glamor_egl_make_current(struct glamor_context *glamor_ctx)
 void
 xwl_glamor_egl_make_current(struct xwl_screen *xwl_screen)
 {
-    if (lastGLContext == xwl_screen->glamor_ctx)
+    EGLContext ctx = xwl_screen->glamor_ctx->ctx;
+    
+    if (lastGLContext == ctx)
         return;
 
-    lastGLContext = xwl_screen->glamor_ctx;
+    lastGLContext = ctx;
     xwl_screen->glamor_ctx->make_current(xwl_screen->glamor_ctx);
 }
 


More information about the xorg-commit mailing list