Mesa (master): r600g: get correct height alignment
Dave Airlie
airlied at kemper.freedesktop.org
Fri Feb 11 03:42:43 UTC 2011
Module: Mesa
Branch: master
Commit: 596684eb93067f5281ce7c32123a7f009c8a98c6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=596684eb93067f5281ce7c32123a7f009c8a98c6
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Feb 11 11:47:43 2011 +1000
r600g: get correct height alignment
useful for s3tc
---
src/gallium/drivers/r600/r600_texture.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index df8072f..b8bc365 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -430,7 +430,6 @@ static struct pipe_surface *r600_create_surface(struct pipe_context *pipe,
{
struct r600_resource_texture *rtex = (struct r600_resource_texture*)texture;
struct r600_surface *surface = CALLOC_STRUCT(r600_surface);
- unsigned tile_height;
unsigned level = surf_tmpl->u.tex.level;
assert(surf_tmpl->u.tex.first_layer == surf_tmpl->u.tex.last_layer);
@@ -450,8 +449,8 @@ static struct pipe_surface *r600_create_surface(struct pipe_context *pipe,
surface->base.u.tex.last_layer = surf_tmpl->u.tex.last_layer;
surface->base.u.tex.level = level;
- tile_height = r600_get_height_alignment(pipe->screen, rtex->array_mode[level]);
- surface->aligned_height = align(surface->base.height, tile_height);
+ surface->aligned_height = r600_texture_get_nblocksy(pipe->screen,
+ rtex, level);
return &surface->base;
}
More information about the mesa-commit
mailing list