[Mesa-dev] [PATCH 3/3] dri: set the __DRI_API_OPENGL bit based on max gl compat version

Frank Binns frank.binns at imgtec.com
Fri Jul 31 01:11:47 PDT 2015


This matches similar behaviour for the __DRI_API_OPENGL_CORE bit.

Signed-off-by: Frank Binns <frank.binns at imgtec.com>
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/mesa/drivers/dri/common/dri_util.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 884a7e0..d35ac26 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -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)
-- 
1.8.5.4.gfdaaaa2



More information about the mesa-dev mailing list