Mesa (master): radeonsi: don't use a staging resource for large transfers
Marek Olšák
mareko at kemper.freedesktop.org
Thu Sep 13 18:30:59 UTC 2012
Module: Mesa
Branch: master
Commit: ee50d365ead2654c4a477ae2c2322883009a65b1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ee50d365ead2654c4a477ae2c2322883009a65b1
Author: Marek Olšák <maraeo at gmail.com>
Date: Thu Sep 13 20:20:46 2012 +0200
radeonsi: don't use a staging resource for large transfers
It kills performance if the resource is linear.
---
src/gallium/drivers/radeonsi/r600_texture.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/src/gallium/drivers/radeonsi/r600_texture.c b/src/gallium/drivers/radeonsi/r600_texture.c
index 0b908c8..e6f72c8 100644
--- a/src/gallium/drivers/radeonsi/r600_texture.c
+++ b/src/gallium/drivers/radeonsi/r600_texture.c
@@ -254,13 +254,6 @@ static void r600_texture_destroy(struct pipe_screen *screen,
FREE(rtex);
}
-/* Needs adjustment for pixelformat:
- */
-static INLINE unsigned u_box_volume( const struct pipe_box *box )
-{
- return box->width * box->depth * box->height;
-};
-
static struct pipe_transfer* si_texture_get_transfer(struct pipe_context *ctx,
struct pipe_resource *texture,
unsigned level,
@@ -284,9 +277,6 @@ static struct pipe_transfer* si_texture_get_transfer(struct pipe_context *ctx,
rtex->surface.level[level].mode != RADEON_SURF_MODE_LINEAR)
use_staging_texture = TRUE;
- if ((usage & PIPE_TRANSFER_READ) && u_box_volume(box) > 1024)
- use_staging_texture = TRUE;
-
/* XXX: Use a staging texture for uploads if the underlying BO
* is busy. No interface for checking that currently? so do
* it eagerly whenever the transfer doesn't require a readback
More information about the mesa-commit
mailing list