replace color table FloatTable boolean with Type enum
[mesa.git] / src / mesa / main / texutil.c
index 75bd3b226331258676ca9233089e241b419c4530..40309d154c5d5f9eafa5866f71f17c66728e17e8 100644 (file)
@@ -1,10 +1,9 @@
-/* $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"),
@@ -24,7 +23,7 @@
  * 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
 
@@ -871,7 +868,7 @@ _mesa_convert_texsubimage1d( GLint mesaFormat,
  * 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.
@@ -996,9 +993,9 @@ do {                                                                        \
    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, /, / );                                      \
       }                                                                        \
@@ -1009,7 +1006,7 @@ do {                                                                      \
    }                                                                   \
    else {                                                              \
       const GLint hScale = srcHeight / dstHeight;                      \
-      if ( srcWidth <= dstWidth ) {                                    \
+      if ( srcWidth < dstWidth ) {                                     \
         const GLint wScale = dstWidth / srcWidth;                      \
         INNER_LOOP( TYPE, *, / );                                      \
       }                                                                        \