r600g: Allow VRAM for the initial domain for every buffer binding.
authorMathias Fröhlich <Mathias.Froehlich@gmx.net>
Sun, 12 Jun 2011 12:32:03 +0000 (14:32 +0200)
committerAlex Deucher <alexdeucher@gmail.com>
Mon, 13 Jun 2011 15:33:14 +0000 (11:33 -0400)
src/gallium/winsys/r600/drm/r600_bo.c

index 093660f8d01bcb25048f418e65e814bb0f6456ba..4098a6e1998f5f17093cb0c76ad45536e482ff5b 100644 (file)
@@ -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) {