Mesa (master): r300g: do not align texture height to 2^n for 1D and 2D non-mipmapped textures
Marek Olšák
mareko at kemper.freedesktop.org
Sun Jul 25 09:07:30 UTC 2010
Module: Mesa
Branch: master
Commit: 3adb5c7d45f4a38b0fbb66633c808f69082918cc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3adb5c7d45f4a38b0fbb66633c808f69082918cc
Author: Marek Olšák <maraeo at gmail.com>
Date: Sat Jul 24 03:07:45 2010 +0200
r300g: do not align texture height to 2^n for 1D and 2D non-mipmapped textures
I don't remember why the alignment was there, but it seems to be
no longer needed. I guess it was a dirty fix for some other bug.
---
src/gallium/drivers/r300/r300_texture.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 5750bc4..f7c167d 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -774,7 +774,11 @@ static unsigned r300_texture_get_nblocksy(struct r300_texture* tex,
height = align(height, tile_height);
/* This is needed for the kernel checker, unfortunately. */
- height = util_next_power_of_two(height);
+ if ((tex->b.b.target != PIPE_TEXTURE_1D &&
+ tex->b.b.target != PIPE_TEXTURE_2D) ||
+ tex->b.b.last_level != 0) {
+ height = util_next_power_of_two(height);
+ }
}
return util_format_get_nblocksy(tex->b.b.format, height);
More information about the mesa-commit
mailing list