r600g: drop mman allocator
authorDave Airlie <airlied@redhat.com>
Tue, 5 Oct 2010 05:57:57 +0000 (15:57 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 5 Oct 2010 05:57:57 +0000 (15:57 +1000)
we don't use this since constant buffers are now being used on all gpus.

src/gallium/winsys/r600/drm/r600_bo.c
src/gallium/winsys/r600/drm/r600_drm.c
src/gallium/winsys/r600/drm/r600_priv.h

index 8089c916404127cb41d22b11c4b486f36d7eff9a..9498f3a82eaf4685de82e15adf3762b5c3cf2194 100644 (file)
@@ -39,9 +39,7 @@ struct r600_bo *r600_bo(struct radeon *radeon,
        desc.usage = usage;
        ws_bo->size = size;
 
-       if (!radeon->use_mem_constant && (usage & PIPE_BIND_CONSTANT_BUFFER)) {
-               man = radeon->mman;
-       } else if (usage & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
+       if (usage & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER))
                man = radeon->cman;
        else
                man = radeon->kman;
index 31fb7d4e0fd8a24e19b5a71bd77e999e0da6212e..5f175a4df982030cc4bf27fd11cb0af6b99c5e6c 100644 (file)
@@ -157,9 +157,6 @@ struct radeon *radeon_new(int fd, unsigned device)
                break;
        }
 
-       radeon->mman = pb_malloc_bufmgr_create();
-       if (!radeon->mman)
-               return NULL;
        radeon->kman = radeon_bo_pbmgr_create(radeon);
        if (!radeon->kman)
                return NULL;
@@ -182,7 +179,6 @@ struct radeon *radeon_decref(struct radeon *radeon)
                return NULL;
        }
 
-       radeon->mman->destroy(radeon->mman);
        radeon->cman->destroy(radeon->cman);
        radeon->kman->destroy(radeon->kman);
        drmClose(radeon->fd);
index 285a192e743f271e758ff03f0b1720d6e4a8fe3d..07e734268d5771012421df49f6d6915520cf7290 100644 (file)
@@ -41,7 +41,6 @@ struct radeon {
        unsigned                        family;
        enum chip_class                 chip_class;
        boolean                         use_mem_constant; /* true for evergreen */
-       struct pb_manager *mman; /* malloc manager */
        struct pb_manager *kman; /* kernel bo manager */
        struct pb_manager *cman; /* cached bo manager */
 };