Hi,

This patch restores the previous memory characteristic of the recently removed 
r600g winsys. Static and immutable buffers were placed in any case in vram.
This really improoves rendering performance for some OpenSceneGraph based 
applications I often use for testing here.

Please review and apply if it's ok.
Thanks

Mathias
From 3f8ef5273c63c929a6c3cc7365ace96449426309 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mathias=20Fr=C3=B6hlich?= <mathias.froehl...@gmx.net>
Date: Sat, 8 Oct 2011 21:33:23 +0200
Subject: [PATCH 2/2] r600g: restore the old r600g winsys memory
 characteristics.

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%.
---
 src/gallium/winsys/radeon/drm/radeon_drm_bo.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 2dca3b9..4bb433a 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -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)) {
-- 
1.7.4.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to