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>
This commit is contained in:
parent
a18238877b
commit
d15cb654b6
|
@ -84,6 +84,7 @@ static const struct extension_info known_glx_extensions[] = {
|
||||||
{ GLX(EXT_create_context_es2_profile), VER(0,0), N, },
|
{ GLX(EXT_create_context_es2_profile), VER(0,0), N, },
|
||||||
{ GLX(EXT_framebuffer_sRGB), VER(0,0), N, },
|
{ GLX(EXT_framebuffer_sRGB), VER(0,0), N, },
|
||||||
{ GLX(EXT_import_context), VER(0,0), Y, },
|
{ 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_texture_from_pixmap), VER(0,0), Y, },
|
||||||
{ GLX(EXT_visual_info), VER(0,0), Y, },
|
{ GLX(EXT_visual_info), VER(0,0), Y, },
|
||||||
{ GLX(EXT_visual_rating), VER(0,0), Y, },
|
{ GLX(EXT_visual_rating), VER(0,0), Y, },
|
||||||
|
|
|
@ -46,6 +46,7 @@ enum {
|
||||||
EXT_create_context_es_profile_bit,
|
EXT_create_context_es_profile_bit,
|
||||||
EXT_create_context_es2_profile_bit,
|
EXT_create_context_es2_profile_bit,
|
||||||
EXT_import_context_bit,
|
EXT_import_context_bit,
|
||||||
|
EXT_stereo_tree_bit,
|
||||||
EXT_texture_from_pixmap_bit,
|
EXT_texture_from_pixmap_bit,
|
||||||
EXT_visual_info_bit,
|
EXT_visual_info_bit,
|
||||||
EXT_visual_rating_bit,
|
EXT_visual_rating_bit,
|
||||||
|
|
|
@ -1921,6 +1921,11 @@ __glXDisp_CopySubBufferMESA(__GLXclientState * cl, GLbyte * pc)
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* hack for old glxext.h */
|
||||||
|
#ifndef GLX_STEREO_TREE_EXT
|
||||||
|
#define GLX_STEREO_TREE_EXT 0x20F5
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Get drawable attributes
|
** Get drawable attributes
|
||||||
*/
|
*/
|
||||||
|
@ -1931,7 +1936,7 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
|
||||||
xGLXGetDrawableAttributesReply reply;
|
xGLXGetDrawableAttributesReply reply;
|
||||||
__GLXdrawable *pGlxDraw = NULL;
|
__GLXdrawable *pGlxDraw = NULL;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
CARD32 attributes[16];
|
CARD32 attributes[18];
|
||||||
int num = 0, error;
|
int num = 0, error;
|
||||||
|
|
||||||
if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY,
|
if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY,
|
||||||
|
@ -1964,6 +1969,9 @@ DoGetDrawableAttributes(__GLXclientState * cl, XID drawId)
|
||||||
if (pGlxDraw->type == GLX_DRAWABLE_PBUFFER) {
|
if (pGlxDraw->type == GLX_DRAWABLE_PBUFFER) {
|
||||||
ATTRIB(GLX_PRESERVED_CONTENTS, GL_TRUE);
|
ATTRIB(GLX_PRESERVED_CONTENTS, GL_TRUE);
|
||||||
}
|
}
|
||||||
|
if (pGlxDraw->type == GLX_DRAWABLE_WINDOW) {
|
||||||
|
ATTRIB(GLX_STEREO_TREE_EXT, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#undef ATTRIB
|
#undef ATTRIB
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user