summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-11-06 18:01:36 +0000
committerEmil Velikov <[email protected]>2017-11-16 14:17:07 +0000
commitf3ea07959b01815ba2c89f72fabf90e91cd09e45 (patch)
tree0d95bbd25f2f08e5966b16e7fc047190e0d9d6ec /src
parent310e4485cba33716899d56ac910054d906701a9c (diff)
mesa: return 'unrecognized' extensions in glGetStringi
Analogous to the glGetString() case - report all the extensions enabled via MESA_EXTENSION_OVERRIDE Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/extensions.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 376ea8d4f2a..38fc52d0205 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -421,6 +421,11 @@ _mesa_get_extension_count(struct gl_context *ctx)
if (_mesa_extension_supported(ctx, k))
ctx->Extensions.Count++;
}
+
+ for (k = 0; k < MAX_UNRECOGNIZED_EXTENSIONS; ++k) {
+ if (ctx->Extensions.unrecognized_extensions[k])
+ ctx->Extensions.Count++;
+ }
return ctx->Extensions.Count;
}
@@ -442,5 +447,13 @@ _mesa_get_enabled_extension(struct gl_context *ctx, GLuint index)
}
}
+ for (i = 0; i < MAX_UNRECOGNIZED_EXTENSIONS; ++i) {
+ if (ctx->Extensions.unrecognized_extensions[i]) {
+ if (n == index)
+ return (const GLubyte*) ctx->Extensions.unrecognized_extensions[i];
+ else
+ ++n;
+ }
+ }
return NULL;
}