summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_gen_mipmap.c
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-06-27 19:37:56 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-06-27 19:37:56 +0900
commit4ddd65967915ca4846f2831bc676c878a29dae4a (patch)
treef2c66e355d5e9ea6f80531f995ccc25166d06fc3 /src/gallium/auxiliary/util/u_gen_mipmap.c
parent05cfb4c4b84b4e3119112c381ceffc583a4ef5fe (diff)
gallium: Drop pipe_texture->cpp and pipe_surface->cpp.
The chars-per-pixel concept falls apart with compressed and yuv images, where more than one pixel are coded in a single data block.
Diffstat (limited to 'src/gallium/auxiliary/util/u_gen_mipmap.c')
-rw-r--r--src/gallium/auxiliary/util/u_gen_mipmap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/util/u_gen_mipmap.c b/src/gallium/auxiliary/util/u_gen_mipmap.c
index 7d71aefda9..5313a8008a 100644
--- a/src/gallium/auxiliary/util/u_gen_mipmap.c
+++ b/src/gallium/auxiliary/util/u_gen_mipmap.c
@@ -625,7 +625,9 @@ make_2d_mipmap(struct gen_mipmap_state *ctx,
struct pipe_winsys *winsys = pipe->winsys;
const uint zslice = 0;
uint dstLevel;
- const int bpt = pf_get_size(pt->format);
+
+ assert(pt->block.width == 1);
+ assert(pt->block.height == 1);
for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) {
const uint srcLevel = dstLevel - 1;
@@ -646,9 +648,9 @@ make_2d_mipmap(struct gen_mipmap_state *ctx,
reduce_2d(pt->format,
srcSurf->width, srcSurf->height,
- srcSurf->pitch * bpt, srcMap,
+ srcSurf->stride, srcMap,
dstSurf->width, dstSurf->height,
- dstSurf->pitch * bpt, dstMap);
+ dstSurf->stride, dstMap);
winsys->buffer_unmap(winsys, srcSurf->buffer);
winsys->buffer_unmap(winsys, dstSurf->buffer);