summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-07-26 14:43:56 -0700
committerEric Anholt <[email protected]>2012-08-07 11:47:19 -0700
commit9c1b41879aab2ff7386c547a2ccce7686c018cf5 (patch)
tree934b03d503f257d3979d6ebe9ad36cee2953bb25 /src/mesa/drivers/dri/nouveau
parent3aaeb3e5e76b7b468e2eb2a26f30d68d19d3c854 (diff)
mesa: Replace VersionMajor/VersionMinor with a Version field.
As we get into supporting GL 3.x core, we come across more and more features of the API that depend on the version number as opposed to just the extension list. This will let us more sanely do version checks than "(VersionMajor == 3 && VersionMinor >= 2) || VersionMajor >= 4". v2: Fix a bad <= 30 check. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c
index d7d5a04e692..f79430890fb 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_context.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c
@@ -75,9 +75,7 @@ nouveau_context_create(gl_api api,
dri_ctx->driverPrivate = ctx;
_mesa_compute_version(ctx);
- if (ctx->VersionMajor < major_version
- || (ctx->VersionMajor == major_version
- && ctx->VersionMinor < minor_version)) {
+ if (ctx->Version < major_version * 10 + minor_version) {
nouveau_context_destroy(dri_ctx);
*error = __DRI_CTX_ERROR_BAD_VERSION;
return GL_FALSE;