diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2009-06-05 14:48:45 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-06-05 14:48:45 +1000 |
commit | 36705ee044681da9899d0950c22ae7baa10c3d33 (patch) | |
tree | 8dcfcad2d432c6f311ed69371611282e8019fa7e /src/gallium/drivers | |
parent | 40ed44991851a526f0e2cafd5dab6149cb7a3342 (diff) |
nouveau: plug in our map_buffer_range and friends
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_screen.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index 0ab1d82ebcc..832366e6462 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.c +++ b/src/gallium/drivers/nouveau/nouveau_screen.c @@ -8,8 +8,6 @@ #include "nouveau_winsys.h" #include "nouveau_screen.h" -//#define ENABLE_BUFRANGE - static const char * nouveau_screen_get_name(struct pipe_screen *pscreen) { @@ -138,7 +136,6 @@ nouveau_screen_bo_map(struct pipe_screen *pscreen, struct pipe_buffer *pb, return bo->map; } -#ifdef ENABLE_BUFRANGE static void * nouveau_screen_bo_map_range(struct pipe_screen *pscreen, struct pipe_buffer *pb, unsigned offset, unsigned length, unsigned usage) @@ -153,7 +150,7 @@ nouveau_screen_bo_map_range(struct pipe_screen *pscreen, struct pipe_buffer *pb, return NULL; } - return bo->map; + return (char *)bo->map - offset; /* why gallium? why? */ } static void @@ -164,7 +161,6 @@ nouveau_screen_bo_map_flush(struct pipe_screen *pscreen, struct pipe_buffer *pb, nouveau_bo_map_flush(bo, offset, length); } -#endif static void nouveau_screen_bo_unmap(struct pipe_screen *pscreen, struct pipe_buffer *pb) @@ -225,10 +221,8 @@ 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 ENABLE_BUFRANGE pscreen->buffer_map_range = nouveau_screen_bo_map_range; pscreen->buffer_flush_mapped_range = nouveau_screen_bo_map_flush; -#endif pscreen->buffer_unmap = nouveau_screen_bo_unmap; pscreen->buffer_destroy = nouveau_screen_bo_del; |