From 40ed44991851a526f0e2cafd5dab6149cb7a3342 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 5 Jun 2009 12:27:42 +1000 Subject: nouveau: fix build with libdrm_nouveau 0.6 --- src/gallium/drivers/nouveau/nouveau_push.h | 2 +- src/gallium/drivers/nouveau/nouveau_screen.c | 9 ++++----- src/gallium/drivers/nouveau/nouveau_stateobj.h | 8 ++++---- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src/gallium/drivers/nouveau') diff --git a/src/gallium/drivers/nouveau/nouveau_push.h b/src/gallium/drivers/nouveau/nouveau_push.h index 0f2c42915b..9c235080a5 100644 --- a/src/gallium/drivers/nouveau/nouveau_push.h +++ b/src/gallium/drivers/nouveau/nouveau_push.h @@ -54,7 +54,7 @@ DO_FIRE_RING(struct nouveau_channel *chan, struct pipe_fence_handle **fence) NOUVEAU_PUSH_CONTEXT(pc); \ struct nouveau_channel *chan = pc->base.channel; \ nouveau_pushbuf_emit_reloc(chan, chan->pushbuf->cur++, nouveau_bo(bo), \ - (data), (flags), (vor), (tor)); \ + (data), 0, (flags), (vor), (tor)); \ } while(0) /* Raw data + flags depending on FB/TT buffer */ diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index ab522a124a..0ab1d82ebc 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -8,6 +8,8 @@ #include "nouveau_winsys.h" #include "nouveau_screen.h" +//#define ENABLE_BUFRANGE + static const char * nouveau_screen_get_name(struct pipe_screen *pscreen) { @@ -109,16 +111,13 @@ nouveau_screen_map_flags(unsigned pipe) flags |= NOUVEAU_BO_RD; if (pipe & PIPE_BUFFER_USAGE_CPU_WRITE) flags |= NOUVEAU_BO_WR; -#ifdef NOUVEAU_BO_NOWAIT if (pipe & PIPE_BUFFER_USAGE_DISCARD) flags |= NOUVEAU_BO_INVAL; - if (pipe & PIPE_BUFFER_USAGE_DONTBLOCK) flags |= NOUVEAU_BO_NOWAIT; else if (pipe & 0 /*PIPE_BUFFER_USAGE_UNSYNCHRONIZED*/) flags |= NOUVEAU_BO_NOSYNC; -#endif return flags; } @@ -139,7 +138,7 @@ nouveau_screen_bo_map(struct pipe_screen *pscreen, struct pipe_buffer *pb, return bo->map; } -#ifdef NOUVEAU_BO_NOWAIT +#ifdef ENABLE_BUFRANGE static void * nouveau_screen_bo_map_range(struct pipe_screen *pscreen, struct pipe_buffer *pb, unsigned offset, unsigned length, unsigned usage) @@ -226,7 +225,7 @@ nouveau_screen_init(struct nouveau_screen *screen, struct nouveau_device *dev) pscreen->buffer_create = nouveau_screen_bo_new; pscreen->user_buffer_create = nouveau_screen_bo_user; pscreen->buffer_map = nouveau_screen_bo_map; -#ifdef NOUVEAU_BO_NOWAIT +#ifdef ENABLE_BUFRANGE pscreen->buffer_map_range = nouveau_screen_bo_map_range; pscreen->buffer_flush_mapped_range = nouveau_screen_bo_map_flush; #endif diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h index 8e818d9d38..b595405357 100644 --- a/src/gallium/drivers/nouveau/nouveau_stateobj.h +++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h @@ -122,8 +122,8 @@ so_emit(struct nouveau_channel *chan, struct nouveau_stateobj *so) struct nouveau_stateobj_reloc *r = &so->reloc[i]; nouveau_pushbuf_emit_reloc(chan, pb->cur + r->offset, - r->bo, r->data, r->flags, r->vor, - r->tor); + r->bo, r->data, 0, r->flags, + r->vor, r->tor); } pb->cur += nr; } @@ -145,12 +145,12 @@ so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so) for (i = 0; i < so->cur_reloc; i++) { struct nouveau_stateobj_reloc *r = &so->reloc[i]; - nouveau_pushbuf_emit_reloc(chan, pb->cur++, r->bo, r->packet, + nouveau_pushbuf_emit_reloc(chan, pb->cur++, r->bo, r->packet, 0, (r->flags & (NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RDWR)) | NOUVEAU_BO_DUMMY, 0, 0); - nouveau_pushbuf_emit_reloc(chan, pb->cur++, r->bo, r->data, + nouveau_pushbuf_emit_reloc(chan, pb->cur++, r->bo, r->data, 0, r->flags | NOUVEAU_BO_DUMMY, r->vor, r->tor); } -- cgit v1.2.3