mesa: remove MESA_FORMAT_RGBA4444
authorBrian Paul <brianp@vmware.com>
Thu, 1 Oct 2009 03:04:14 +0000 (21:04 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 1 Oct 2009 03:04:17 +0000 (21:04 -0600)
Not used by any hardware driver.  ARGB4444 and ARGB4444_REV remain.

src/mesa/main/formats.c
src/mesa/main/formats.h
src/mesa/main/texfetch.c
src/mesa/main/texformat_tmp.h
src/mesa/main/texstore.c

index f915b1da91a95856651648055c72910c04cd2119..dec3daee7cdfc8f190f295617284b3730ce69553 100644 (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 */
index 9235828a0f77603222a567ec64e795629776faad..99a6534ff1bc63b07f01bbe4654eead9764c816d 100644 (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 */
index 8149166560e26ab98cc4079e8799527073eede81..3cc424fdc83fc052ed81c4f5a4eaafd8b67955b0 100644 (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,
index 939c4d0776753da3d9b9426910304602c5cfb691..199849d6ac16e251c9136d5808bdef41774d8fae 100644 (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 ******************************************************/
 
index 56d6c6390639bd68a898f010b139ba54e5195ad4..48bee88e0ff9d28378c4fa6e3c29b6a34b70dfee 100644 (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 },