winsys/radeon: restore the old r600g winsys memory characteristics.
authorMathias Fröhlich <Mathias.Froehlich@gmx.net>
Sat, 8 Oct 2011 19:33:23 +0000 (21:33 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 24 Oct 2011 16:20:07 +0000 (18:20 +0200)
Use VRAM for static and immutable buffers. This restores the
recently removed r600g winsys behaviour for memory locations.
This also improoves rendering times on the gpu for some
OpenSceneGraph based test cases by about 15%.

Signed-off-by: Marek Olšák <maraeo@gmail.com>
src/gallium/winsys/radeon/drm/radeon_drm_bo.c

index 2dca3b9d95877e10abbfad5a7e0d4057e76a06aa..4bb433a41eeb0840b381ef499721d03e3d908756 100644 (file)
@@ -530,6 +530,11 @@ radeon_winsys_bo_create(struct radeon_winsys *rws,
             desc.initial_domains = RADEON_GEM_DOMAIN_GTT;
             desc.reloc_domains = RADEON_GEM_DOMAIN_GTT;
             break;
+    case PIPE_USAGE_IMMUTABLE:
+    case PIPE_USAGE_STATIC:
+            desc.initial_domains = RADEON_GEM_DOMAIN_VRAM;
+            desc.reloc_domains = RADEON_GEM_DOMAIN_VRAM;
+            break;
     default:
             if (bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER |
                         PIPE_BIND_CONSTANT_BUFFER)) {