struct st_context_iface *st = ctx->st;
struct st_api *stapi = screen->st_api;
- if (st == stapi->get_current(stapi)) {
+ if (st == st_api_get_current()) {
if (st->thread_finish)
st->thread_finish(st);
struct dri_context *
dri_get_current(__DRIscreen *sPriv)
{
- struct dri_screen *screen = dri_screen(sPriv);
- struct st_api *stapi = screen->st_api;
- struct st_context_iface *st;
-
- st = stapi->get_current(stapi);
+ struct st_context_iface *st = st_api_get_current();
return (struct dri_context *) st ? st->st_manager_private : NULL;
}
XMesaContext XMesaGetCurrentContext( void )
{
- struct st_context_iface *st = stapi->get_current(stapi);
+ struct st_context_iface *st = st_api_get_current();
return (XMesaContext) (st) ? st->st_manager_private : NULL;
}
XMesaBindTexImage(Display *dpy, XMesaBuffer drawable, int buffer,
const int *attrib_list)
{
- struct st_context_iface *st = stapi->get_current(stapi);
+ struct st_context_iface *st = st_api_get_current();
struct st_framebuffer_iface* stfbi = drawable->stfb;
struct pipe_resource *res;
int x, y, w, h;
GLAPI OSMesaContext GLAPIENTRY
OSMesaGetCurrentContext(void)
{
- struct st_api *stapi = get_st_api();
- struct st_context_iface *st = stapi->get_current(stapi);
+ struct st_context_iface *st = st_api_get_current();
return st ? (OSMesaContext) st->st_manager_private : NULL;
}
{
struct st_context_iface *st;
- st = (stw_dev) ? stw_dev->stapi->get_current(stw_dev->stapi) : NULL;
+ st = (stw_dev) ? st_api_get_current() : NULL;
return (struct stw_context *) ((st) ? st->st_manager_private : NULL);
}
struct st_context_iface *stctxi,
struct st_framebuffer_iface *stdrawi,
struct st_framebuffer_iface *streadi);
-
- /**
- * Get the currently bound context in the calling thread.
- */
- struct st_context_iface *(*get_current)(struct st_api *stapi);
};
/**
+ * Get the currently bound context in the calling thread.
+ */
+struct st_context_iface *
+st_api_get_current(void);
+
+/**
* Notify the st manager the framebuffer interface object
* is no longer valid.
*/
struct st_context_iface* shared = NULL;
if (fOptions & BGL_SHARE_CONTEXT) {
- shared = fDisplay->api->get_current(fDisplay->api);
+ shared = st_api_get_current();
TRACE("shared context: %p\n", shared);
}
}
-static struct st_context_iface *
-st_api_get_current(struct st_api *stapi)
+struct st_context_iface *
+st_api_get_current(void)
{
GET_CURRENT_CONTEXT(ctx);
struct st_context *st = ctx ? ctx->st : NULL;
.query_versions = st_api_query_versions,
.create_context = st_api_create_context,
.make_current = st_api_make_current,
- .get_current = st_api_get_current,
};