summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_screen.c4
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_context.c4
-rw-r--r--src/mesa/drivers/dri/r200/r200_context.c4
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c4
4 files changed, 4 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 088fd61effe..3c595bc6e75 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -724,9 +724,7 @@ intelCreateContext(gl_api api,
(struct gl_context *) driContextPriv->driverPrivate;
_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) {
return true;
}
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;
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c
index 244973e8475..17e08a10fc5 100644
--- a/src/mesa/drivers/dri/r200/r200_context.c
+++ b/src/mesa/drivers/dri/r200/r200_context.c
@@ -454,9 +454,7 @@ GLboolean r200CreateContext( gl_api api,
}
_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) {
r200DestroyContext(driContextPriv);
*error = __DRI_CTX_ERROR_BAD_VERSION;
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 9881d002fad..34c392ef8b7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -402,9 +402,7 @@ r100CreateContext( gl_api api,
}
_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) {
radeonDestroyContext(driContextPriv);
*error = __DRI_CTX_ERROR_BAD_VERSION;
return GL_FALSE;