summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2015-05-18 13:00:02 -0400
committerAdam Jackson <ajax@redhat.com>2016-03-10 15:55:55 -0500
commitd15cb654b6ba365dac9a62064e277adebde2fdab (patch)
treea57567c206752f98c5a56dea2d52c2c66ec56636 /glx
parenta18238877bbf9aab95843d849a6f434275e9cd6c (diff)
glx: Implement GLX_EXT_stereo_tree
This is correct as it is, but only because we know no DRI drivers implement stereo. v2: Use new ATTRIB macro Reviewed-by: James Jones <jajones@nvidia.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'glx')
-rw-r--r--glx/extension_string.c1
-rw-r--r--glx/extension_string.h1
-rw-r--r--glx/glxcmds.c10
3 files changed, 11 insertions, 1 deletions
diff --git a/glx/extension_string.c b/glx/extension_string.c
index cf9014609..c3ddc4c96 100644
--- a/glx/extension_string.c
+++ b/glx/extension_string.c
@@ -84,6 +84,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_texture_from_pixmap), VER(0,0), Y, },
{ GLX(EXT_visual_info), VER(0,0), Y, },
{ GLX(EXT_visual_rating), VER(0,0), Y, },
diff --git a/glx/extension_string.h b/glx/extension_string.h
index ffaab073a..c1df91b00 100644
--- a/glx/extension_string.h
+++ b/glx/extension_string.h
@@ -46,6 +46,7 @@ enum {
EXT_create_context_es_profile_bit,
EXT_create_context_es2_profile_bit,
EXT_import_context_bit,
+ EXT_stereo_tree_bit,
EXT_texture_from_pixmap_bit,
EXT_visual_info_bit,
EXT_visual_rating_bit,
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 139432e5e..561faebb4 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -1921,6 +1921,11 @@ __glXDisp_CopySubBufferMESA(__GLXclientState * cl, GLbyte * pc)
return Success;
}
+/* hack for old glxext.h */
+#ifndef GLX_STEREO_TREE_EXT
+#define GLX_STEREO_TREE_EXT 0x20F5
+#endif
+
/*
** Get drawable attributes
*/
@@ -1931,7 +1936,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,
@@ -1964,6 +1969,9 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
if (pGlxDraw->type == GLX_DRAWABLE_PBUFFER) {
ATTRIB(GLX_PRESERVED_CONTENTS, GL_TRUE);
}
+ if (pGlxDraw->type == GLX_DRAWABLE_WINDOW) {
+ ATTRIB(GLX_STEREO_TREE_EXT, 0);
+ }
}
#undef ATTRIB