Module: Mesa
Branch: master
Commit: af0435cbfe61632407ce135fbea9cab6fe1e4fb6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=af0435cbfe61632407ce135fbea9cab6fe1e4fb6

Author: Marek Olšák <[email protected]>
Date:   Sat Oct 17 18:06:21 2020 -0400

Revert "radeonsi: use staging buffer uploads for most VRAM buffers"

This reverts commit fd6bbdcf59dc5b87fed31f8fc51a2b27eaedfbb2.

Fixes: fd6bbdcf59dc5b87fed31f8fc51a2b27eaedfbb2
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3611

Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7262>

---

 src/gallium/drivers/radeonsi/si_buffer.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_buffer.c 
b/src/gallium/drivers/radeonsi/si_buffer.c
index cfa98f00209..31f1318542d 100644
--- a/src/gallium/drivers/radeonsi/si_buffer.c
+++ b/src/gallium/drivers/radeonsi/si_buffer.c
@@ -203,18 +203,8 @@ void si_init_resource_fields(struct si_screen *sscreen, 
struct si_resource *res,
    if (res->domains & RADEON_DOMAIN_VRAM) {
       res->vram_usage = size;
 
-      /* We don't want to evict buffers from VRAM by mapping them for CPU 
access,
-       * because they might never be moved back again. If a buffer is large 
enough,
-       * upload data by copying from a temporary GTT buffer. 8K might not seem 
much,
-       * but there can be 100000 buffers.
-       *
-       * This tweak improves performance for viewperf.
-       */
-      const unsigned min_size = 8196; /* tuned to minimize mapped VRAM */
-      const unsigned max_staging_uploads = 1; /* number of uploads before 
mapping directly */
-
       res->max_forced_staging_uploads = res->b.max_forced_staging_uploads =
-         sscreen->info.has_dedicated_vram && size >= min_size ? 
max_staging_uploads : 0;
+         sscreen->info.has_dedicated_vram && size >= 
sscreen->info.vram_vis_size / 4 ? 1 : 0;
    } else if (res->domains & RADEON_DOMAIN_GTT) {
       res->gart_usage = size;
    }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to