summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/r600/drm/r600_bo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/r600/drm/r600_bo.c')
-rw-r--r--src/gallium/winsys/r600/drm/r600_bo.c41
1 files changed, 20 insertions, 21 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_bo.c b/src/gallium/winsys/r600/drm/r600_bo.c
index 9fc799a1586..0e41a1709ee 100644
--- a/src/gallium/winsys/r600/drm/r600_bo.c
+++ b/src/gallium/winsys/r600/drm/r600_bo.c
@@ -40,26 +40,27 @@ struct r600_bo *r600_bo(struct radeon *radeon,
* and are used for uploads and downloads from regular
* resources. We generate them internally for some transfers.
*/
- if (usage == PIPE_USAGE_STAGING)
- domains = RADEON_GEM_DOMAIN_CPU | RADEON_GEM_DOMAIN_GTT;
- else
- domains = (RADEON_GEM_DOMAIN_CPU |
- RADEON_GEM_DOMAIN_GTT |
- RADEON_GEM_DOMAIN_VRAM);
-
- switch(usage) {
- case PIPE_USAGE_DYNAMIC:
- case PIPE_USAGE_STREAM:
- case PIPE_USAGE_STAGING:
+ if (usage == PIPE_USAGE_STAGING) {
+ domains = RADEON_GEM_DOMAIN_GTT;
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;
+ } else {
+ domains = RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM;
+
+ 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;
+ }
}
+
rbo = radeon_bo(radeon, 0, size, alignment, binding, initial_domain);
if (rbo == NULL) {
return NULL;
@@ -87,9 +88,7 @@ struct r600_bo *r600_bo_handle(struct radeon *radeon, struct winsys_handle *whan
}
pipe_reference_init(&bo->reference, 1);
- bo->domains = (RADEON_GEM_DOMAIN_CPU |
- RADEON_GEM_DOMAIN_GTT |
- RADEON_GEM_DOMAIN_VRAM);
+ bo->domains = RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM;
if (stride)
*stride = whandle->stride;