rename some span pack/unpack functions for better uniformity
authorBrian Paul <brian.paul@tungstengraphics.com>
Sat, 28 Feb 2004 20:35:57 +0000 (20:35 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Sat, 28 Feb 2004 20:35:57 +0000 (20:35 +0000)
src/mesa/main/colortab.c
src/mesa/main/convolve.c
src/mesa/main/histogram.c
src/mesa/main/image.c
src/mesa/main/image.h
src/mesa/main/teximage.c
src/mesa/main/texstore.c
src/mesa/swrast/s_drawpix.c
src/mesa/swrast/s_readpix.c

index ac1d17cd6c53278d510ae81c28d033d43208d461..af7aa00512f2351f35d9c021de16976adf8ad4ea 100644 (file)
@@ -198,7 +198,7 @@ store_colortable_entries(GLcontext *ctx, struct gl_color_table *table,
       GLfloat *tableF;
       GLint i;
 
-      _mesa_unpack_float_color_span(ctx,
+      _mesa_unpack_color_span_float(ctx,
                                    count,          /* number of pixels */
                                    table->Format,  /* dest format */
                                     tempTab,        /* dest address */
@@ -261,7 +261,7 @@ store_colortable_entries(GLcontext *ctx, struct gl_color_table *table,
       /* non-float (GLchan) */
       const GLint comps = _mesa_components_in_format(table->Format);
       GLchan *dest = (GLchan *) table->Table + start * comps;
-      _mesa_unpack_chan_color_span(ctx, count,         /* number of entries */
+      _mesa_unpack_color_span_chan(ctx, count,         /* number of entries */
                                   table->Format,      /* dest format */
                                   dest,               /* dest address */
                                    format, type, data, /* src data */
@@ -862,7 +862,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
          return;
    }
 
-   _mesa_pack_rgba_span(ctx, table->Size, (const GLchan (*)[4]) rgba,
+   _mesa_pack_rgba_span_chan(ctx, table->Size, (const GLchan (*)[4]) rgba,
                         format, type, data, &ctx->Pack, GL_FALSE);
 }
 
index e6b19fabd42a477b2bdff24a2c36168a1c239c86..edb02482b399526d644678fb98254d97d2f12727 100644 (file)
@@ -143,7 +143,7 @@ _mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, G
    ctx->Convolution1D.Height = 1;
 
    /* unpack filter image */
-   _mesa_unpack_float_color_span(ctx, width, GL_RGBA,
+   _mesa_unpack_color_span_float(ctx, width, GL_RGBA,
                                  ctx->Convolution1D.Filter,
                                  format, type, image, &ctx->Unpack,
                                  0, GL_FALSE);
@@ -227,7 +227,7 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, G
       const GLvoid *src = _mesa_image_address(&ctx->Unpack, image, width,
                                               height, format, type, 0, i, 0);
       GLfloat *dst = ctx->Convolution2D.Filter + i * width * 4;
-      _mesa_unpack_float_color_span(ctx, width, GL_RGBA, dst,
+      _mesa_unpack_color_span_float(ctx, width, GL_RGBA, dst,
                                     format, type, src, &ctx->Unpack,
                                     0, GL_FALSE);
    }
@@ -563,7 +563,7 @@ _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *im
                                          filter->Height, format, type,
                                          0, row, 0);
       const GLfloat *src = filter->Filter + row * filter->Width * 4;
-      _mesa_pack_float_rgba_span(ctx, filter->Width,
+      _mesa_pack_rgba_span_float(ctx, filter->Width,
                                  (const GLfloat (*)[4]) src,
                                  format, type, dst, &ctx->Pack, 0);
    }
@@ -739,7 +739,7 @@ _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row,
       GLvoid *dst = _mesa_image_address( &ctx->Pack, row, filter->Width,
                                          filter->Height, format, type,
                                          0, 0, 0);
-      _mesa_pack_float_rgba_span(ctx, filter->Width,
+      _mesa_pack_rgba_span_float(ctx, filter->Width,
                                  (const GLfloat (*)[4]) filter->Filter,
                                  format, type, dst, &ctx->Pack, 0);
    }
@@ -750,7 +750,7 @@ _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row,
                                          1, format, type,
                                          0, 0, 0);
       const GLfloat *src = filter->Filter + colStart;
-      _mesa_pack_float_rgba_span(ctx, filter->Height,
+      _mesa_pack_rgba_span_float(ctx, filter->Height,
                                  (const GLfloat (*)[4]) src,
                                  format, type, dst, &ctx->Pack, 0);
    }
@@ -807,7 +807,7 @@ _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLs
    ctx->Separable2D.Height = height;
 
    /* unpack row filter */
-   _mesa_unpack_float_color_span(ctx, width, GL_RGBA,
+   _mesa_unpack_color_span_float(ctx, width, GL_RGBA,
                                  ctx->Separable2D.Filter,
                                  format, type, row, &ctx->Unpack,
                                  0, GL_FALSE);
@@ -834,7 +834,7 @@ _mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLs
    }
 
    /* unpack column filter */
-   _mesa_unpack_float_color_span(ctx, width, GL_RGBA,
+   _mesa_unpack_color_span_float(ctx, width, GL_RGBA,
                                  &ctx->Separable2D.Filter[colStart],
                                  format, type, column, &ctx->Unpack,
                                  0, GL_FALSE);
index f390a2dade9174408193fd6977d7285dee3b5b42..6c44ae6e9ea9ab3f84d098dc615d20914f20300c 100644 (file)
@@ -719,7 +719,7 @@ _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvo
       minmax[1][GCOMP] = CLAMP(ctx->MinMax.Max[GCOMP], 0.0F, 1.0F);
       minmax[1][BCOMP] = CLAMP(ctx->MinMax.Max[BCOMP], 0.0F, 1.0F);
       minmax[1][ACOMP] = CLAMP(ctx->MinMax.Max[ACOMP], 0.0F, 1.0F);
-      _mesa_pack_float_rgba_span(ctx, 2, (CONST GLfloat (*)[4]) minmax,
+      _mesa_pack_rgba_span_float(ctx, 2, (CONST GLfloat (*)[4]) minmax,
                                  format, type, values, &ctx->Pack, 0);
    }
 
index 9677faeef28bbab2117519bf8a131cf82ea396a3..23adb693b5a4c746b67f7e085f665e6892a6bcb8 100644 (file)
@@ -917,7 +917,7 @@ _mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
  * glGetConvolutionFilter(), etc.
  */
 void
-_mesa_pack_float_rgba_span( GLcontext *ctx,
+_mesa_pack_rgba_span_float( GLcontext *ctx,
                             GLuint n, CONST GLfloat rgbaIn[][4],
                             GLenum dstFormat, GLenum dstType,
                             GLvoid *dstAddr,
@@ -1897,7 +1897,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx,
          }
          break;
       default:
-         _mesa_problem(ctx, "bad type in _mesa_pack_float_rgba_span");
+         _mesa_problem(ctx, "bad type in _mesa_pack_rgba_span_float");
    }
 }
 
@@ -1918,7 +1918,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx,
  *         transferOps - bitmask of IMAGE_*_BIT operations to apply
  */
 void
-_mesa_pack_rgba_span( GLcontext *ctx,
+_mesa_pack_rgba_span_chan( GLcontext *ctx,
                       GLuint n, CONST GLchan srcRgba[][4],
                       GLenum dstFormat, GLenum dstType,
                       GLvoid *dstAddr,
@@ -1969,7 +1969,7 @@ _mesa_pack_rgba_span( GLcontext *ctx,
          rgba[i][BCOMP] = CHAN_TO_FLOAT(srcRgba[i][BCOMP]);
          rgba[i][ACOMP] = CHAN_TO_FLOAT(srcRgba[i][ACOMP]);
       }
-      _mesa_pack_float_rgba_span(ctx, n, (const GLfloat (*)[4]) rgba,
+      _mesa_pack_rgba_span_float(ctx, n, (const GLfloat (*)[4]) rgba,
                                  dstFormat, dstType, dstAddr,
                                  dstPacking, transferOps);
       UNDEFARRAY(rgba);  /* mac 32k limitation */
@@ -2701,7 +2701,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
  * XXX perhaps expand this to process whole images someday.
  */
 void
-_mesa_unpack_chan_color_span( GLcontext *ctx,
+_mesa_unpack_color_span_chan( GLcontext *ctx,
                               GLuint n, GLenum dstFormat, GLchan dest[],
                               GLenum srcFormat, GLenum srcType,
                               const GLvoid *source,
@@ -3095,7 +3095,7 @@ _mesa_unpack_chan_color_span( GLcontext *ctx,
 
 
 void
-_mesa_unpack_float_color_span( GLcontext *ctx,
+_mesa_unpack_color_span_float( GLcontext *ctx,
                                GLuint n, GLenum dstFormat, GLfloat dest[],
                                GLenum srcFormat, GLenum srcType,
                                const GLvoid *source,
@@ -3302,7 +3302,7 @@ _mesa_unpack_float_color_span( GLcontext *ctx,
             dstLuminanceIndex = dstIntensityIndex = -1;
             break;
          default:
-            _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_float_color_span()");
+            _mesa_problem(ctx, "bad dstFormat in _mesa_unpack_color_span_float()");
             UNDEFARRAY(rgba);  /* mac 32k limitation */
             return;
       }
index 6c8b342ba517714067707a4ae60da325ab69625d..81d74a48479af906b0a5c2feef2b860538387da7 100644 (file)
@@ -97,7 +97,7 @@ _mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
 
 
 extern void
-_mesa_pack_float_rgba_span( GLcontext *ctx,
+_mesa_pack_rgba_span_float( GLcontext *ctx,
                             GLuint n, CONST GLfloat rgba[][4],
                             GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
                             const struct gl_pixelstore_attrib *dstPacking,
@@ -105,7 +105,7 @@ _mesa_pack_float_rgba_span( GLcontext *ctx,
 
 
 extern void
-_mesa_pack_rgba_span( GLcontext *ctx,
+_mesa_pack_rgba_span_chan( GLcontext *ctx,
                       GLuint n, CONST GLchan rgba[][4],
                       GLenum dstFormat, GLenum dstType, GLvoid *dstAddr,
                       const struct gl_pixelstore_attrib *dstPacking,
@@ -113,7 +113,7 @@ _mesa_pack_rgba_span( GLcontext *ctx,
 
 
 extern void
-_mesa_unpack_chan_color_span( GLcontext *ctx,
+_mesa_unpack_color_span_chan( GLcontext *ctx,
                               GLuint n, GLenum dstFormat, GLchan dest[],
                               GLenum srcFormat, GLenum srcType,
                               const GLvoid *source,
@@ -122,7 +122,7 @@ _mesa_unpack_chan_color_span( GLcontext *ctx,
 
 
 extern void
-_mesa_unpack_float_color_span( GLcontext *ctx,
+_mesa_unpack_color_span_float( GLcontext *ctx,
                                GLuint n, GLenum dstFormat, GLfloat dest[],
                                GLenum srcFormat, GLenum srcType,
                                const GLvoid *source,
index ad7e20ce0fe1e42201bacf2e36cfdca26210a2dd..2388ba3a5af2568290ad54da8110019eb4d1c3dd 100644 (file)
@@ -1954,7 +1954,7 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
                for (col = 0; col < width; col++) {
                   (*texImage->FetchTexelc)(texImage, col, row, img, rgba[col]);
                }
-               _mesa_pack_rgba_span(ctx, width, (const GLchan (*)[4])rgba,
+               _mesa_pack_rgba_span_chan(ctx, width, (const GLchan (*)[4])rgba,
                                     format, type, dest, &ctx->Pack,
                                     0 /* no image transfer */);
             } /* format */
index 97040487f646ff0a9b7bbb9204c3040335b7fb8e..61bbc10bf67883817bdec33cae63dbfce45204a0 100644 (file)
@@ -359,7 +359,7 @@ transfer_teximage(GLcontext *ctx, GLuint dimensions,
                const GLvoid *src = _mesa_image_address(srcPacking,
                                               srcAddr, srcWidth, srcHeight,
                                               srcFormat, srcType, img, row, 0);
-               _mesa_unpack_float_color_span(ctx, srcWidth, GL_RGBA, dstf,
+               _mesa_unpack_color_span_float(ctx, srcWidth, GL_RGBA, dstf,
                          srcFormat, srcType, src, srcPacking,
                          transferOps & IMAGE_PRE_CONVOLUTION_BITS,
                          GL_TRUE);
@@ -389,7 +389,7 @@ transfer_teximage(GLcontext *ctx, GLuint dimensions,
                  + (dstZoffset + img) * (dstImageStride / sizeof(GLchan))
                  + dstYoffset * (dstRowStride / sizeof(GLchan));
             for (row = 0; row < convHeight; row++) {
-               _mesa_pack_float_rgba_span(ctx, convWidth,
+               _mesa_pack_rgba_span_float(ctx, convWidth,
                                           (const GLfloat (*)[4]) srcf,
                                           texDestFormat, CHAN_TYPE,
                                           dest, &_mesa_native_packing,
@@ -418,7 +418,7 @@ transfer_teximage(GLcontext *ctx, GLuint dimensions,
                const GLvoid *srcRow = _mesa_image_address(srcPacking,
                                               srcAddr, srcWidth, srcHeight,
                                               srcFormat, srcType, img, row, 0);
-               _mesa_unpack_chan_color_span(ctx, srcWidth, texDestFormat,
+               _mesa_unpack_color_span_chan(ctx, srcWidth, texDestFormat,
                                        destRow, srcFormat, srcType, srcRow,
                                        srcPacking, transferOps);
                destRow += (dstRowStride / sizeof(GLchan));
index 5d4093f32c003fb93b93119e5e444720d4778f70..cc2564f6c590930b7d77df0d1b165a15c1b5b61f 100644 (file)
@@ -802,7 +802,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
       for (row = 0; row < height; row++) {
          const GLvoid *source = _mesa_image_address(unpack,
                   pixels, width, height, format, type, 0, row, 0);
-         _mesa_unpack_float_color_span(ctx, width, GL_RGBA, (GLfloat *) dest,
+         _mesa_unpack_color_span_float(ctx, width, GL_RGBA, (GLfloat *) dest,
                                       format, type, source, unpack,
                                       transferOps & IMAGE_PRE_CONVOLUTION_BITS,
                                       GL_FALSE);
@@ -856,7 +856,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
             span.arrayMask = arrayMask;
             span.interpMask = interpMask;
 
-            _mesa_unpack_chan_color_span(ctx, span.end, GL_RGBA,
+            _mesa_unpack_color_span_chan(ctx, span.end, GL_RGBA,
                                          (GLchan *) span.array->rgba,
                                          format, type, source, unpack,
                                          transferOps);
index f2b91e0528259f9954f865179d4627e9bee4223d..7c2ce364913c660ac05536c92f1e469d5091245e 100644 (file)
@@ -409,7 +409,7 @@ read_rgba_pixels( GLcontext *ctx,
             }
             _mesa_map_ci_to_rgba_chan(ctx, readWidth, index, rgba);
          }
-         _mesa_pack_rgba_span(ctx, readWidth, (const GLchan (*)[4]) rgba,
+         _mesa_pack_rgba_span_chan(ctx, readWidth, (const GLchan (*)[4]) rgba,
                               GL_RGBA, GL_FLOAT, dest, &_mesa_native_packing,
                               transferOps & IMAGE_PRE_CONVOLUTION_BITS);
          dest += width * 4;
@@ -431,7 +431,7 @@ read_rgba_pixels( GLcontext *ctx,
          GLvoid *dest;
          dest = _mesa_image_address(packing, pixels, readWidth, height,
                                     format, type, 0, row, 0);
-         _mesa_pack_float_rgba_span(ctx, readWidth,
+         _mesa_pack_rgba_span_float(ctx, readWidth,
                                     (const GLfloat (*)[4]) src,
                                     format, type, dest, packing,
                                     transferOps & IMAGE_POST_CONVOLUTION_BITS);
@@ -468,7 +468,7 @@ read_rgba_pixels( GLcontext *ctx,
             CHECKARRAY(rgbaf, return);  /* mac 32k limitation */
             _mesa_chan_to_float_span(ctx, readWidth,
                                      (CONST GLchan (*)[4]) rgba, rgbaf);
-            _mesa_pack_float_rgba_span(ctx, readWidth,
+            _mesa_pack_rgba_span_float(ctx, readWidth,
                                        (CONST GLfloat (*)[4]) rgbaf,
                                        format, type, dst, packing,
                                        ctx->_ImageTransferState);
@@ -476,7 +476,7 @@ read_rgba_pixels( GLcontext *ctx,
          }
          else {
             /* GLubytes are fine */
-            _mesa_pack_rgba_span(ctx, readWidth, (CONST GLchan (*)[4]) rgba,
+            _mesa_pack_rgba_span_chan(ctx, readWidth, (CONST GLchan (*)[4]) rgba,
                                  format, type, dst, packing,
                                  ctx->_ImageTransferState);
          }