aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/extensions.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-09-14 11:11:28 +0200
committermarha <marha@users.sourceforge.net>2012-09-14 11:11:28 +0200
commitc0212d660fe99ea5e4a1b897670f7f7c111553c7 (patch)
tree12c04842a73bb885640f1e23ef9a3ca654d09c5a /mesalib/src/mesa/main/extensions.c
parentf61137c5cf42ded5eeb85eaf007ae11f0811e022 (diff)
parentb08ba56019b146786e1cde553c036dd0c4fd02e5 (diff)
downloadvcxsrv-c0212d660fe99ea5e4a1b897670f7f7c111553c7.tar.gz
vcxsrv-c0212d660fe99ea5e4a1b897670f7f7c111553c7.tar.bz2
vcxsrv-c0212d660fe99ea5e4a1b897670f7f7c111553c7.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/extensions.c')
-rw-r--r--mesalib/src/mesa/main/extensions.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index 36e1fcf62..e6f4541f0 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -927,7 +927,7 @@ _mesa_get_extension_count(struct gl_context *ctx)
base = (GLboolean *) &ctx->Extensions;
for (i = extension_table; i->name != 0; ++i) {
- if (base[i->offset]) {
+ if (base[i->offset] && (i->api_set & (1 << ctx->API))) {
ctx->Extensions.Count++;
}
}
@@ -947,10 +947,11 @@ _mesa_get_enabled_extension(struct gl_context *ctx, GLuint index)
base = (GLboolean*) &ctx->Extensions;
n = 0;
for (i = extension_table; i->name != 0; ++i) {
- if (n == index && base[i->offset]) {
- return (const GLubyte*) i->name;
- } else if (base[i->offset]) {
- ++n;
+ if (base[i->offset] & (i->api_set & (1 << ctx->API))) {
+ if (n == index)
+ return (const GLubyte*) i->name;
+ else
+ ++n;
}
}