r600g: remove unused flink, domain fields from r600_resource
authorKeith Whitwell <keithw@vmware.com>
Tue, 2 Nov 2010 15:49:44 +0000 (15:49 +0000)
committerKeith Whitwell <keithw@vmware.com>
Wed, 3 Nov 2010 09:36:01 +0000 (09:36 +0000)
These were being set but not used anywhere.

src/gallium/drivers/r600/r600_buffer.c
src/gallium/drivers/r600/r600_resource.h
src/gallium/drivers/r600/r600_texture.c

index 3c45d782a2c1fa3bfb6da82411c1fa0d9620ce57..ed97b6e69a39293ea75f02da0000ccfc2aa603ce 100644 (file)
 
 extern struct u_resource_vtbl r600_buffer_vtbl;
 
-u32 r600_domain_from_usage(unsigned usage)
-{
-       u32 domain = RADEON_GEM_DOMAIN_GTT;
-
-       if (usage & PIPE_BIND_RENDER_TARGET) {
-               domain |= RADEON_GEM_DOMAIN_VRAM;
-       }
-       if (usage & PIPE_BIND_DEPTH_STENCIL) {
-               domain |= RADEON_GEM_DOMAIN_VRAM;
-       }
-       if (usage & PIPE_BIND_SAMPLER_VIEW) {
-               domain |= RADEON_GEM_DOMAIN_VRAM;
-       }
-       /* also need BIND_BLIT_SOURCE/DESTINATION ? */
-       if (usage & PIPE_BIND_VERTEX_BUFFER) {
-               domain |= RADEON_GEM_DOMAIN_GTT;
-       }
-       if (usage & PIPE_BIND_INDEX_BUFFER) {
-               domain |= RADEON_GEM_DOMAIN_GTT;
-       }
-       if (usage & PIPE_BIND_CONSTANT_BUFFER) {
-               domain |= RADEON_GEM_DOMAIN_VRAM;
-       }
-
-       return domain;
-}
 
 struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
                                         const struct pipe_resource *templ)
@@ -85,7 +59,6 @@ struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
        rbuffer->r.base.b.screen = screen;
        rbuffer->r.base.vtbl = &r600_buffer_vtbl;
        rbuffer->r.size = rbuffer->r.base.b.width0;
-       rbuffer->r.domain = r600_domain_from_usage(rbuffer->r.base.b.bind);
        bo = r600_bo((struct radeon*)screen->winsys, rbuffer->r.base.b.width0, alignment, rbuffer->r.base.b.bind, rbuffer->r.base.b.usage);
        if (bo == NULL) {
                FREE(rbuffer);
index d24d5a102dd35231c4e15a1bdea77c6226c5538d..7a2d1f44122e85f0557c4956b0113ee36b77fc96 100644 (file)
@@ -45,8 +45,6 @@ struct r600_transfer {
 struct r600_resource {
        struct u_resource               base;
        struct r600_bo                  *bo;
-       u32                             domain;
-       u32                             flink;
        u32                             size;
 };
 
@@ -68,9 +66,6 @@ struct r600_resource_texture {
 
 void r600_init_screen_resource_functions(struct pipe_screen *screen);
 
-/* r600_buffer */
-u32 r600_domain_from_usage(unsigned usage);
-
 /* r600_texture */
 struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
                                        const struct pipe_resource *templ);
index 8fbe4a04879906ff5e0e9b8aa5fd1228bf009335..c92f634004709ce0164c81bfc28c6931a336dddb 100644 (file)
@@ -284,7 +284,6 @@ r600_texture_create_object(struct pipe_screen *screen,
        pipe_reference_init(&resource->base.b.reference, 1);
        resource->base.b.screen = screen;
        resource->bo = bo;
-       resource->domain = r600_domain_from_usage(resource->base.b.bind);
        rtex->pitch_override = pitch_in_bytes_override;
 
        if (array_mode)