diff --git a/src/gallium/frontends/dri/dri_drawable.c b/src/gallium/frontends/dri/dri_drawable.c index f9df73ee896..83ac5256998 100644 --- a/src/gallium/frontends/dri/dri_drawable.c +++ b/src/gallium/frontends/dri/dri_drawable.c @@ -191,7 +191,6 @@ dri_destroy_buffer(__DRIdrawable * dPriv) { struct dri_drawable *drawable = dri_drawable(dPriv); struct dri_screen *screen = drawable->screen; - struct st_api *stapi = screen->st_api; int i; for (i = 0; i < ST_ATTACHMENT_COUNT; i++) @@ -203,7 +202,7 @@ dri_destroy_buffer(__DRIdrawable * dPriv) &drawable->throttle_fence, NULL); /* Notify the st manager that this drawable is no longer valid */ - stapi->destroy_drawable(stapi, &drawable->base); + st_api_destroy_drawable(&drawable->base); FREE(drawable->damage_rects); FREE(drawable); diff --git a/src/gallium/frontends/glx/xlib/xm_api.c b/src/gallium/frontends/glx/xlib/xm_api.c index 4205f803db7..f98d4c9c039 100644 --- a/src/gallium/frontends/glx/xlib/xm_api.c +++ b/src/gallium/frontends/glx/xlib/xm_api.c @@ -607,7 +607,7 @@ xmesa_free_buffer(XMesaBuffer buffer) /* Notify the st manager that the associated framebuffer interface * object is no longer valid. */ - stapi->destroy_drawable(stapi, buffer->stfb); + st_api_destroy_drawable(buffer->stfb); /* XXX we should move the buffer to a delete-pending list and destroy * the buffer until it is no longer current. diff --git a/src/gallium/frontends/osmesa/osmesa.c b/src/gallium/frontends/osmesa/osmesa.c index 3173fb6c46b..67adef517de 100644 --- a/src/gallium/frontends/osmesa/osmesa.c +++ b/src/gallium/frontends/osmesa/osmesa.c @@ -517,7 +517,7 @@ osmesa_destroy_buffer(struct osmesa_buffer *osbuffer) * Notify the state manager that the associated framebuffer interface * is no longer valid. */ - stapi->destroy_drawable(stapi, osbuffer->stfb); + st_api_destroy_drawable(osbuffer->stfb); FREE(osbuffer->stfb); FREE(osbuffer); diff --git a/src/gallium/frontends/wgl/stw_st.c b/src/gallium/frontends/wgl/stw_st.c index bd510a8f7ac..7350e0ac6b7 100644 --- a/src/gallium/frontends/wgl/stw_st.c +++ b/src/gallium/frontends/wgl/stw_st.c @@ -533,7 +533,7 @@ stw_st_destroy_framebuffer_locked(struct st_framebuffer_iface *stfb) /* Notify the st manager that the framebuffer interface is no * longer valid. */ - stw_dev->stapi->destroy_drawable(stw_dev->stapi, &stwfb->base); + st_api_destroy_drawable(&stwfb->base); FREE(stwfb); } diff --git a/src/gallium/include/frontend/api.h b/src/gallium/include/frontend/api.h index 637cc410588..c872648a159 100644 --- a/src/gallium/include/frontend/api.h +++ b/src/gallium/include/frontend/api.h @@ -547,13 +547,13 @@ struct st_api * Get the currently bound context in the calling thread. */ struct st_context_iface *(*get_current)(struct st_api *stapi); - - /** - * Notify the st manager the framebuffer interface object - * is no longer valid. - */ - void (*destroy_drawable)(struct st_api *stapi, - struct st_framebuffer_iface *stfbi); }; +/** + * Notify the st manager the framebuffer interface object + * is no longer valid. + */ +void +st_api_destroy_drawable(struct st_framebuffer_iface *stfbi); + #endif /* _API_H_ */ diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index c0e4c46c06f..64649dd2804 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -747,9 +747,8 @@ unlock: * The framebuffer interface object is no longer valid. * Remove the object from the framebuffer interface hash table. */ -static void -st_api_destroy_drawable(struct st_api *stapi, - struct st_framebuffer_iface *stfbi) +void +st_api_destroy_drawable(struct st_framebuffer_iface *stfbi) { if (!stfbi) return; @@ -1456,7 +1455,6 @@ static const struct st_api st_gl_api = { .create_context = st_api_create_context, .make_current = st_api_make_current, .get_current = st_api_get_current, - .destroy_drawable = st_api_destroy_drawable, };