diff options
author | marha <marha@users.sourceforge.net> | 2012-08-13 10:11:17 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-08-13 10:11:17 +0200 |
commit | f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1 (patch) | |
tree | 921a5a742930124e7bd7e9a7e73f6029bd74338d /mesalib/src/mesa/main/get.c | |
parent | ec4051f308e8e84146e0ecc39b6d228e500e9636 (diff) | |
parent | 9ddf44af81782451cee798e06749ce3067a14a41 (diff) | |
download | vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.gz vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.bz2 vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/get.c')
-rw-r--r-- | mesalib/src/mesa/main/get.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index 16ad2c430..332dfaf7f 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -1303,8 +1303,8 @@ static const struct value_desc values[] = { /* GL 3.0 */ { GL_NUM_EXTENSIONS, LOC_CUSTOM, TYPE_INT, 0, extra_version_30 }, - { GL_MAJOR_VERSION, CONTEXT_INT(VersionMajor), extra_version_30 }, - { GL_MINOR_VERSION, CONTEXT_INT(VersionMinor), extra_version_30 }, + { GL_MAJOR_VERSION, LOC_CUSTOM, TYPE_INT, 0, extra_version_30 }, + { GL_MINOR_VERSION, LOC_CUSTOM, TYPE_INT, 0, extra_version_30 }, { GL_CONTEXT_FLAGS, CONTEXT_INT(Const.ContextFlags), extra_version_30 }, /* GL3.0 / GL_EXT_framebuffer_sRGB */ @@ -1486,6 +1486,13 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu GLuint unit, *p; switch (d->pname) { + case GL_MAJOR_VERSION: + v->value_int = ctx->Version / 10; + break; + case GL_MINOR_VERSION: + v->value_int = ctx->Version % 10; + break; + case GL_TEXTURE_1D: case GL_TEXTURE_2D: case GL_TEXTURE_3D: @@ -1848,7 +1855,7 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu static GLboolean check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d) { - const GLuint version = ctx->VersionMajor * 10 + ctx->VersionMinor; + const GLuint version = ctx->Version; int total, enabled; const int *e; |