From 78a8350e8dba123d2c7bb934c8517b778c66ca06 Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Sat, 22 Oct 2022 02:23:07 +0800 Subject: [PATCH] st: Turn st_api::query_versions to be direct accessed function st_api_query_versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yonggang Luo Reviewed-by: Jesse Natalie Reviewed-by: Marek Olšák Part-of: --- src/gallium/frontends/dri/dri_screen.c | 12 ++++++------ src/gallium/include/frontend/api.h | 23 ++++++++++++----------- src/mesa/state_tracker/st_manager.c | 5 ++--- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/gallium/frontends/dri/dri_screen.c b/src/gallium/frontends/dri/dri_screen.c index ba3b52ef9ec..d6292a74d01 100644 --- a/src/gallium/frontends/dri/dri_screen.c +++ b/src/gallium/frontends/dri/dri_screen.c @@ -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); } diff --git a/src/gallium/include/frontend/api.h b/src/gallium/include/frontend/api.h index 51aa04b498a..9a6748298c2 100644 --- a/src/gallium/include/frontend/api.h +++ b/src/gallium/include/frontend/api.h @@ -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. */ diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 106785a293f..4632fe450b9 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -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, };