summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-05-26 12:14:39 -0700
committerIan Romanick <[email protected]>2015-05-28 16:56:31 -0700
commit464c56d3d5ca2c9d6e437e756950f0fa2996d8da (patch)
tree4380332d778747872dd6f3c05edec33f4abe54ab /src/mesa/drivers/dri
parent1fe243938b11be740417cf016d8c50cd69228628 (diff)
dri_util: Use _mesa_override_gl_version_contextless
Remove _mesa_get_gl_version_override. We don't need two functions that do basically the same thing. This change seemed easier (esp. with the next patch) than going the other way. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index d6e875fcfeb..f0e5440c225 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -162,13 +162,17 @@ driCreateNewScreen2(int scrn, int fd,
return NULL;
}
- int gl_version_override = _mesa_get_gl_version_override();
- if (gl_version_override >= 31) {
- psp->max_gl_core_version = MAX2(psp->max_gl_core_version,
- gl_version_override);
- } else {
- psp->max_gl_compat_version = MAX2(psp->max_gl_compat_version,
- gl_version_override);
+ struct gl_constants consts = { 0 };
+ gl_api api;
+ int version;
+
+ api = API_OPENGL_COMPAT;
+ if (_mesa_override_gl_version_contextless(&consts, &api, &version)) {
+ if (api == API_OPENGL_CORE) {
+ psp->max_gl_core_version = version;
+ } else {
+ psp->max_gl_compat_version = version;
+ }
}
psp->api_mask = (1 << __DRI_API_OPENGL);