[PATCH 4/5] glx: Implement GLX_EXT_stereo_tree

Adam Jackson ajax at redhat.com
Tue Jun 2 10:41:07 PDT 2015


This is correct as it is, but only because we know no DRI drivers
implement stereo.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 glx/extension_string.c | 1 +
 glx/extension_string.h | 1 +
 glx/glxcmds.c          | 8 +++++++-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/glx/extension_string.c b/glx/extension_string.c
index d2c942b..b0f53cf 100644
--- a/glx/extension_string.c
+++ b/glx/extension_string.c
@@ -83,6 +83,7 @@ static const struct extension_info known_glx_extensions[] = {
     { GLX(EXT_create_context_es2_profile), VER(0,0), N, },
     { GLX(EXT_framebuffer_sRGB),        VER(0,0), N, },
     { GLX(EXT_import_context),          VER(0,0), Y, },
+    { GLX(EXT_stereo_tree),             VER(0,0), N, },
     { GLX(EXT_swap_control),            VER(0,0), N, },
     { GLX(EXT_texture_from_pixmap),     VER(0,0), Y, },
     { GLX(EXT_visual_info),             VER(0,0), Y, },
diff --git a/glx/extension_string.h b/glx/extension_string.h
index 99eb2f7..ce10918 100644
--- a/glx/extension_string.h
+++ b/glx/extension_string.h
@@ -45,6 +45,7 @@ enum {
     ARB_multisample_bit,
     EXT_create_context_es2_profile_bit,
     EXT_import_context_bit,
+    EXT_stereo_tree_bit,
     EXT_swap_control_bit,
     EXT_texture_from_pixmap_bit,
     EXT_visual_info_bit,
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 8139149..3a2b073 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -1934,6 +1934,9 @@ __glXDisp_CopySubBufferMESA(__GLXclientState * cl, GLbyte * pc)
 #ifndef GLX_MAX_SWAP_INTERVAL_EXT
 #define GLX_MAX_SWAP_INTERVAL_EXT           0x20F2
 #endif
+#ifndef GLX_STEREO_TREE_EXT
+#define GLX_STEREO_TREE_EXT                 0x20F5
+#endif
 
 /*
 ** Get drawable attributes
@@ -1945,7 +1948,7 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
     xGLXGetDrawableAttributesReply reply;
     __GLXdrawable *pGlxDraw = NULL;
     DrawablePtr pDraw;
-    CARD32 attributes[16];
+    CARD32 attributes[18];
     int num = 0, error;
 
     if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY,
@@ -1992,6 +1995,9 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
             attributes[2*num] = GLX_MAX_SWAP_INTERVAL_EXT;
             attributes[2*num+1] = pGlxDraw->config->maxSwapInterval;
             num++;
+            attributes[2*num] = GLX_STEREO_TREE_EXT;
+            attributes[2*num+1] = 0;
+            num++;
         }
     }
 
-- 
2.4.1



More information about the xorg-devel mailing list