These are valid assertions whether or not the image is compressed,
if we do them just a tiny bit later.
---
src/mesa/main/mipmap.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 678d17a..54f641d 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1641,17 +1641,16 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
}
}
- /* Setup src and dest data pointers */
- if (_mesa_is_format_compressed(dstImage->TexFormat)) {
- /* srcData and dstData are already set */
- ASSERT(srcData);
- ASSERT(dstData);
- }
- else {
+ /* If using a compressed format, srcData and dstData should already be
set.
+ * If not compressed, set up srcData and dstData now.
+ */
+ if (!_mesa_is_format_compressed(dstImage->TexFormat)) {
srcData = (const GLubyte *) srcImage->Data;
dstData = (GLubyte *) dstImage->Data;
}
+ ASSERT(srcData);
+ ASSERT(dstData);
ASSERT(dstImage->TexFormat);
ASSERT(dstImage->FetchTexelc);
ASSERT(dstImage->FetchTexelf);
--
1.7.1
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel