[PATCH 2/2] dri2: Default to __DRI_API_OPENGL for indirect contexts
Adam Jackson
ajax at redhat.com
Wed Oct 17 11:58:34 PDT 2012
Prior to the previous fix, when doing LIBGL_ALWAYS_INDIRECT=1, glxinfo
and basically everything else would throw BadAlloc from CreateContext.
After that fix we now get GLXBadProfileARB. That happens to crash
libX11's error lookup (for some stupid reasons, patches sent), but it at
least points out where the bug lies.
Since indirect GLX doesn't support core or GLES profiles at all, and may
not have asked for any attributes at all, just default to basic OpenGL.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
glx/glxdri2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/glx/glxdri2.c b/glx/glxdri2.c
index bce1bfa..b26e501 100644
--- a/glx/glxdri2.c
+++ b/glx/glxdri2.c
@@ -514,7 +514,7 @@ create_driver_context(__GLXDRIcontext * context,
unsigned minor_ver;
uint32_t flags;
int reset;
- int api;
+ int api = __DRI_API_OPENGL;
if (num_attribs != 0) {
if (!dri2_convert_glx_attribs(screen, num_attribs, attribs,
--
1.7.12.1
More information about the xorg-devel
mailing list