[Mesa-dev] [PATCH] glGetStringi: fix dropped &&
Kenneth Graunke
kenneth at whitecape.org
Sun Sep 16 01:48:37 PDT 2012
On 09/16/2012 12:54 AM, Chris Forbes wrote:
> This fixes glGetStringi(GL_EXTENSIONS,.. for core contexts. Previously,
> all extension names returned would be NULL.
>
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
> src/mesa/main/extensions.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> index 6fe7ad1..bd7c7ba 100644
> --- a/src/mesa/main/extensions.c
> +++ b/src/mesa/main/extensions.c
> @@ -885,7 +885,7 @@ _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 (base[i->offset] & (i->api_set & (1 << ctx->API))) {
> + if (base[i->offset] && (i->api_set & (1 << ctx->API))) {
> if (n == index)
> return (const GLubyte*) i->name;
> else
Youch. Yeah, that's a regression.
Pushed, thanks!
More information about the mesa-dev
mailing list