summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorFrank Binns <frank.binns@imgtec.com>2015-07-31 09:11:47 +0100
committerEric Anholt <eric@anholt.net>2015-08-04 20:03:16 -0700
commit7d88413ade2c41054f79b20338253aacf1ac341d (patch)
tree1c4919bfd540d731dc1d5e072fb405a058620875 /src/mesa/drivers/dri/common
parentb2c5986ea1c8e66c4e0a05bcacbcf28c27f5b183 (diff)
downloadexternal_mesa3d-7d88413ade2c41054f79b20338253aacf1ac341d.zip
external_mesa3d-7d88413ade2c41054f79b20338253aacf1ac341d.tar.gz
external_mesa3d-7d88413ade2c41054f79b20338253aacf1ac341d.tar.bz2
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 <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c4
1 files changed, 3 insertions, 1 deletions
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)