#include "nouveau_winsys.h"
#include "nouveau_screen.h"
-//#define ENABLE_BUFRANGE
-
static const char *
nouveau_screen_get_name(struct pipe_screen *pscreen)
{
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)
return NULL;
}
- return bo->map;
+ return (char *)bo->map - offset; /* why gallium? why? */
}
static void
nouveau_bo_map_flush(bo, offset, length);
}
-#endif
static void
nouveau_screen_bo_unmap(struct pipe_screen *pscreen, struct pipe_buffer *pb)
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;