From 7b120ceac8738b73dcffe4d39e3e32b473dea3cf Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 2 Nov 2010 15:49:44 +0000 Subject: r600g: remove unused flink, domain fields from r600_resource These were being set but not used anywhere. --- src/gallium/drivers/r600/r600_buffer.c | 27 --------------------------- src/gallium/drivers/r600/r600_resource.h | 5 ----- src/gallium/drivers/r600/r600_texture.c | 1 - 3 files changed, 33 deletions(-) (limited to 'src') diff --git a/src/gallium/drivers/r600/r600_buffer.c b/src/gallium/drivers/r600/r600_buffer.c index 3c45d782a2..ed97b6e69a 100644 --- a/src/gallium/drivers/r600/r600_buffer.c +++ b/src/gallium/drivers/r600/r600_buffer.c @@ -38,32 +38,6 @@ 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); diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h index d24d5a102d..7a2d1f4412 100644 --- a/src/gallium/drivers/r600/r600_resource.h +++ b/src/gallium/drivers/r600/r600_resource.h @@ -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); diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index 8fbe4a0487..c92f634004 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -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) -- cgit v1.2.3