mesa: remove MESA_FORMAT_RGBA4444

Not used by any hardware driver.  ARGB4444 and ARGB4444_REV remain.
This commit is contained in:
Brian Paul
2009-09-30 21:04:14 -06:00
parent 3fa7dbf368
commit 60843e3ee5
5 changed files with 0 additions and 98 deletions
-8
View File
@@ -109,14 +109,6 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
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 */
-1
View File
@@ -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 */
-7
View File
@@ -393,13 +393,6 @@ texfetch_funcs[MESA_FORMAT_COUNT] =
fetch_texel_3d_f_rgb565_rev,
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,
-24
View File
@@ -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 ******************************************************/
-58
View File
@@ -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 },