st: Turn st_api::query_versions to be direct accessed function st_api_query_versions

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19197>
This commit is contained in:
Yonggang Luo
2022-10-22 02:23:07 +08:00
committed by Marge Bot
parent 7bd5ff3122
commit 78a8350e8d
3 changed files with 20 additions and 20 deletions

View File

@@ -848,12 +848,12 @@ dri_init_screen_helper(struct dri_screen *screen,
dri_postprocessing_init(screen);
screen->st_api->query_versions(screen->st_api, &screen->base,
&screen->options,
&screen->sPriv->max_gl_core_version,
&screen->sPriv->max_gl_compat_version,
&screen->sPriv->max_gl_es1_version,
&screen->sPriv->max_gl_es2_version);
st_api_query_versions(&screen->base,
&screen->options,
&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);
}

View File

@@ -511,19 +511,20 @@ struct st_api
* The name of the rendering API. This is informative.
*/
const char *name;
/**
* Query supported OpenGL versions. (if applicable)
* The format is (major*10+minor).
*/
void (*query_versions)(struct st_api *stapi, struct st_manager *sm,
struct st_config_options *options,
int *gl_core_version,
int *gl_compat_version,
int *gl_es1_version,
int *gl_es2_version);
};
/**
* Query supported OpenGL versions. (if applicable)
* The format is (major*10+minor).
*/
void
st_api_query_versions(struct st_manager *sm,
struct st_config_options *options,
int *gl_core_version,
int *gl_compat_version,
int *gl_es1_version,
int *gl_es2_version);
/**
* Create a rendering context.
*/

View File

@@ -1434,8 +1434,8 @@ get_version(struct pipe_screen *screen,
}
static void
st_api_query_versions(struct st_api *stapi, struct st_manager *sm,
void
st_api_query_versions(struct st_manager *sm,
struct st_config_options *options,
int *gl_core_version,
int *gl_compat_version,
@@ -1451,7 +1451,6 @@ st_api_query_versions(struct st_api *stapi, struct st_manager *sm,
static const struct st_api st_gl_api = {
.name = "Mesa " PACKAGE_VERSION,
.query_versions = st_api_query_versions,
};