mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 10:40:36 +01:00
nouveau: fix build
This commit is contained in:
parent
5c1a5b5047
commit
9ba3890c6f
3 changed files with 16 additions and 9 deletions
|
|
@ -73,7 +73,8 @@ nouveau_surface_release(struct pipe_winsys *ws, struct pipe_surface **s)
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
@ -144,7 +145,7 @@ nouveau_pipe_bo_reference(struct pipe_winsys *pws,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static int
|
||||
nouveau_pipe_bo_data(struct pipe_winsys *pws, struct pipe_buffer_handle *bo,
|
||||
unsigned size, const void *data, unsigned usage)
|
||||
{
|
||||
|
|
@ -155,13 +156,15 @@ nouveau_pipe_bo_data(struct pipe_winsys *pws, struct pipe_buffer_handle *bo,
|
|||
|
||||
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)
|
||||
|
|
@ -169,12 +172,14 @@ nouveau_pipe_bo_subdata(struct pipe_winsys *pws, struct pipe_buffer_handle *bo,
|
|||
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)
|
||||
|
|
@ -182,9 +187,11 @@ nouveau_pipe_bo_get_subdata(struct pipe_winsys *pws,
|
|||
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 *
|
||||
|
|
|
|||
|
|
@ -695,7 +695,7 @@ nv40_fragprog_bind(struct nv40_context *nv40, struct nv40_fragment_program *fp)
|
|||
|
||||
if (!fp->on_hw) {
|
||||
if (!fp->buffer)
|
||||
fp->buffer = ws->buffer_create(ws, 0x100);
|
||||
fp->buffer = ws->buffer_create(ws, 0x100, 0, 0);
|
||||
|
||||
#if 0
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ nv40_miptree_create(struct pipe_context *pipe, struct pipe_texture **pt)
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue