st: Remove st_api::destroy

It's a global variable and have no need destroy

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-20 22:10:47 +08:00
committed by Marge Bot
parent 23388be282
commit 3f15ba7d68
6 changed files with 0 additions and 24 deletions

View File

@@ -774,9 +774,6 @@ dri_destroy_screen_helper(struct dri_screen * screen)
if (screen->base.destroy)
screen->base.destroy(&screen->base);
if (screen->st_api && screen->st_api->destroy)
screen->st_api->destroy(screen->st_api);
if (screen->base.screen)
screen->base.screen->destroy(screen->base.screen);

View File

@@ -359,7 +359,5 @@ hgl_destroy_display(struct hgl_display *display)
if (display->manager->destroy)
display->manager->destroy(display->manager);
FREE(display->manager);
if (display->api->destroy)
display->api->destroy(display->api);
FREE(display);
}

View File

@@ -142,10 +142,6 @@ destroy_st_manager(void)
stmgr->screen->destroy(stmgr->screen);
FREE(stmgr);
}
if (stapi && stapi->destroy) {
stapi->destroy(stapi);
}
}
static void

View File

@@ -169,8 +169,6 @@ stw_init(const struct stw_winsys *stw_winsys)
error1:
FREE(stw_dev->smapi);
if (stw_dev->stapi)
stw_dev->stapi->destroy(stw_dev->stapi);
stw_dev = NULL;
return FALSE;
@@ -256,7 +254,6 @@ stw_cleanup(void)
stw_dev->smapi->destroy(stw_dev->smapi);
FREE(stw_dev->smapi);
stw_dev->stapi->destroy(stw_dev->stapi);
stw_dev->screen->destroy(stw_dev->screen);

View File

@@ -512,11 +512,6 @@ struct st_api
*/
const char *name;
/**
* Destroy the API.
*/
void (*destroy)(struct st_api *stapi);
/**
* Query supported OpenGL versions. (if applicable)
* The format is (major*10+minor).

View File

@@ -1281,12 +1281,6 @@ st_api_make_current(struct st_api *stapi, struct st_context_iface *stctxi,
}
static void
st_api_destroy(struct st_api *stapi)
{
}
/**
* Flush the front buffer if the current context renders to the front buffer.
*/
@@ -1458,7 +1452,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,
.destroy = st_api_destroy,
.query_versions = st_api_query_versions,
.create_context = st_api_create_context,
.make_current = st_api_make_current,