[Mesa-dev] [PATCH 2/8] mesa: print Compatibility Profile in the version string
Marek Olšák
maraeo at gmail.com
Wed May 23 20:58:53 UTC 2018
From: Marek Olšák <marek.olsak at amd.com>
---
src/mesa/main/version.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
index 3f3dff0bde3..1bdccf4a1df 100644
--- a/src/mesa/main/version.c
+++ b/src/mesa/main/version.c
@@ -121,21 +121,23 @@ create_version_string(struct gl_context *ctx, const char *prefix)
ctx->VersionString = malloc(max);
if (ctx->VersionString) {
_mesa_snprintf(ctx->VersionString, max,
"%s%u.%u%s Mesa " PACKAGE_VERSION
#ifdef MESA_GIT_SHA1
" (" MESA_GIT_SHA1 ")"
#endif
,
prefix,
ctx->Version / 10, ctx->Version % 10,
- (ctx->API == API_OPENGL_CORE) ? " (Core Profile)" : ""
+ (ctx->API == API_OPENGL_CORE) ? " (Core Profile)" :
+ (ctx->API == API_OPENGL_COMPAT && ctx->Version >= 32) ?
+ " (Compatibility Profile)" : ""
);
}
}
/**
* Override the context's version and/or API type if the environment variables
* MESA_GL_VERSION_OVERRIDE or MESA_GLES_VERSION_OVERRIDE are set.
*
* Example uses of MESA_GL_VERSION_OVERRIDE:
*
--
2.17.0
More information about the mesa-dev
mailing list