From 0a306daf71588fc4ccfdc14450f8cd4ce00f9833 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 28 Sep 2009 21:52:43 -0600 Subject: [PATCH] mesa: use _mesa_texstore() --- src/mesa/main/mipmap.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 0950d8a..c02c705 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1667,20 +1667,17 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, const GLenum srcFormat = _mesa_get_format_base_format(convertFormat); GLint dstRowStride = _mesa_compressed_row_stride(dstImage->TexFormat->MesaFormat, dstWidth); - const StoreTexImageFunc storeImage = - _mesa_get_texstore_func(dstImage->TexFormat->MesaFormat); - ASSERT(srcFormat == GL_RGB || srcFormat == GL_RGBA); - storeImage(ctx, 2, dstImage->_BaseFormat, - dstImage->TexFormat, - dstImage->Data, - 0, 0, 0, /* dstX/Y/Zoffset */ - dstRowStride, 0, /* strides */ - dstWidth, dstHeight, 1, /* size */ - srcFormat, CHAN_TYPE, - dstData, /* src data, actually */ - &ctx->DefaultPacking); + _mesa_texstore(ctx, 2, dstImage->_BaseFormat, + dstImage->TexFormat, + dstImage->Data, + 0, 0, 0, /* dstX/Y/Zoffset */ + dstRowStride, 0, /* strides */ + dstWidth, dstHeight, 1, /* size */ + srcFormat, CHAN_TYPE, + dstData, /* src data, actually */ + &ctx->DefaultPacking); /* swap src and dest pointers */ temp = (GLubyte *) srcData; -- 2.7.4