From: Frank Binns Date: Fri, 31 Jul 2015 08:11:47 +0000 (+0100) Subject: dri: set the __DRI_API_OPENGL bit based on max gl compat version X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d88413ade2c41054f79b20338253aacf1ac341d;p=mesa.git dri: set the __DRI_API_OPENGL bit based on max gl compat version This matches similar behaviour for the __DRI_API_OPENGL_CORE bit. Signed-off-by: Frank Binns Reviewed-by: Emil Velikov Reviewed-by: Eric Anholt --- diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 884a7e0f650..d35ac263a45 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)