diff options
author | Mathias Fröhlich <[email protected]> | 2011-06-12 14:32:03 +0200 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2011-06-13 11:33:14 -0400 |
commit | b0f1767d776e2c80cab4343b4cd59553fbf5e48a (patch) | |
tree | 778a4b022e344a2b2576c44b9d61b7a23ec7f71f /src/gallium/winsys/r600 | |
parent | e1f88016ec51ccf7e07fac4d77ad9077b6b9a1eb (diff) |
r600g: Allow VRAM for the initial domain for every buffer binding.
Diffstat (limited to 'src/gallium/winsys/r600')
-rw-r--r-- | src/gallium/winsys/r600/drm/r600_bo.c | 26 |
1 files changed, 11 insertions, 15 deletions
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) { |