summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_gen_mipmap.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2009-11-30 20:29:18 +0100
committerRoland Scheidegger <sroland@vmware.com>2009-11-30 20:29:18 +0100
commitac400ffce62be47fc77e8d10cabcd39b92b6c627 (patch)
treec99fc26392294b75bf88cb04a7853c63007424f0 /src/mesa/state_tracker/st_gen_mipmap.c
parent7fa1bcc05a237365e5ea09512453f29a91c7a141 (diff)
gallium: interface cleanups, remove nblocksx/y from pipe_texture and more
This patch removes nblocksx, nblocksy arrays from pipe_texture (can be recalculated if needed). Furthermore, pipe_format_block struct is gone completely (again, contains just derived state). nblocksx, nblocksy, block are also removed from pipe_transfer, together with the format enum (can be obtained from the texture associated with the transfer).
Diffstat (limited to 'src/mesa/state_tracker/st_gen_mipmap.c')
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index f8068fa12b..7700551830 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -146,8 +146,8 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
srcData = (ubyte *) screen->transfer_map(screen, srcTrans);
dstData = (ubyte *) screen->transfer_map(screen, dstTrans);
- srcStride = srcTrans->stride / srcTrans->block.size;
- dstStride = dstTrans->stride / dstTrans->block.size;
+ srcStride = srcTrans->stride / pf_get_blocksize(srcTrans->texture->format);
+ dstStride = dstTrans->stride / pf_get_blocksize(dstTrans->texture->format);
_mesa_generate_mipmap_level(target, datatype, comps,
0 /*border*/,