summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2014-08-03 02:54:52 +0200
committerMarek Olšák <[email protected]>2014-08-11 21:53:57 +0200
commitc6cbde5008e27cccb06411146bc673835991ae91 (patch)
treeab62bd9fbe95d9398e8300a06deaa65ba6128086 /src/gallium/state_trackers/dri
parent0127d26e6c25974a84102fba2f556e260ccbcaeb (diff)
gallium/stapi: move setting GL versions to the state tracker
All flags are set for st/mesa, so the state tracker doesn't have to check them. Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri')
-rw-r--r--src/gallium/state_trackers/dri/dri_screen.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index b639f9ffd8b..697ebee0fb1 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -455,18 +455,11 @@ dri_init_screen_helper(struct dri_screen *screen,
dri_postprocessing_init(screen);
- /* gallium drivers don't declare what version of GL they support, so we
- * check the computed Mesa context version after context creation and fail
- * out then.
- */
- if (screen->st_api->profile_mask & ST_PROFILE_DEFAULT_MASK)
- screen->sPriv->max_gl_compat_version = 30;
- if (screen->st_api->profile_mask & ST_PROFILE_OPENGL_CORE_MASK)
- screen->sPriv->max_gl_core_version = 33;
- if (screen->st_api->profile_mask & ST_PROFILE_OPENGL_ES1_MASK)
- screen->sPriv->max_gl_es1_version = 11;
- if (screen->st_api->profile_mask & ST_PROFILE_OPENGL_ES2_MASK)
- screen->sPriv->max_gl_es2_version = 30;
+ screen->st_api->query_versions(screen->st_api, &screen->base,
+ &screen->sPriv->max_gl_core_version,
+ &screen->sPriv->max_gl_compat_version,
+ &screen->sPriv->max_gl_es1_version,
+ &screen->sPriv->max_gl_es2_version);
return dri_fill_in_modes(screen);
}