* DEALINGS IN THE SOFTWARE.
*/
-#include "util/imports.h"
+
#include "main/mtypes.h"
#include "main/externalobjects.h"
#include "st_cb_memoryobjects.h"
#include "st_util.h"
-#include "state_tracker/drm_driver.h"
+#include "frontend/drm_driver.h"
#include "pipe/p_context.h"
#include "pipe/p_screen.h"
st_memoryobj_free(struct gl_context *ctx,
struct gl_memory_object *obj)
{
+ struct st_memory_object *st_obj = st_memory_object(obj);
+ struct st_context *st = st_context(ctx);
+ struct pipe_context *pipe = st->pipe;
+ struct pipe_screen *screen = pipe->screen;
+
+ screen->memobj_destroy(screen, st_obj->memory);
_mesa_delete_memory_object(ctx, obj);
}