}
static struct pipe_buffer_handle *
-nouveau_pipe_bo_create(struct pipe_winsys *pws, unsigned alignment)
+nouveau_pipe_bo_create(struct pipe_winsys *pws, unsigned alignment,
+ unsigned flags, unsigned hint)
{
struct nouveau_pipe_winsys *nvpws = (struct nouveau_pipe_winsys *)pws;
struct nouveau_device *dev = nvpws->nv->nv_screen->device;
}
}
-static void
+static int
nouveau_pipe_bo_data(struct pipe_winsys *pws, struct pipe_buffer_handle *bo,
unsigned size, const void *data, unsigned usage)
{
if (data) {
if (nouveau_bo_map(nvbo, NOUVEAU_BO_WR))
- return;
+ return 1;
memcpy(nvbo->map, data, size);
nouveau_bo_unmap(nvbo);
}
+
+ return 0;
}
-static void
+static int
nouveau_pipe_bo_subdata(struct pipe_winsys *pws, struct pipe_buffer_handle *bo,
unsigned long offset, unsigned long size,
const void *data)
struct nouveau_bo *nvbo = (struct nouveau_bo *)bo;
if (nouveau_bo_map(nvbo, NOUVEAU_BO_WR))
- return;
+ return 1;
memcpy(nvbo->map + offset, data, size);
nouveau_bo_unmap(nvbo);
+
+ return 0;
}
-static void
+static int
nouveau_pipe_bo_get_subdata(struct pipe_winsys *pws,
struct pipe_buffer_handle *bo, unsigned long offset,
unsigned long size, void *data)
struct nouveau_bo *nvbo = (struct nouveau_bo *)bo;
if (nouveau_bo_map(nvbo, NOUVEAU_BO_RD))
- return;
+ return 1;
memcpy(data, nvbo->map + offset, size);
nouveau_bo_unmap(nvbo);
+
+ return 0;
}
struct pipe_winsys *
memcpy(&nv40mt->base, mt, sizeof(struct pipe_texture));
nv40_miptree_layout(nv40mt);
- nv40mt->buffer = ws->buffer_create(ws, PIPE_SURFACE_FLAG_TEXTURE);
+ nv40mt->buffer = ws->buffer_create(ws, 0, PIPE_SURFACE_FLAG_TEXTURE, 0);
if (!nv40mt->buffer) {
free(nv40mt);
return;