summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-09-30 21:00:16 -0600
committerBrian Paul <brianp@vmware.com>2009-09-30 21:00:16 -0600
commit3fa7dbf368bb060220e9f78e666b00d6827166a6 (patch)
tree83cf26eb834b50f174c496fc4467db65bdba9e48 /src/mesa/main
parent74ae14a2bde4f87a554c3d96e6f4a9a02591308d (diff)
mesa: remove GLchan-based formats; use hw 8-bit/channel formats instead
Removed: MESA_FORMAT_RGBA, RGB, ALPHA, LUMINANCE, LUMINANCE_ALPHA, INTENSITY.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/formats.c48
-rw-r--r--src/mesa/main/formats.h13
-rw-r--r--src/mesa/main/mipmap.c4
-rw-r--r--src/mesa/main/texfetch.c42
-rw-r--r--src/mesa/main/texformat.c37
-rw-r--r--src/mesa/main/texformat_tmp.h146
-rw-r--r--src/mesa/main/texstore.c164
7 files changed, 9 insertions, 445 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 2ad5685883..f915b1da91 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -402,54 +402,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
#endif
{
- MESA_FORMAT_RGBA,
- GL_RGBA,
- GL_UNSIGNED_NORMALIZED,
- CHAN_BITS, CHAN_BITS, CHAN_BITS, CHAN_BITS,
- 0, 0, 0, 0, 0,
- 1, 1, 4 * CHAN_BITS / 8
- },
- {
- MESA_FORMAT_RGB,
- GL_RGB,
- GL_UNSIGNED_NORMALIZED,
- CHAN_BITS, CHAN_BITS, CHAN_BITS, 0,
- 0, 0, 0, 0, 0,
- 1, 1, 3 * CHAN_BITS / 8
- },
- {
- MESA_FORMAT_ALPHA,
- GL_ALPHA,
- GL_UNSIGNED_NORMALIZED,
- 0, 0, 0, CHAN_BITS,
- 0, 0, 0, 0, 0,
- 1, 1, 1 * CHAN_BITS / 8
- },
- {
- MESA_FORMAT_LUMINANCE,
- GL_LUMINANCE,
- GL_UNSIGNED_NORMALIZED,
- 0, 0, 0, 0,
- CHAN_BITS, 0, 0, 0, 0,
- 1, 1, 1 * CHAN_BITS / 8
- },
- {
- MESA_FORMAT_LUMINANCE_ALPHA,
- GL_LUMINANCE_ALPHA,
- GL_UNSIGNED_NORMALIZED,
- 0, 0, 0, CHAN_BITS,
- CHAN_BITS, 0, 0, 0, 0,
- 1, 1, 2 * CHAN_BITS / 8
- },
- {
- MESA_FORMAT_INTENSITY,
- GL_INTENSITY,
- GL_UNSIGNED_NORMALIZED,
- 0, 0, 0, 0,
- 0, CHAN_BITS, 0, 0, 0,
- 1, 1, 1 * CHAN_BITS / 8
- },
- {
MESA_FORMAT_RGBA_FLOAT32,
GL_RGBA,
GL_FLOAT,
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index dbde28e727..9235828a0f 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -43,6 +43,7 @@
typedef enum
{
MESA_FORMAT_NONE = 0,
+
/**
* \name Basic hardware formats
*/
@@ -115,18 +116,6 @@ typedef enum
/*@}*/
/**
- * \name Generic GLchan-based formats. (XXX obsolete!)
- */
- /*@{*/
- MESA_FORMAT_RGBA,
- MESA_FORMAT_RGB,
- MESA_FORMAT_ALPHA,
- MESA_FORMAT_LUMINANCE,
- MESA_FORMAT_LUMINANCE_ALPHA,
- MESA_FORMAT_INTENSITY,
- /*@}*/
-
- /**
* \name Floating point texture formats.
*/
/*@{*/
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 7e99a5d3de..ccd153303d 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1521,11 +1521,11 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
texObj->Target == GL_TEXTURE_CUBE_MAP_ARB);
if (srcImage->_BaseFormat == GL_RGB) {
- convertFormat = MESA_FORMAT_RGB;
+ convertFormat = MESA_FORMAT_RGB888;
components = 3;
}
else if (srcImage->_BaseFormat == GL_RGBA) {
- convertFormat = MESA_FORMAT_RGBA;
+ convertFormat = MESA_FORMAT_RGBA8888;
components = 4;
}
else {
diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c
index 20ee2527f5..8149166560 100644
--- a/src/mesa/main/texfetch.c
+++ b/src/mesa/main/texfetch.c
@@ -128,48 +128,6 @@ static struct {
texfetch_funcs[MESA_FORMAT_COUNT] =
{
{
- MESA_FORMAT_RGBA,
- fetch_texel_1d_f_rgba,
- fetch_texel_2d_f_rgba,
- fetch_texel_3d_f_rgba,
- store_texel_rgba
- },
- {
- MESA_FORMAT_RGB,
- fetch_texel_1d_f_rgb,
- fetch_texel_2d_f_rgb,
- fetch_texel_3d_f_rgb,
- store_texel_rgb
- },
- {
- MESA_FORMAT_ALPHA,
- fetch_texel_1d_f_alpha,
- fetch_texel_2d_f_alpha,
- fetch_texel_3d_f_alpha,
- store_texel_alpha
- },
- {
- MESA_FORMAT_LUMINANCE,
- fetch_texel_1d_f_luminance,
- fetch_texel_2d_f_luminance,
- fetch_texel_3d_f_luminance,
- store_texel_luminance
- },
- {
- MESA_FORMAT_LUMINANCE_ALPHA,
- fetch_texel_1d_f_luminance_alpha,
- fetch_texel_2d_f_luminance_alpha,
- fetch_texel_3d_f_luminance_alpha,
- store_texel_luminance_alpha
- },
- {
- MESA_FORMAT_INTENSITY,
- fetch_texel_1d_f_intensity,
- fetch_texel_2d_f_intensity,
- fetch_texel_3d_f_intensity,
- store_texel_intensity
- },
- {
MESA_FORMAT_SRGB8,
fetch_texel_1d_srgb8,
fetch_texel_2d_srgb8,
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index bee7f583cf..b1ae324050 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -69,7 +69,6 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_RGB10_A2:
case GL_RGBA12:
case GL_RGBA16:
- return MESA_FORMAT_RGBA;
case GL_RGBA8:
return MESA_FORMAT_RGBA8888;
case GL_RGB5_A1:
@@ -85,7 +84,6 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_RGB10:
case GL_RGB12:
case GL_RGB16:
- return MESA_FORMAT_RGB;
case GL_RGB8:
return MESA_FORMAT_RGB888;
case GL_R3_G3_B2:
@@ -100,7 +98,6 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_ALPHA4:
case GL_ALPHA12:
case GL_ALPHA16:
- return MESA_FORMAT_ALPHA;
case GL_ALPHA8:
return MESA_FORMAT_A8;
@@ -110,7 +107,6 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_LUMINANCE4:
case GL_LUMINANCE12:
case GL_LUMINANCE16:
- return MESA_FORMAT_LUMINANCE;
case GL_LUMINANCE8:
return MESA_FORMAT_L8;
@@ -122,7 +118,6 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_LUMINANCE12_ALPHA4:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
- return MESA_FORMAT_LUMINANCE_ALPHA;
case GL_LUMINANCE8_ALPHA8:
return MESA_FORMAT_AL88;
@@ -130,7 +125,6 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
case GL_INTENSITY4:
case GL_INTENSITY12:
case GL_INTENSITY16:
- return MESA_FORMAT_INTENSITY;
case GL_INTENSITY8:
return MESA_FORMAT_I8;
@@ -162,13 +156,13 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_COMPRESSED_ALPHA_ARB:
- return MESA_FORMAT_ALPHA;
+ return MESA_FORMAT_A8;
case GL_COMPRESSED_LUMINANCE_ARB:
- return MESA_FORMAT_LUMINANCE;
+ return MESA_FORMAT_L8;
case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
- return MESA_FORMAT_LUMINANCE_ALPHA;
+ return MESA_FORMAT_AL88;
case GL_COMPRESSED_INTENSITY_ARB:
- return MESA_FORMAT_INTENSITY;
+ return MESA_FORMAT_I8;
case GL_COMPRESSED_RGB_ARB:
#if FEATURE_texture_fxt1
if (ctx->Extensions.TDFX_texture_compression_FXT1)
@@ -179,7 +173,7 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
ctx->Extensions.S3_s3tc)
return MESA_FORMAT_RGB_DXT1;
#endif
- return MESA_FORMAT_RGB;
+ return MESA_FORMAT_RGB888;
case GL_COMPRESSED_RGBA_ARB:
#if FEATURE_texture_fxt1
if (ctx->Extensions.TDFX_texture_compression_FXT1)
@@ -190,7 +184,7 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
ctx->Extensions.S3_s3tc)
return MESA_FORMAT_RGBA_DXT3; /* Not rgba_dxt1, see spec */
#endif
- return MESA_FORMAT_RGBA;
+ return MESA_FORMAT_RGBA8888;
default:
; /* fallthrough */
}
@@ -504,25 +498,6 @@ _mesa_format_to_type_and_comps(gl_format format,
return;
#endif
- case MESA_FORMAT_RGBA:
- *datatype = CHAN_TYPE;
- *comps = 4;
- return;
- case MESA_FORMAT_RGB:
- *datatype = CHAN_TYPE;
- *comps = 3;
- return;
- case MESA_FORMAT_LUMINANCE_ALPHA:
- *datatype = CHAN_TYPE;
- *comps = 2;
- return;
- case MESA_FORMAT_ALPHA:
- case MESA_FORMAT_LUMINANCE:
- case MESA_FORMAT_INTENSITY:
- *datatype = CHAN_TYPE;
- *comps = 1;
- return;
-
case MESA_FORMAT_RGBA_FLOAT32:
*datatype = GL_FLOAT;
*comps = 4;
diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h
index cb8386bbc8..939c4d0776 100644
--- a/src/mesa/main/texformat_tmp.h
+++ b/src/mesa/main/texformat_tmp.h
@@ -70,152 +70,6 @@
#endif
-/* MESA_FORMAT_RGBA **********************************************************/
-
-/* Fetch texel from 1D, 2D or 3D RGBA texture, returning 4 GLfloats */
-static void FETCH(f_rgba)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 4);
- texel[RCOMP] = CHAN_TO_FLOAT(src[0]);
- texel[GCOMP] = CHAN_TO_FLOAT(src[1]);
- texel[BCOMP] = CHAN_TO_FLOAT(src[2]);
- texel[ACOMP] = CHAN_TO_FLOAT(src[3]);
-}
-
-#if DIM == 3
-/* Store a GLchan RGBA texel */
-static void store_texel_rgba(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 4);
- dst[0] = rgba[RCOMP];
- dst[1] = rgba[GCOMP];
- dst[2] = rgba[BCOMP];
- dst[3] = rgba[ACOMP];
-}
-#endif
-
-/* MESA_FORMAT_RGB ***********************************************************/
-
-/* Fetch texel from 1D, 2D or 3D RGB texture, returning 4 GLfloats */
-static void FETCH(f_rgb)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 3);
- texel[RCOMP] = CHAN_TO_FLOAT(src[0]);
- texel[GCOMP] = CHAN_TO_FLOAT(src[1]);
- texel[BCOMP] = CHAN_TO_FLOAT(src[2]);
- texel[ACOMP] = 1.0F;
-}
-
-#if DIM == 3
-static void store_texel_rgb(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 3);
- dst[0] = rgba[RCOMP];
- dst[1] = rgba[GCOMP];
- dst[2] = rgba[BCOMP];
-}
-#endif
-
-/* MESA_FORMAT_ALPHA *********************************************************/
-
-/* Fetch texel from 1D, 2D or 3D ALPHA texture, returning 4 GLchans */
-static void FETCH(f_alpha)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = 0.0F;
- texel[ACOMP] = CHAN_TO_FLOAT(src[0]);
-}
-
-#if DIM == 3
-static void store_texel_alpha(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- dst[0] = rgba[ACOMP];
-}
-#endif
-
-/* MESA_FORMAT_LUMINANCE *****************************************************/
-
-/* Fetch texel from 1D, 2D or 3D LUMIN texture, returning 4 GLchans */
-static void FETCH(f_luminance)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = CHAN_TO_FLOAT(src[0]);
- texel[ACOMP] = 1.0F;
-}
-
-#if DIM == 3
-static void store_texel_luminance(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- dst[0] = rgba[RCOMP];
-}
-#endif
-
-/* MESA_FORMAT_LUMINANCE_ALPHA ***********************************************/
-
-/* Fetch texel from 1D, 2D or 3D L_A texture, returning 4 GLchans */
-static void FETCH(f_luminance_alpha)(const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel)
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 2);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] = CHAN_TO_FLOAT(src[0]);
- texel[ACOMP] = CHAN_TO_FLOAT(src[1]);
-}
-
-#if DIM == 3
-static void store_texel_luminance_alpha(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 2);
- dst[0] = rgba[RCOMP];
- dst[1] = rgba[ACOMP];
-}
-#endif
-
-/* MESA_FORMAT_INTENSITY *****************************************************/
-
-/* Fetch texel from 1D, 2D or 3D INT. texture, returning 4 GLchans */
-static void FETCH(f_intensity)( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
-{
- const GLchan *src = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- texel[RCOMP] =
- texel[GCOMP] =
- texel[BCOMP] =
- texel[ACOMP] = CHAN_TO_FLOAT(src[0]);
-}
-
-#if DIM == 3
-static void store_texel_intensity(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLchan *rgba = (const GLchan *) texel;
- GLchan *dst = TEXEL_ADDR(GLchan, texImage, i, j, k, 1);
- dst[0] = rgba[RCOMP];
-}
-#endif
-
-
/* MESA_FORMAT_Z32 ***********************************************************/
/* Fetch depth texel from 1D, 2D or 3D 32-bit depth texture,
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index d5bc16dee4..56d6c63906 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1005,164 +1005,6 @@ memcpy_texture(GLcontext *ctx,
/**
- * Store an image in any of the formats:
- * _mesa_texformat_rgba
- * _mesa_texformat_rgb
- * _mesa_texformat_alpha
- * _mesa_texformat_luminance
- * _mesa_texformat_luminance_alpha
- * _mesa_texformat_intensity
- *
- */
-static GLboolean
-_mesa_texstore_rgba(TEXSTORE_PARAMS)
-{
- const GLint components = _mesa_components_in_format(baseInternalFormat);
- const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
- const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
-
- ASSERT(dstFormat == MESA_FORMAT_RGBA ||
- dstFormat == MESA_FORMAT_RGB ||
- dstFormat == MESA_FORMAT_ALPHA ||
- dstFormat == MESA_FORMAT_LUMINANCE ||
- dstFormat == MESA_FORMAT_LUMINANCE_ALPHA ||
- dstFormat == MESA_FORMAT_INTENSITY);
- ASSERT(baseInternalFormat == GL_RGBA ||
- baseInternalFormat == GL_RGB ||
- baseInternalFormat == GL_ALPHA ||
- baseInternalFormat == GL_LUMINANCE ||
- baseInternalFormat == GL_LUMINANCE_ALPHA ||
- baseInternalFormat == GL_INTENSITY);
- ASSERT(texelBytes == components * sizeof(GLchan));
-
- if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
- baseInternalFormat == srcFormat &&
- srcType == CHAN_TYPE) {
- /* simple memcpy path */
- memcpy_texture(ctx, dims,
- dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
- dstRowStride,
- dstImageOffsets,
- srcWidth, srcHeight, srcDepth, srcFormat, srcType,
- srcAddr, srcPacking);
- }
- else if (!ctx->_ImageTransferState &&
- !srcPacking->SwapBytes &&
- dstFormat == MESA_FORMAT_RGB &&
- srcFormat == GL_RGBA &&
- srcType == CHAN_TYPE) {
- /* extract RGB from RGBA */
- GLint img, row, col;
- for (img = 0; img < srcDepth; img++) {
- GLchan *dstImage = (GLchan *)
- ((GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * texelBytes
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes);
-
- const GLint srcRowStride = _mesa_image_row_stride(srcPacking,
- srcWidth, srcFormat, srcType);
- GLchan *srcRow = (GLchan *) _mesa_image_address(dims, srcPacking,
- srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
- GLchan *dstRow = dstImage;
- for (row = 0; row < srcHeight; row++) {
- for (col = 0; col < srcWidth; col++) {
- dstRow[col * 3 + RCOMP] = srcRow[col * 4 + RCOMP];
- dstRow[col * 3 + GCOMP] = srcRow[col * 4 + GCOMP];
- dstRow[col * 3 + BCOMP] = srcRow[col * 4 + BCOMP];
- }
- dstRow += dstRowStride / sizeof(GLchan);
- srcRow = (GLchan *) ((GLubyte *) srcRow + srcRowStride);
- }
- }
- }
- else if (!ctx->_ImageTransferState &&
- CHAN_TYPE == GL_UNSIGNED_BYTE &&
- (srcType == GL_UNSIGNED_BYTE ||
- srcType == GL_UNSIGNED_INT_8_8_8_8 ||
- srcType == GL_UNSIGNED_INT_8_8_8_8_REV) &&
- can_swizzle(baseInternalFormat) &&
- can_swizzle(srcFormat)) {
-
- const GLubyte *dstmap;
- GLuint components;
-
- /* dstmap - how to swizzle from RGBA to dst format:
- */
- if (dstFormat == MESA_FORMAT_RGBA) {
- dstmap = mappings[IDX_RGBA].from_rgba;
- components = 4;
- }
- else if (dstFormat == MESA_FORMAT_RGB) {
- dstmap = mappings[IDX_RGB].from_rgba;
- components = 3;
- }
- else if (dstFormat == MESA_FORMAT_ALPHA) {
- dstmap = mappings[IDX_ALPHA].from_rgba;
- components = 1;
- }
- else if (dstFormat == MESA_FORMAT_LUMINANCE) {
- dstmap = mappings[IDX_LUMINANCE].from_rgba;
- components = 1;
- }
- else if (dstFormat == MESA_FORMAT_LUMINANCE_ALPHA) {
- dstmap = mappings[IDX_LUMINANCE_ALPHA].from_rgba;
- components = 2;
- }
- else if (dstFormat == MESA_FORMAT_INTENSITY) {
- dstmap = mappings[IDX_INTENSITY].from_rgba;
- components = 1;
- }
- else {
- _mesa_problem(ctx, "Unexpected dstFormat in _mesa_texstore_rgba");
- return GL_FALSE;
- }
-
- _mesa_swizzle_ubyte_image(ctx, dims,
- srcFormat,
- srcType,
- baseInternalFormat,
- dstmap, components,
- dstAddr, dstXoffset, dstYoffset, dstZoffset,
- dstRowStride, dstImageOffsets,
- srcWidth, srcHeight, srcDepth, srcAddr,
- srcPacking);
- }
- else {
- /* general path */
- const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
- baseInternalFormat,
- baseFormat,
- srcWidth, srcHeight, srcDepth,
- srcFormat, srcType, srcAddr,
- srcPacking);
- const GLchan *src = tempImage;
- GLint bytesPerRow;
- GLint img, row;
- if (!tempImage)
- return GL_FALSE;
- _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight);
- bytesPerRow = srcWidth * components * sizeof(GLchan);
- for (img = 0; img < srcDepth; img++) {
- GLubyte *dstRow = (GLubyte *) dstAddr
- + dstImageOffsets[dstZoffset + img] * texelBytes
- + dstYoffset * dstRowStride
- + dstXoffset * texelBytes;
- for (row = 0; row < srcHeight; row++) {
- _mesa_memcpy(dstRow, src, bytesPerRow);
- dstRow += dstRowStride;
- src += srcWidth * components;
- }
- }
-
- _mesa_free((void *) tempImage);
- }
- return GL_TRUE;
-}
-
-
-/**
* Store a 32-bit integer depth component texture image.
*/
static GLboolean
@@ -3230,12 +3072,6 @@ texstore_funcs[MESA_FORMAT_COUNT] =
{ MESA_FORMAT_RGBA_DXT1, _mesa_texstore_rgba_dxt1 },
{ MESA_FORMAT_RGBA_DXT3, _mesa_texstore_rgba_dxt3 },
{ MESA_FORMAT_RGBA_DXT5, _mesa_texstore_rgba_dxt5 },
- { MESA_FORMAT_RGBA, _mesa_texstore_rgba },
- { MESA_FORMAT_RGB, _mesa_texstore_rgba },
- { MESA_FORMAT_ALPHA, _mesa_texstore_rgba },
- { MESA_FORMAT_LUMINANCE, _mesa_texstore_rgba },
- { MESA_FORMAT_LUMINANCE_ALPHA, _mesa_texstore_rgba },
- { MESA_FORMAT_INTENSITY, _mesa_texstore_rgba },
{ MESA_FORMAT_RGBA_FLOAT32, _mesa_texstore_rgba_float32 },
{ MESA_FORMAT_RGBA_FLOAT16, _mesa_texstore_rgba_float16 },
{ MESA_FORMAT_RGB_FLOAT32, _mesa_texstore_rgba_float32 },