diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/formats.c | 8 | ||||
-rw-r--r-- | src/mesa/main/formats.h | 1 | ||||
-rw-r--r-- | src/mesa/main/texfetch.c | 7 | ||||
-rw-r--r-- | src/mesa/main/texformat_tmp.h | 24 | ||||
-rw-r--r-- | src/mesa/main/texstore.c | 58 |
5 files changed, 0 insertions, 98 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index f915b1da91a..dec3daee7cd 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -110,14 +110,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 1, 1, 2 /* BlockWidth/Height,Bytes */ }, { - MESA_FORMAT_RGBA4444, /* Name */ - GL_RGBA, /* BaseFormat */ - GL_UNSIGNED_NORMALIZED, /* DataType */ - 4, 4, 4, 4, /* Red/Green/Blue/AlphaBits */ - 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */ - 1, 1, 2 /* BlockWidth/Height,Bytes */ - }, - { MESA_FORMAT_ARGB4444, /* Name */ GL_RGBA, /* BaseFormat */ GL_UNSIGNED_NORMALIZED, /* DataType */ diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h index 9235828a0f7..99a6534ff1b 100644 --- a/src/mesa/main/formats.h +++ b/src/mesa/main/formats.h @@ -58,7 +58,6 @@ typedef enum MESA_FORMAT_BGR888, /* BBBB BBBB GGGG GGGG RRRR RRRR */ MESA_FORMAT_RGB565, /* RRRR RGGG GGGB BBBB */ MESA_FORMAT_RGB565_REV, /* GGGB BBBB RRRR RGGG */ - MESA_FORMAT_RGBA4444, /* RRRR GGGG BBBB AAAA */ MESA_FORMAT_ARGB4444, /* AAAA RRRR GGGG BBBB */ MESA_FORMAT_ARGB4444_REV, /* GGGG BBBB AAAA RRRR */ MESA_FORMAT_RGBA5551, /* RRRR RGGG GGBB BBBA */ diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c index 8149166560e..3cc424fdc83 100644 --- a/src/mesa/main/texfetch.c +++ b/src/mesa/main/texfetch.c @@ -394,13 +394,6 @@ texfetch_funcs[MESA_FORMAT_COUNT] = store_texel_rgb565_rev }, { - MESA_FORMAT_RGBA4444, - fetch_texel_1d_f_rgba4444, - fetch_texel_2d_f_rgba4444, - fetch_texel_3d_f_rgba4444, - store_texel_rgba4444 - }, - { MESA_FORMAT_ARGB4444, fetch_texel_1d_f_argb4444, fetch_texel_2d_f_argb4444, diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h index 939c4d07767..199849d6ac1 100644 --- a/src/mesa/main/texformat_tmp.h +++ b/src/mesa/main/texformat_tmp.h @@ -641,30 +641,6 @@ static void store_texel_rgb565_rev(struct gl_texture_image *texImage, } #endif -/* MESA_FORMAT_RGBA4444 ******************************************************/ - -/* Fetch texel from 1D, 2D or 3D argb444 texture, return 4 GLchans */ -static void FETCH(f_rgba4444)( const struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, GLfloat *texel ) -{ - const GLushort *src = TEXEL_ADDR(GLushort, texImage, i, j, k, 1); - const GLushort s = *src; - texel[RCOMP] = ((s >> 12) & 0xf) * (1.0F / 15.0F); - texel[GCOMP] = ((s >> 8) & 0xf) * (1.0F / 15.0F); - texel[BCOMP] = ((s >> 4) & 0xf) * (1.0F / 15.0F); - texel[ACOMP] = ((s ) & 0xf) * (1.0F / 15.0F); -} - -#if DIM == 3 -static void store_texel_rgba4444(struct gl_texture_image *texImage, - GLint i, GLint j, GLint k, const void *texel) -{ - const GLubyte *rgba = (const GLubyte *) texel; - GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 1); - *dst = PACK_COLOR_4444(rgba[RCOMP], rgba[GCOMP], rgba[BCOMP], rgba[ACOMP]); -} -#endif - /* MESA_FORMAT_ARGB4444 ******************************************************/ diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 56d6c639063..48bee88e0ff 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -1766,63 +1766,6 @@ _mesa_texstore_bgr888(TEXSTORE_PARAMS) return GL_TRUE; } -static GLboolean -_mesa_texstore_rgba4444(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA4444); - ASSERT(texelBytes == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_RGBA4444 && - baseInternalFormat == GL_RGBA && - srcFormat == GL_RGBA && - srcType == GL_UNSIGNED_SHORT_4_4_4_4){ - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - 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 img, row, col; - if (!tempImage) - return GL_FALSE; - _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight); - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLushort *dstUS = (GLushort *) dstRow; - for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_4444( CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]), - CHAN_TO_UBYTE(src[ACOMP]) ); - src += 4; - } - dstRow += dstRowStride; - } - } - _mesa_free((void *) tempImage); - } - return GL_TRUE; -} static GLboolean _mesa_texstore_argb4444(TEXSTORE_PARAMS) @@ -3037,7 +2980,6 @@ texstore_funcs[MESA_FORMAT_COUNT] = { MESA_FORMAT_BGR888, _mesa_texstore_bgr888 }, { MESA_FORMAT_RGB565, _mesa_texstore_rgb565 }, { MESA_FORMAT_RGB565_REV, _mesa_texstore_rgb565 }, - { MESA_FORMAT_RGBA4444, _mesa_texstore_rgba4444 }, { MESA_FORMAT_ARGB4444, _mesa_texstore_argb4444 }, { MESA_FORMAT_ARGB4444_REV, _mesa_texstore_argb4444 }, { MESA_FORMAT_RGBA5551, _mesa_texstore_rgba5551 }, |