Mesa (9.0): r600g: don't use a staging resource for large transfers

Marek Olšák mareko at kemper.freedesktop.org
Sat Sep 22 14:32:39 UTC 2012


Module: Mesa
Branch: 9.0
Commit: 86735d78e67c44a6ab786c85562c8fca2384f4a5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=86735d78e67c44a6ab786c85562c8fca2384f4a5

Author: Marek Olšák <maraeo at gmail.com>
Date:   Thu Sep 13 20:20:46 2012 +0200

r600g: don't use a staging resource for large transfers

It kills performance if the resource is linear.
(cherry picked from commit e386972f5bcb59a37489ea627030315bf8961fd4)

---

 src/gallium/drivers/r600/r600_texture.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 6de3d6a..1c52ff8 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -592,13 +592,6 @@ bool r600_init_flushed_depth_texture(struct pipe_context *ctx,
 	return true;
 }
 
-/* Needs adjustment for pixelformat:
- */
-static INLINE unsigned u_box_volume( const struct pipe_box *box )
-{
-	return box->width * box->depth * box->height;
-}
-
 struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
 						struct pipe_resource *texture,
 						unsigned level,
@@ -622,9 +615,6 @@ struct pipe_transfer* r600_texture_get_transfer(struct pipe_context *ctx,
 		use_staging_texture = TRUE;
 	}
 
-	if ((usage & PIPE_TRANSFER_READ) && u_box_volume(box) > 1024)
-		use_staging_texture = TRUE;
-
 	/* Use a staging texture for uploads if the underlying BO is busy. */
 	if (!(usage & PIPE_TRANSFER_READ) &&
 	    (rctx->ws->cs_is_buffer_referenced(rctx->cs, rtex->resource.cs_buf, RADEON_USAGE_READWRITE) ||




More information about the mesa-commit mailing list