Mesa (master): r600g: Make unaligned 3D textures work on +evergreen
Christian König
deathsimple at kemper.freedesktop.org
Tue Aug 30 13:40:00 UTC 2011
Module: Mesa
Branch: master
Commit: 8f4ec55f77a993ec44db56726187bdd4f041880e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f4ec55f77a993ec44db56726187bdd4f041880e
Author: Christian König <deathsimple at vodafone.de>
Date: Mon Aug 29 12:14:30 2011 +0200
r600g: Make unaligned 3D textures work on +evergreen
The layersize calculation is slightly different on +evergreen.
This makes mpeg2 video decoding and piglits texture-packed-formats
test work correctly on this hardware.
---
src/gallium/drivers/r600/r600_texture.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 3bd5350..691cc48 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -262,7 +262,11 @@ static void r600_setup_miptree(struct pipe_screen *screen,
nblocksx = r600_texture_get_nblocksx(screen, rtex, i);
nblocksy = r600_texture_get_nblocksy(screen, rtex, i);
- layer_size = nblocksx * nblocksy * blocksize;
+ if (chipc >= EVERGREEN && array_mode == V_038000_ARRAY_LINEAR_GENERAL)
+ layer_size = align(nblocksx, 64) * nblocksy * blocksize;
+ else
+ layer_size = nblocksx * nblocksy * blocksize;
+
if (ptex->target == PIPE_TEXTURE_CUBE) {
if (chipc >= R700)
size = layer_size * 8;
More information about the mesa-commit
mailing list