From f1f022dbb103947b0edf5ae984fcff00f6a8e539 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Tue, 6 Jan 2009 15:37:45 +0800 Subject: mesa: Fix the size per pixel for packed pixel format data type. --- src/mesa/main/mipmap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/mipmap.c') diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 9e051ace25..3dd4b3391b 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -41,7 +41,11 @@ bytes_per_pixel(GLenum datatype, GLuint comps) { GLint b = _mesa_sizeof_packed_type(datatype); assert(b >= 0); - return b * comps; + + if (_mesa_type_is_packed(datatype)) + return b; + else + return b * comps; } -- cgit v1.2.3