e8725b8
diff --git a/glx/vndext.c b/glx/vndext.c
e8725b8
index 20c0648ccfc9fc592a552725c0d0fef609db7362..582e60b6e7412148903f3f19aacc1e3ff3478a96 100644
e8725b8
--- a/glx/vndext.c
e8725b8
+++ b/glx/vndext.c
e8725b8
@@ -324,6 +324,7 @@ _X_EXPORT const GlxServerExports glxServer = {
e8725b8
     .getContextTagPrivate = GlxGetContextTagPrivate,
e8725b8
     .getVendorForScreen = GlxGetVendorForScreen,
e8725b8
     .forwardRequest =  GlxForwardRequest,
e8725b8
+    .setClientScreenVendor = GlxSetClientScreenVendor,
e8725b8
 };
e8725b8
 
e8725b8
 const GlxServerExports *
e8725b8
diff --git a/glx/vndserver.h b/glx/vndserver.h
e8725b8
index 613fef0fe221b5a1fbc8d35b562edb167b772196..772b458a1c8d27b96ae6f00933ec78cf607fdb22 100644
e8725b8
--- a/glx/vndserver.h
e8725b8
+++ b/glx/vndserver.h
e8725b8
@@ -107,6 +107,7 @@ GlxContextTagInfo *GlxLookupContextTag(ClientPtr client, GLXContextTag tag);
e8725b8
 void GlxFreeContextTag(GlxContextTagInfo *tagInfo);
e8725b8
 
e8725b8
 Bool GlxSetScreenVendor(ScreenPtr screen, GlxServerVendor *vendor);
e8725b8
+Bool GlxSetClientScreenVendor(ClientPtr client, ScreenPtr screen, GlxServerVendor *vendor);
e8725b8
 GlxScreenPriv *GlxGetScreen(ScreenPtr pScreen);
e8725b8
 GlxServerVendor *GlxGetVendorForScreen(ClientPtr client, ScreenPtr screen);
e8725b8
 
e8725b8
diff --git a/glx/vndservermapping.c b/glx/vndservermapping.c
e8725b8
index 4efab8b81d1eadd84ada3de078e17d7ad51661d6..04788ffbdd78fb2c4812c13de55f7c39e3765ff3 100644
e8725b8
--- a/glx/vndservermapping.c
e8725b8
+++ b/glx/vndservermapping.c
e8725b8
@@ -189,6 +189,27 @@ Bool GlxSetScreenVendor(ScreenPtr screen, GlxServerVendor *vendor)
e8725b8
     return TRUE;
e8725b8
 }
e8725b8
 
e8725b8
+Bool GlxSetClientScreenVendor(ClientPtr client, ScreenPtr screen, GlxServerVendor *vendor)
e8725b8
+{
e8725b8
+    GlxClientPriv *cl;
e8725b8
+
e8725b8
+    if (screen == NULL || screen->isGPU) {
e8725b8
+        return FALSE;
e8725b8
+    }
e8725b8
+
e8725b8
+    cl = GlxGetClientData(client);
e8725b8
+    if (cl == NULL) {
e8725b8
+        return FALSE;
e8725b8
+    }
e8725b8
+
e8725b8
+    if (vendor != NULL) {
e8725b8
+        cl->vendors[screen->myNum] = vendor;
e8725b8
+    } else {
e8725b8
+        cl->vendors[screen->myNum] = GlxGetVendorForScreen(NULL, screen);
e8725b8
+    }
e8725b8
+    return TRUE;
e8725b8
+}
e8725b8
+
e8725b8
 GlxServerVendor *GlxGetVendorForScreen(ClientPtr client, ScreenPtr screen)
e8725b8
 {
e8725b8
     // Note that the client won't be sending GPU screen numbers, so we don't
e8725b8
diff --git a/include/glxvndabi.h b/include/glxvndabi.h
e8725b8
index b78306d235aa88843cf2b38e049371c2195e7555..71f36e7222ced5f0e6ebd6932bbb215242c6ba72 100644
e8725b8
--- a/include/glxvndabi.h
e8725b8
+++ b/include/glxvndabi.h
e8725b8
@@ -75,7 +75,7 @@
e8725b8
  * will still work.
e8725b8
  */
e8725b8
 #define GLXSERVER_VENDOR_ABI_MAJOR_VERSION 0
e8725b8
-#define GLXSERVER_VENDOR_ABI_MINOR_VERSION 0
e8725b8
+#define GLXSERVER_VENDOR_ABI_MINOR_VERSION 1
e8725b8
 
e8725b8
 #if defined(__cplusplus)
e8725b8
 extern "C" {
e8725b8
@@ -236,6 +236,17 @@ typedef struct GlxServerExportsRec {
e8725b8
      * \param client The client.
e8725b8
      */
e8725b8
     int (* forwardRequest) (GlxServerVendor *vendor, ClientPtr client);
e8725b8
+
e8725b8
+    /**
e8725b8
+     * Sets the vendor library to use for a screen for a specific client.
e8725b8
+     *
e8725b8
+     * This function changes which vendor should handle GLX requests for a
e8725b8
+     * screen. Unlike \c setScreenVendor, this function can be called at any
e8725b8
+     * time, and only applies to requests from a single client.
e8725b8
+     *
e8725b8
+     * This function is available in GLXVND version 0.1 or later.
e8725b8
+     */
e8725b8
+    Bool (* setClientScreenVendor) (ClientPtr client, ScreenPtr screen, GlxServerVendor *vendor);
e8725b8
 } GlxServerExports;
e8725b8
 
e8725b8
 extern _X_EXPORT const GlxServerExports glxServer;