summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-09-27 19:49:51 -0600
committerBrian Paul <[email protected]>2009-09-27 19:49:51 -0600
commitdb8aca3a398e16f7dc23d3321787274d07d13138 (patch)
tree1d174801c7e9b50e64ed3b3b523a7982074daa50 /src
parent5ab5f16919f6aaa19f5c92fd562e43dee18e30bc (diff)
mesa: use _mesa_get_format_bytes()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/mipmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 5b70200cd5f..faa6c47cb78 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -28,6 +28,7 @@
*/
#include "imports.h"
+#include "formats.h"
#include "mipmap.h"
#include "texcompress.h"
#include "texformat.h"
@@ -1641,7 +1642,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
ASSERT(dstData);
}
else {
- bytesPerTexel = dstImage->TexFormat->TexelBytes;
+ bytesPerTexel = _mesa_get_format_bytes(dstImage->TexFormat->MesaFormat);
ASSERT(dstWidth * dstHeight * dstDepth * bytesPerTexel > 0);
dstImage->Data = _mesa_alloc_texmemory(dstWidth * dstHeight
* dstDepth * bytesPerTexel);