dri: set the __DRI_API_OPENGL bit based on max gl compat version
authorFrank Binns <frank.binns@imgtec.com>
Fri, 31 Jul 2015 08:11:47 +0000 (09:11 +0100)
committerEric Anholt <eric@anholt.net>
Wed, 5 Aug 2015 03:03:16 +0000 (20:03 -0700)
This matches similar behaviour for the __DRI_API_OPENGL_CORE bit.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/common/dri_util.c

index 884a7e0..d35ac26 100644 (file)
@@ -163,7 +163,9 @@ driCreateNewScreen2(int scrn, int fd,
        }
     }
 
-    psp->api_mask = (1 << __DRI_API_OPENGL);
+    psp->api_mask = 0;
+    if (psp->max_gl_compat_version > 0)
+       psp->api_mask |= (1 << __DRI_API_OPENGL);
     if (psp->max_gl_core_version > 0)
        psp->api_mask |= (1 << __DRI_API_OPENGL_CORE);
     if (psp->max_gl_es1_version > 0)