diff --git a/src/gallium/frontends/dri/dri_context.c b/src/gallium/frontends/dri/dri_context.c index 1e6120eeee3..5098e8d25ca 100644 --- a/src/gallium/frontends/dri/dri_context.c +++ b/src/gallium/frontends/dri/dri_context.c @@ -50,7 +50,6 @@ dri_create_context(gl_api api, const struct gl_config * visual, { __DRIscreen *sPriv = cPriv->driScreenPriv; struct dri_screen *screen = dri_screen(sPriv); - struct st_api *stapi = screen->st_api; struct dri_context *ctx = NULL; struct st_context_iface *st_share = NULL; struct st_context_attribs attribs; @@ -195,7 +194,6 @@ dri_create_context(gl_api api, const struct gl_config * visual, goto fail; } ctx->st->st_manager_private = (void *) ctx; - ctx->stapi = stapi; if (ctx->st->cso_context) { ctx->pp = pp_init(ctx->st->pipe, screen->pp_enabled, ctx->st->cso_context, diff --git a/src/gallium/frontends/dri/dri_context.h b/src/gallium/frontends/dri/dri_context.h index 561be68927c..6eef04e707f 100644 --- a/src/gallium/frontends/dri/dri_context.h +++ b/src/gallium/frontends/dri/dri_context.h @@ -38,7 +38,6 @@ struct pipe_context; struct pipe_fence; -struct st_api; struct st_context_iface; struct dri_drawable; @@ -57,7 +56,6 @@ struct dri_context bool is_shared_buffer_bound; /* gallium */ - struct st_api *stapi; struct st_context_iface *st; struct pp_queue_t *pp; struct hud_context *hud; diff --git a/src/gallium/frontends/dri/dri_screen.c b/src/gallium/frontends/dri/dri_screen.c index d6292a74d01..2ac51f26346 100644 --- a/src/gallium/frontends/dri/dri_screen.c +++ b/src/gallium/frontends/dri/dri_screen.c @@ -37,7 +37,6 @@ #include "pipe/p_screen.h" #include "pipe/p_format.h" #include "pipe-loader/pipe_loader.h" -#include "state_tracker/st_gl_api.h" /* for st_gl_api_create */ #include "frontend/drm_driver.h" #include "util/u_debug.h" @@ -837,10 +836,6 @@ dri_init_screen_helper(struct dri_screen *screen, if (screen->validate_egl_image) screen->base.validate_egl_image = dri_validate_egl_image; - screen->st_api = st_gl_api_create(); - if (!screen->st_api) - return NULL; - if(pscreen->get_param(pscreen, PIPE_CAP_NPOT_TEXTURES)) screen->target = PIPE_TEXTURE_2D; else diff --git a/src/gallium/frontends/dri/dri_screen.h b/src/gallium/frontends/dri/dri_screen.h index 36b135fc114..efefc69ed93 100644 --- a/src/gallium/frontends/dri/dri_screen.h +++ b/src/gallium/frontends/dri/dri_screen.h @@ -51,7 +51,6 @@ struct dri_screen { /* st_api */ struct st_manager base; - struct st_api *st_api; /* dri */ __DRIscreen *sPriv; diff --git a/src/gallium/frontends/glx/xlib/xm_api.c b/src/gallium/frontends/glx/xlib/xm_api.c index 2795ba88bc8..2a4cbf4e4a2 100644 --- a/src/gallium/frontends/glx/xlib/xm_api.c +++ b/src/gallium/frontends/glx/xlib/xm_api.c @@ -82,7 +82,6 @@ * global. */ static struct xm_driver driver; -static struct st_api *stapi; /* Default strict invalidate to false. This means we will not call * XGetGeometry after every swapbuffers, which allows swapbuffers to @@ -109,7 +108,6 @@ boolean xmesa_strict_invalidate = FALSE; void xmesa_set_driver( const struct xm_driver *templ ) { driver = *templ; - stapi = driver.create_st_api(); xmesa_strict_invalidate = debug_get_bool_option("XMESA_STRICT_INVALIDATE", FALSE); diff --git a/src/gallium/frontends/glx/xlib/xm_public.h b/src/gallium/frontends/glx/xlib/xm_public.h index 05fa7848e10..df40c9ef1f4 100644 --- a/src/gallium/frontends/glx/xlib/xm_public.h +++ b/src/gallium/frontends/glx/xlib/xm_public.h @@ -32,13 +32,11 @@ #include struct pipe_screen; -struct st_api; /* This is the driver interface required by the glx/xlib frontends. */ struct xm_driver { struct pipe_screen *(*create_pipe_screen)( Display *display ); - struct st_api *(*create_st_api)( void ); }; extern void diff --git a/src/gallium/frontends/hgl/hgl.c b/src/gallium/frontends/hgl/hgl.c index c4455a7a961..992c174a5f5 100644 --- a/src/gallium/frontends/hgl/hgl.c +++ b/src/gallium/frontends/hgl/hgl.c @@ -16,7 +16,6 @@ #include "util/format/u_format.h" #include "util/u_memory.h" #include "util/u_inlines.h" -#include "state_tracker/st_gl_api.h" /* for st_gl_api_create */ #include "GLView.h" @@ -342,7 +341,6 @@ hgl_create_display(struct pipe_screen* screen) display = CALLOC_STRUCT(hgl_display); assert(display); - display->api = st_gl_api_create(); display->manager = CALLOC_STRUCT(st_manager); assert(display->manager); display->manager->screen = screen; diff --git a/src/gallium/frontends/hgl/hgl_context.h b/src/gallium/frontends/hgl/hgl_context.h index ca5d6bbcf8d..aa1a1dc1ad7 100644 --- a/src/gallium/frontends/hgl/hgl_context.h +++ b/src/gallium/frontends/hgl/hgl_context.h @@ -52,7 +52,6 @@ struct hgl_display { mtx_t mutex; - struct st_api* api; struct st_manager* manager; }; diff --git a/src/gallium/frontends/osmesa/osmesa.c b/src/gallium/frontends/osmesa/osmesa.c index e9b4499f5c9..2d4bdbb1d71 100644 --- a/src/gallium/frontends/osmesa/osmesa.c +++ b/src/gallium/frontends/osmesa/osmesa.c @@ -70,7 +70,6 @@ #include "postprocess/postprocess.h" #include "frontend/api.h" -#include "state_tracker/st_gl_api.h" @@ -132,7 +131,6 @@ osmesa_st_get_param(struct st_manager *smapi, enum st_manager_param param) } static struct st_manager *stmgr = NULL; -static struct st_api *stapi = NULL; static void destroy_st_manager(void) @@ -156,8 +154,6 @@ create_st_manager(void) stmgr->get_param = osmesa_st_get_param; stmgr->get_egl_image = NULL; } - - stapi = st_gl_api_create(); } /** diff --git a/src/gallium/frontends/wgl/stw_device.c b/src/gallium/frontends/wgl/stw_device.c index 467bd780fee..bd37d72b469 100644 --- a/src/gallium/frontends/wgl/stw_device.c +++ b/src/gallium/frontends/wgl/stw_device.c @@ -140,9 +140,8 @@ stw_init(const struct stw_winsys *stw_winsys) stw_dev->stw_winsys = stw_winsys; - stw_dev->stapi = stw_st_create_api(); stw_dev->smapi = CALLOC_STRUCT(st_manager); - if (!stw_dev->stapi || !stw_dev->smapi) + if (!stw_dev->smapi) goto error1; stw_dev->smapi->get_param = stw_get_param; diff --git a/src/gallium/frontends/wgl/stw_device.h b/src/gallium/frontends/wgl/stw_device.h index 27c3bd1a378..53e623b7db1 100644 --- a/src/gallium/frontends/wgl/stw_device.h +++ b/src/gallium/frontends/wgl/stw_device.h @@ -43,7 +43,6 @@ extern "C" { #endif struct pipe_screen; -struct st_api; struct st_manager; struct stw_framebuffer; @@ -58,7 +57,6 @@ struct stw_device /* Cache some PIPE_CAP_* */ unsigned max_2d_length; - struct st_api *stapi; struct st_manager *smapi; LUID AdapterLuid; diff --git a/src/gallium/frontends/wgl/stw_st.c b/src/gallium/frontends/wgl/stw_st.c index 7350e0ac6b7..90b22832fe3 100644 --- a/src/gallium/frontends/wgl/stw_st.c +++ b/src/gallium/frontends/wgl/stw_st.c @@ -28,7 +28,6 @@ #include "util/u_memory.h" #include "util/u_inlines.h" #include "util/u_atomic.h" -#include "state_tracker/st_gl_api.h" /* for st_gl_api_create */ #include "pipe/p_state.h" #include "stw_st.h" @@ -592,13 +591,3 @@ stw_get_framebuffer_resource(struct st_framebuffer_iface *stfb, struct stw_st_framebuffer *stwfb = stw_st_framebuffer(stfb); return stwfb->textures[att]; } - - -/** - * Create an st_api of the gallium frontend. - */ -struct st_api * -stw_st_create_api(void) -{ - return st_gl_api_create(); -} diff --git a/src/gallium/frontends/wgl/stw_st.h b/src/gallium/frontends/wgl/stw_st.h index 7a2b72ed8e2..295d88bcb2e 100644 --- a/src/gallium/frontends/wgl/stw_st.h +++ b/src/gallium/frontends/wgl/stw_st.h @@ -37,9 +37,6 @@ struct stw_framebuffer; bool stw_own_mutex(const CRITICAL_SECTION *cs); -struct st_api * -stw_st_create_api(void); - struct st_framebuffer_iface * stw_st_create_framebuffer(struct stw_framebuffer *fb, struct st_manager *smapi); diff --git a/src/gallium/include/frontend/api.h b/src/gallium/include/frontend/api.h index 9a6748298c2..ecfba0f36d0 100644 --- a/src/gallium/include/frontend/api.h +++ b/src/gallium/include/frontend/api.h @@ -501,17 +501,10 @@ struct st_manager }; /** - * Represent the OpenGL rendering API. + * The following st_api_* functions represent the OpenGL rendering API. * * Implemented by the gallium frontend and used by the frontend manager. */ -struct st_api -{ - /** - * The name of the rendering API. This is informative. - */ - const char *name; -}; /** * Query supported OpenGL versions. (if applicable) diff --git a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp index 538355d4e2c..db0ef9e221e 100644 --- a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp +++ b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp @@ -22,7 +22,6 @@ //#include "state_tracker/st_cb_fbo.h" //#include "state_tracker/st_cb_flush.h" #include "state_tracker/st_context.h" -#include "state_tracker/st_gl_api.h" #include "frontend/sw_winsys.h" #include "sw/hgl/hgl_sw_winsys.h" #include "util/u_atomic.h" diff --git a/src/gallium/targets/libgl-xlib/xlib.c b/src/gallium/targets/libgl-xlib/xlib.c index 2c5abdd7021..757419899ef 100644 --- a/src/gallium/targets/libgl-xlib/xlib.c +++ b/src/gallium/targets/libgl-xlib/xlib.c @@ -35,7 +35,6 @@ #include "sw/xlib/xlib_sw_winsys.h" #include "xm_public.h" -#include "state_tracker/st_gl_api.h" #include "target-helpers/inline_sw_helper.h" #include "target-helpers/inline_debug_helper.h" @@ -78,7 +77,6 @@ fail: static struct xm_driver xlib_driver = { .create_pipe_screen = swrast_xlib_create_screen, - .create_st_api = st_gl_api_create, }; diff --git a/src/mesa/meson.build b/src/mesa/meson.build index be5f691deb9..4cc5747dbac 100644 --- a/src/mesa/meson.build +++ b/src/mesa/meson.build @@ -354,7 +354,6 @@ files_libmesa = files( 'state_tracker/st_format.h', 'state_tracker/st_gen_mipmap.c', 'state_tracker/st_gen_mipmap.h', - 'state_tracker/st_gl_api.h', 'state_tracker/st_glsl_to_ir.cpp', 'state_tracker/st_glsl_to_ir.h', 'state_tracker/st_glsl_to_nir.cpp', diff --git a/src/mesa/state_tracker/st_gl_api.h b/src/mesa/state_tracker/st_gl_api.h deleted file mode 100644 index 55ad778c97d..00000000000 --- a/src/mesa/state_tracker/st_gl_api.h +++ /dev/null @@ -1,7 +0,0 @@ - -#ifndef ST_GL_API_H -#define ST_GL_API_H - -struct st_api *st_gl_api_create(void); - -#endif diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 4632fe450b9..aeaf547e071 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -52,8 +52,6 @@ #include "st_sampler_view.h" #include "st_util.h" -#include "state_tracker/st_gl_api.h" - #include "pipe/p_context.h" #include "pipe/p_screen.h" #include "util/format/u_format.h" @@ -1449,17 +1447,6 @@ st_api_query_versions(struct st_manager *sm, } -static const struct st_api st_gl_api = { - .name = "Mesa " PACKAGE_VERSION, -}; - - -struct st_api * -st_gl_api_create(void) -{ - return (struct st_api *) &st_gl_api; -} - void st_manager_invalidate_drawables(struct gl_context *ctx) {