summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Cencora <m.cencora@gmail.com>2009-08-16 14:50:02 +0200
committerMaciej Cencora <m.cencora@gmail.com>2009-08-16 14:50:02 +0200
commitcc88658e40c144729df53796245735ee98b63ade (patch)
tree8099ddcd02243306d5f29f491639f4868ac8d731
parenta07f7bdd4c3cfb373d390967c955c49135f4e75f (diff)
mesa: remove RG16 and R16 texture formats
-rw-r--r--src/mesa/main/texformat.c78
-rw-r--r--src/mesa/main/texformat.h6
-rw-r--r--src/mesa/main/texformat_tmp.h65
-rw-r--r--src/mesa/main/texstore.c7
-rw-r--r--src/mesa/main/texstore.h2
5 files changed, 0 insertions, 158 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 0cf4ae8e21..dfe62e19be 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -1522,54 +1522,6 @@ const struct gl_texture_format _mesa_texformat_rg88_rev = {
store_texel_rg88_rev /* StoreTexel */
};
-const struct gl_texture_format _mesa_texformat_rg1616 = {
- MESA_FORMAT_RG1616, /* MesaFormat */
- GL_RG, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 16, /* RedBits */
- 16, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_rg1616, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rg1616, /* FetchTexel1Df */
- fetch_texel_2d_f_rg1616, /* FetchTexel2Df */
- fetch_texel_3d_f_rg1616, /* FetchTexel3Df */
- store_texel_rg1616 /* StoreTexel */
-};
-
-const struct gl_texture_format _mesa_texformat_rg1616_rev = {
- MESA_FORMAT_RG1616_REV, /* MesaFormat */
- GL_RG, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 16, /* RedBits */
- 16, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 4, /* TexelBytes */
- _mesa_texstore_rg1616, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_rg1616_rev, /* FetchTexel1Df */
- fetch_texel_2d_f_rg1616_rev, /* FetchTexel2Df */
- fetch_texel_3d_f_rg1616_rev, /* FetchTexel3Df */
- store_texel_rg1616_rev /* StoreTexel */
-};
-
const struct gl_texture_format _mesa_texformat_r8 = {
MESA_FORMAT_R8, /* MesaFormat */
GL_RED, /* BaseFormat */
@@ -1594,30 +1546,6 @@ const struct gl_texture_format _mesa_texformat_r8 = {
store_texel_r8 /* StoreTexel */
};
-const struct gl_texture_format _mesa_texformat_r16 = {
- MESA_FORMAT_R16, /* MesaFormat */
- GL_RED, /* BaseFormat */
- GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
- 16, /* RedBits */
- 0, /* GreenBits */
- 0, /* BlueBits */
- 0, /* AlphaBits */
- 0, /* LuminanceBits */
- 0, /* IntensityBits */
- 0, /* IndexBits */
- 0, /* DepthBits */
- 0, /* StencilBits */
- 2, /* TexelBytes */
- _mesa_texstore_r16, /* StoreTexImageFunc */
- NULL, /* FetchTexel1D */
- NULL, /* FetchTexel2D */
- NULL, /* FetchTexel3D */
- fetch_texel_1d_f_r16, /* FetchTexel1Df */
- fetch_texel_2d_f_r16, /* FetchTexel2Df */
- fetch_texel_3d_f_r16, /* FetchTexel3Df */
- store_texel_r16 /* StoreTexel */
-};
-
/*@}*/
@@ -1982,15 +1910,11 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
return &_mesa_texformat_rg;
case GL_RG8:
return &_mesa_texformat_rg88;
- case GL_RG16:
- return &_mesa_texformat_rg1616;
case GL_RED:
return &_mesa_texformat_r;
case GL_R8:
return &_mesa_texformat_r8;
- case GL_R16:
- return &_mesa_texformat_r16;
default:
; /* fallthrough */
@@ -2064,7 +1988,6 @@ _mesa_format_to_type_and_comps(const struct gl_texture_format *format,
case MESA_FORMAT_YCBCR:
case MESA_FORMAT_YCBCR_REV:
- case MESA_FORMAT_RG1616:
*datatype = GL_UNSIGNED_SHORT;
*comps = 2;
return;
@@ -2080,7 +2003,6 @@ _mesa_format_to_type_and_comps(const struct gl_texture_format *format,
return;
case MESA_FORMAT_Z16:
- case MESA_FORMAT_R16:
*datatype = GL_UNSIGNED_SHORT;
*comps = 1;
return;
diff --git a/src/mesa/main/texformat.h b/src/mesa/main/texformat.h
index 840dc0db05..fb438c0905 100644
--- a/src/mesa/main/texformat.h
+++ b/src/mesa/main/texformat.h
@@ -79,10 +79,7 @@ enum _format {
MESA_FORMAT_ARGB1555_REV, /* GGGB BBBB ARRR RRGG */
MESA_FORMAT_RG88, /* RRRR RRRR GGGG GGGG */
MESA_FORMAT_RG88_REV, /* GGGG GGGG RRRR RRRR */
- MESA_FORMAT_RG1616, /* RRRR RRRR RRRR RRRR GGGG GGGG GGGG GGGG */
- MESA_FORMAT_RG1616_REV, /* GGGG GGGG GGGG GGGG RRRR RRRR RRRR RRRR */
MESA_FORMAT_R8, /* RRRR RRRR */
- MESA_FORMAT_R16, /* RRRR RRRR RRRR RRRR */
MESA_FORMAT_AL88, /* AAAA AAAA LLLL LLLL */
MESA_FORMAT_AL88_REV, /* LLLL LLLL AAAA AAAA */
MESA_FORMAT_RGB332, /* RRRG GGBB */
@@ -254,9 +251,6 @@ extern const struct gl_texture_format _mesa_texformat_rgba5551;
extern const struct gl_texture_format _mesa_texformat_rg88;
extern const struct gl_texture_format _mesa_texformat_rg88_rev;
extern const struct gl_texture_format _mesa_texformat_r8;
-extern const struct gl_texture_format _mesa_texformat_rg1616;
-extern const struct gl_texture_format _mesa_texformat_rg1616_rev;
-extern const struct gl_texture_format _mesa_texformat_r16;
extern const struct gl_texture_format _mesa_texformat_al88;
extern const struct gl_texture_format _mesa_texformat_al88_rev;
extern const struct gl_texture_format _mesa_texformat_rgb332;
diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h
index 178167e15d..5b5431c048 100644
--- a/src/mesa/main/texformat_tmp.h
+++ b/src/mesa/main/texformat_tmp.h
@@ -1053,71 +1053,6 @@ static void store_texel_r8(struct gl_texture_image *texImage,
#endif
-/* MESA_FORMAT_RG1616 ********************************************************/
-
-/* Fetch depth texel from 1D, 2D or 3D rg1616 texture, return 4 GLchans */
-static void FETCH(f_rg1616)(const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel)
-{
- const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
- texel[0] = (s >> 16) * (1.0F / 65535.0F);
- texel[1] = (s & 0xffff) * (1.0F / 65535.0F);
-}
-
-#if DIM == 3
-static void store_texel_rg1616(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLushort *rgba = (const GLushort *) texel;
- GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
- *dst = (((GLuint) rgba[RCOMP]) << 16) | (GLuint) rgba[GCOMP];
-}
-#endif
-
-
-/* MESA_FORMAT_RG1616_REV ****************************************************/
-
-/* Fetch depth texel from 1D, 2D or 3D rg1616_rev texture, return 4 GLchans */
-static void FETCH(f_rg1616_rev)(const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel)
-{
- const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
- texel[0] = (s & 0xffff) * (1.0F / 65535.0F);
- texel[1] = (s >> 16) * (1.0F / 65535.0F);
-}
-
-#if DIM == 3
-static void store_texel_rg1616_rev(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLushort *rgba = (const GLushort *) texel;
- GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
- *dst = (((GLuint) rgba[GCOMP]) << 16) | (GLuint) rgba[RCOMP];
-}
-#endif
-
-
-/* MESA_FORMAT_R16 ***********************************************************/
-
-/* Fetch depth texel from 1D, 2D or 3D r16 texture, return 4 GLchans */
-static void FETCH(f_r16)(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);
- texel[0] = src[0] * (1.0F / 65535.0F);
-}
-
-#if DIM == 3
-static void store_texel_r16(struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, const void *texel)
-{
- const GLushort *rgba = (const GLushort *) texel;
- GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 1);
- dst[0] = rgba[RCOMP];
-}
-#endif
-
-
/* MESA_FORMAT_AL88 **********************************************************/
/* Fetch texel from 1D, 2D or 3D al88 texture, return 4 GLchans */
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index ff8868cb3c..8be2c9fa1b 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2259,13 +2259,6 @@ _mesa_texstore_rg88(TEXSTORE_PARAMS)
GLboolean
-_mesa_texstore_rg1616(TEXSTORE_PARAMS)
-{
- return GL_FALSE;
-}
-
-
-GLboolean
_mesa_texstore_al88(TEXSTORE_PARAMS)
{
const GLboolean littleEndian = _mesa_little_endian();
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index 50d6aeaa8c..0c39fefb21 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -55,8 +55,6 @@ extern GLboolean _mesa_texstore_argb1555(TEXSTORE_PARAMS);
extern GLboolean _mesa_texstore_argb1555_rev(TEXSTORE_PARAMS);
extern GLboolean _mesa_texstore_r8(TEXSTORE_PARAMS);
extern GLboolean _mesa_texstore_rg88(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_r16(TEXSTORE_PARAMS);
-extern GLboolean _mesa_texstore_rg1616(TEXSTORE_PARAMS);
extern GLboolean _mesa_texstore_al88(TEXSTORE_PARAMS);
extern GLboolean _mesa_texstore_al88_rev(TEXSTORE_PARAMS);
extern GLboolean _mesa_texstore_rgb332(TEXSTORE_PARAMS);