diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index 649a74cce6f..067a0f5d459 100644 --- a/src/mesa/main/pack.c +++ b/src/mesa/main/pack.c @@ -55,6 +55,8 @@ #include "glformats.h" #include "../../gallium/auxiliary/util/u_format_rgb9e5.h" #include "../../gallium/auxiliary/util/u_format_r11g11b10f.h" +#include "format_utils.h" +#include "format_pack.h" /** @@ -527,8 +529,6 @@ _mesa_pack_rgba_span_from_uints(struct gl_context *ctx, GLuint n, GLuint rgba[][ GLenum dstFormat, GLenum dstType, GLvoid *dstAddr) { - GLuint i; - switch(dstType) { case GL_UNSIGNED_INT: pack_uint_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); @@ -549,300 +549,108 @@ _mesa_pack_rgba_span_from_uints(struct gl_context *ctx, GLuint n, GLuint rgba[][ pack_byte_from_uint_rgba(ctx, dstAddr, dstFormat, rgba, n); break; case GL_UNSIGNED_BYTE_3_3_2: - if ((dstFormat == GL_RGB) || (dstFormat == GL_RGB_INTEGER)) { - GLubyte *dst = (GLubyte *) dstAddr; - for (i=0;i