glx/sw: check for modifier support in the kopper path
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 27 Jul 2023 12:52:11 +0000 (08:52 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 27 Jul 2023 19:18:21 +0000 (19:18 +0000)
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24075>

src/glx/drisw_glx.c
src/glx/drisw_priv.h

index 7d9821c..f399d77 100644 (file)
@@ -32,6 +32,7 @@
 #include <dlfcn.h>
 #include "dri_common.h"
 #include "drisw_priv.h"
+#include "dri3_priv.h"
 #include <X11/extensions/shmproto.h>
 #include <assert.h>
 #include <vulkan/vulkan_core.h>
@@ -998,6 +999,11 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
    glx_config_destroy_list(psc->base.visuals);
    psc->base.visuals = visuals;
 
+   if (pdpyp->zink) {
+      bool err;
+      psc->has_multibuffer = dri3_check_multibuffer(priv->dpy, &err);
+   }
+
    psc->driver_configs = driver_configs;
 
    psc->base.vtable = &drisw_screen_vtable;
index d1f445b..53674f8 100644 (file)
@@ -56,6 +56,8 @@ struct drisw_screen
 
    void *driver;
    const char *name;
+
+   bool has_multibuffer;
 };
 
 struct drisw_drawable