Mesa (master): r600g: prevent hardware blitting based on resource usage
Christian König
deathsimple at kemper.freedesktop.org
Wed Jul 13 14:59:28 UTC 2011
Module: Mesa
Branch: master
Commit: a0a22fead5e08b9ebfd2b64e6262e1e803a8e927
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a0a22fead5e08b9ebfd2b64e6262e1e803a8e927
Author: Christian König <deathsimple at vodafone.de>
Date: Wed Jul 13 16:35:19 2011 +0200
r600g: prevent hardware blitting based on resource usage
It doesn't make much sense for STAGING and STREAM resources to be
hardware blitted into VRAM.
---
src/gallium/drivers/r600/r600_texture.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 37e75be..10c32c5 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -313,7 +313,14 @@ static boolean permit_hardware_blit(struct pipe_screen *screen,
PIPE_BIND_SAMPLER_VIEW))
return FALSE;
- return TRUE;
+ switch (res->usage) {
+ case PIPE_USAGE_STREAM:
+ case PIPE_USAGE_STAGING:
+ return FALSE;
+
+ default:
+ return TRUE;
+ }
}
static boolean r600_texture_get_handle(struct pipe_screen* screen,
More information about the mesa-commit
mailing list