return "Nouveau/DRI";
}
-static struct pipe_surface *
-nouveau_surface_alloc(struct pipe_winsys *ws)
-{
- struct pipe_surface *surf;
-
- surf = CALLOC_STRUCT(pipe_surface);
- if (!surf)
- return NULL;
-
- surf->refcount = 1;
- surf->winsys = ws;
- return surf;
-}
-
-static void
-nouveau_surface_release(struct pipe_winsys *ws, struct pipe_surface **s)
-{
- struct pipe_surface *surf = *s;
-
- *s = NULL;
- if (--surf->refcount <= 0) {
- if (surf->buffer)
- pipe_buffer_reference(ws, &surf->buffer, NULL);
- free(surf);
- }
-}
-
static struct pipe_buffer *
nouveau_pipe_bo_create(struct pipe_winsys *pws, unsigned alignment,
unsigned usage, unsigned size)
pws->flush_frontbuffer = nouveau_flush_frontbuffer;
- pws->surface_alloc = nouveau_surface_alloc;
- pws->surface_release = nouveau_surface_release;
-
pws->buffer_create = nouveau_pipe_bo_create;
pws->buffer_destroy = nouveau_pipe_bo_del;
pws->user_buffer_create = nouveau_pipe_bo_user_create;