summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2009-06-05 12:27:42 +1000
committerBen Skeggs <[email protected]>2009-06-05 14:37:04 +1000
commit40ed44991851a526f0e2cafd5dab6149cb7a3342 (patch)
tree9d579fdfff37f9edb1d222bf7ba673151e283352 /src/gallium/drivers/nouveau
parent6b3ca672eb85d30d6c28e91000e2cc2231a41bef (diff)
nouveau: fix build with libdrm_nouveau 0.6
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_push.h2
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c9
-rw-r--r--src/gallium/drivers/nouveau/nouveau_stateobj.h8
3 files changed, 9 insertions, 10 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_push.h b/src/gallium/drivers/nouveau/nouveau_push.h
index 0f2c42915bb..9c235080a55 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 ab522a124aa..0ab1d82ebcc 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 8e818d9d38c..b595405357f 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);
}