-/* $Id: texutil.c,v 1.31 2002/09/21 16:51:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 4.0.3
+ * Version: 5.1
*
- * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Gareth Hughes <gareth@valinux.com>
+ * Gareth Hughes
*/
/*
*/
-#ifdef PC_HEADER
-#include "all.h"
-#else
#include "glheader.h"
+#include "colormac.h"
#include "context.h"
#include "enums.h"
#include "image.h"
+#include "imports.h"
#include "macros.h"
-#include "mem.h"
#include "mtypes.h"
#include "texformat.h"
#include "texutil.h"
-#endif
+
#define DEBUG_TEXUTIL 0
* with the _mesa_transfer_teximage() function. That function will also
* do image transfer operations such as scale/bias and convolution.
*
- * Input:
+ * \param
* mesaFormat - one of the MESA_FORMAT_* values from texformat.h
* xoffset, yoffset - position in dest image to put data
* width, height - incoming image size, also size of dest region.
const TYPE *src = (const TYPE *)srcImage; \
TYPE *dst = (TYPE *)dstImage; \
\
- if ( srcHeight <= dstHeight ) { \
+ if ( srcHeight < dstHeight ) { \
const GLint hScale = dstHeight / srcHeight; \
- if ( srcWidth <= dstWidth ) { \
+ if ( srcWidth < dstWidth ) { \
const GLint wScale = dstWidth / srcWidth; \
INNER_LOOP( TYPE, /, / ); \
} \
} \
else { \
const GLint hScale = srcHeight / dstHeight; \
- if ( srcWidth <= dstWidth ) { \
+ if ( srcWidth < dstWidth ) { \
const GLint wScale = dstWidth / srcWidth; \
INNER_LOOP( TYPE, *, / ); \
} \