Mesa (master): st/dri: Make clear which API's are supported

Chia-I Wu olv at kemper.freedesktop.org
Wed Sep 8 10:22:19 UTC 2010


Module: Mesa
Branch: master
Commit: ecd7ec9d62d2ba919410218f4cf3f69772681f3c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ecd7ec9d62d2ba919410218f4cf3f69772681f3c

Author: nobled <nobled at dreamwidth.org>
Date:   Tue Sep  7 12:10:45 2010 -0400

st/dri: Make clear which API's are supported

If the caller requests a GLES context, don't silently create
a desktop GL context in its place.

---

 .../state_trackers/dri/common/dri_context.c        |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index 203682e..931cffa 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -59,6 +59,9 @@ dri_create_context(gl_api api, const __GLcontextModes * visual,
    struct st_context_iface *st_share = NULL;
    struct st_visual stvis;
 
+   if (api != API_OPENGL)
+      return GL_FALSE;
+
    if (sharedContextPrivate) {
       st_share = ((struct dri_context *)sharedContextPrivate)->st;
    }
@@ -90,7 +93,7 @@ dri_create_context(gl_api api, const __GLcontextModes * visual,
       ctx->st->destroy(ctx->st);
 
    FREE(ctx);
-   return FALSE;
+   return GL_FALSE;
 }
 
 void




More information about the mesa-commit mailing list