*/
void (*destroy)(struct st_api *stapi);
+ /**
+ * Query supported OpenGL versions. (if applicable)
+ * The format is (major*10+minor).
+ */
+ void (*query_versions)(struct st_api *stapi, struct st_manager *sm,
+ int *gl_core_version,
+ int *gl_compat_version,
+ int *gl_es1_version,
+ int *gl_es2_version);
+
/**
* Return an API entry point.
*
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);
}
{
}
+static void
+vg_api_query_versions(struct st_api *stapi, struct st_manager *sm,
+ int *gl_core_version,
+ int *gl_compat_version,
+ int *gl_es1_version,
+ int *gl_es2_version)
+{
+}
+
static const struct st_api vg_api = {
"Vega " PACKAGE_VERSION,
ST_API_OPENVG,
ST_PROFILE_DEFAULT_MASK,
0,
vg_api_destroy,
+ vg_api_query_versions,
vg_api_get_proc_address,
vg_api_create_context,
vg_api_make_current,
return TRUE;
}
+static void
+st_api_query_versions(struct st_api *stapi, struct st_manager *sm,
+ int *gl_core_version,
+ int *gl_compat_version,
+ int *gl_es1_version,
+ int *gl_es2_version)
+{
+ *gl_core_version = 33;
+ *gl_compat_version = 30;
+ *gl_es1_version = 11;
+ *gl_es2_version = 30;
+}
+
static const struct st_api st_gl_api = {
"Mesa " PACKAGE_VERSION,
ST_API_OPENGL,
0,
ST_API_FEATURE_MS_VISUALS_MASK,
st_api_destroy,
+ st_api_query_versions,
st_api_get_proc_address,
st_api_create_context,
st_api_make_current,