projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28c790a
)
dri: Use the right type for the API token
author
nobled
<nobled@dreamwidth.org>
Tue, 7 Sep 2010 16:20:15 +0000
(12:20 -0400)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 7 Sep 2010 16:26:33 +0000
(12:26 -0400)
Pass mesa_api to CreateContext, and abort early
if the requested API isn't recognized.
src/mesa/drivers/dri/common/dri_util.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/common/dri_util.c
b/src/mesa/drivers/dri/common/dri_util.c
index a581c6663f2f1d43e41fa4ed0107dd6e9483bc99..5f07986773968a22c9e0019a32953e9bddbf12c9 100644
(file)
--- 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;