Mesa (9.0): mesa: fix dropped && in glGetStringi()

Ian Romanick idr at kemper.freedesktop.org
Fri Sep 28 18:06:53 UTC 2012


Module: Mesa
Branch: 9.0
Commit: 8d06574d2b80ea645b27a0b1c2b68054a80dad3f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8d06574d2b80ea645b27a0b1c2b68054a80dad3f

Author: Chris Forbes <chrisf at ijw.co.nz>
Date:   Sun Sep 16 19:54:11 2012 +1200

mesa: fix dropped && in glGetStringi()

This fixes glGetStringi(GL_EXTENSIONS,.. for core contexts. Previously,
all extension names returned would be NULL.

NOTE: This is a candidate for release branches.

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
(cherry picked from commit d30a7d2eb4b6d853bfa90169341334f2b2a643d5)

---

 src/mesa/main/extensions.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 3d52eb8..ca639f6 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -947,7 +947,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




More information about the mesa-commit mailing list