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 */
/* 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 */
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);
}
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);
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);
}
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);
}
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);
}
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);
}
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);
}
/* 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);
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);
}
* 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,
}
break;
default:
- _mesa_problem(ctx, "bad type in _mesa_pack_float_rgba_span");
+ _mesa_problem(ctx, "bad type in _mesa_pack_rgba_span_float");
}
}
* 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,
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 */
* 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,
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,
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;
}
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,
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,
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,
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,
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 */
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);
+ (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,
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));
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);
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);
}
_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;
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);
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);
}
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);
}