From b0f1767d776e2c80cab4343b4cd59553fbf5e48a Mon Sep 17 00:00:00 2001 From: Mathias Fröhlich Date: Sun, 12 Jun 2011 14:32:03 +0200 Subject: r600g: Allow VRAM for the initial domain for every buffer binding. --- src/gallium/winsys/r600/drm/r600_bo.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'src/gallium/winsys') diff --git a/src/gallium/winsys/r600/drm/r600_bo.c b/src/gallium/winsys/r600/drm/r600_bo.c index 093660f8d01..4098a6e1998 100644 --- a/src/gallium/winsys/r600/drm/r600_bo.c +++ b/src/gallium/winsys/r600/drm/r600_bo.c @@ -59,22 +59,18 @@ struct r600_bo *r600_bo(struct radeon *radeon, } } - if (binding & (PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER)) { + switch(usage) { + case PIPE_USAGE_DYNAMIC: + case PIPE_USAGE_STREAM: + case PIPE_USAGE_STAGING: initial_domain = RADEON_GEM_DOMAIN_GTT; - } else { - switch(usage) { - case PIPE_USAGE_DYNAMIC: - case PIPE_USAGE_STREAM: - case PIPE_USAGE_STAGING: - initial_domain = RADEON_GEM_DOMAIN_GTT; - break; - case PIPE_USAGE_DEFAULT: - case PIPE_USAGE_STATIC: - case PIPE_USAGE_IMMUTABLE: - default: - initial_domain = RADEON_GEM_DOMAIN_VRAM; - break; - } + break; + case PIPE_USAGE_DEFAULT: + case PIPE_USAGE_STATIC: + case PIPE_USAGE_IMMUTABLE: + default: + initial_domain = RADEON_GEM_DOMAIN_VRAM; + break; } rbo = radeon_bo(radeon, 0, size, alignment, initial_domain); if (rbo == NULL) { -- cgit v1.2.3