From f3ea07959b01815ba2c89f72fabf90e91cd09e45 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 6 Nov 2017 18:01:36 +0000 Subject: [PATCH] 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 Reviewed-by: Brian Paul --- src/mesa/main/extensions.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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; } -- 2.30.2