Mesa (master): dri: Use the right type for the API token
Kristian Høgsberg
krh at kemper.freedesktop.org
Tue Sep 7 16:27:53 UTC 2010
Module: Mesa
Branch: master
Commit: 1b8c9fef1128cfeee5e5ba75ba7d645522cc76c2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b8c9fef1128cfeee5e5ba75ba7d645522cc76c2
Author: nobled <nobled at dreamwidth.org>
Date: Tue Sep 7 12:20:15 2010 -0400
dri: Use the right type for the API token
Pass mesa_api to CreateContext, and abort early
if the requested API isn't recognized.
---
src/mesa/drivers/dri/common/dri_util.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index a581c66..5f07986 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -651,6 +651,8 @@ dri2CreateNewContextForAPI(__DRIscreen *screen, int api,
case __DRI_API_GLES2:
mesa_api = API_OPENGLES2;
break;
+ default:
+ return NULL;
}
context = malloc(sizeof *context);
@@ -661,7 +663,7 @@ dri2CreateNewContextForAPI(__DRIscreen *screen, int api,
context->driDrawablePriv = NULL;
context->loaderPrivate = data;
- if (!(*screen->DriverAPI.CreateContext)(api, &config->modes,
+ if (!(*screen->DriverAPI.CreateContext)(mesa_api, &config->modes,
context, shareCtx) ) {
free(context);
return NULL;
More information about the mesa-commit
mailing list