aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-02-11 10:59:40 -0700
committerBrian <[email protected]>2008-02-11 10:59:40 -0700
commitb61b1a295b13a0ff2cf98c8d07e62147d71c08b9 (patch)
treeac65a17d8ea7e4c4294d4caabbe13ad0007032b8 /src/mesa/state_tracker
parent3d0fd8a6cf294d58df2d2ec4139192416a1a4078 (diff)
gallium: take pitch/stride into account in mipmap generation
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index f6af37cfac3..c152c599056 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -352,12 +352,13 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
PIPE_BUFFER_USAGE_CPU_WRITE)
+ dstSurf->offset;
- /* XXX need to take stride/pitch info into account... */
_mesa_generate_mipmap_level(target, datatype, comps,
0 /*border*/,
pt->width[srcLevel], pt->height[srcLevel], pt->depth[srcLevel],
+ srcSurf->pitch * srcSurf->cpp, /* stride in bytes */
srcData,
pt->width[dstLevel], pt->height[dstLevel], pt->depth[dstLevel],
+ dstSurf->pitch * dstSurf->cpp, /* stride in bytes */
dstData);
ws->buffer_unmap(ws, srcSurf->buffer);