summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r--src/gallium/state_trackers/dri/common/dri_context.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index f9ebe1edcc..8948cfc2cc 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -57,17 +57,21 @@ dri_create_context(gl_api api, const __GLcontextModes * visual,
struct st_api *stapi;
struct dri_context *ctx = NULL;
struct st_context_iface *st_share = NULL;
- struct st_visual stvis;
+ struct st_context_attribs attribs;
+ memset(&attribs, 0, sizeof(attribs));
switch (api) {
case API_OPENGL:
stapi = screen->st_api[ST_API_OPENGL];
+ attribs.profile = ST_PROFILE_DEFAULT;
break;
case API_OPENGLES:
stapi = screen->st_api[ST_API_OPENGL_ES1];
+ attribs.profile = ST_PROFILE_OPENGL_ES1;
break;
case API_OPENGLES2:
stapi = screen->st_api[ST_API_OPENGL_ES2];
+ attribs.profile = ST_PROFILE_OPENGL_ES2;
break;
default:
stapi = NULL;
@@ -92,8 +96,8 @@ dri_create_context(gl_api api, const __GLcontextModes * visual,
driParseConfigFiles(&ctx->optionCache,
&screen->optionCache, sPriv->myNum, "dri");
- dri_fill_st_visual(&stvis, screen, visual);
- ctx->st = stapi->create_context(stapi, &screen->base, &stvis, st_share);
+ dri_fill_st_visual(&attribs.visual, screen, visual);
+ ctx->st = stapi->create_context(stapi, &screen->base, &attribs, st_share);
if (ctx->st == NULL)
goto fail;
ctx->st->st_manager_private = (void *) ctx;