#include "image.h"
#include "mipmap.h"
#include "texcompress.h"
+#include "texcompress_fxt1.h"
#include "texformat.h"
#include "texstore.h"
/**
* Called via TexFormat->StoreImage to store an RGB_FXT1 texture.
*/
-static GLboolean
-texstore_rgb_fxt1(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
/**
* Called via TexFormat->StoreImage to store an RGBA_FXT1 texture.
*/
-static GLboolean
-texstore_rgba_fxt1(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
}
-static void
-fetch_texel_2d_rgba_fxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texel )
+void
+_mesa_fetch_texel_2d_rgba_fxt1( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLchan *texel )
{
(void) k;
fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, texel);
}
-static void
-fetch_texel_2d_f_rgba_fxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgba_fxt1( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
}
-static void
-fetch_texel_2d_rgb_fxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLchan *texel )
+void
+_mesa_fetch_texel_2d_rgb_fxt1( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLchan *texel )
{
(void) k;
fxt1_decode_1(texImage->Data, texImage->RowStride, i, j, texel);
}
-static void
-fetch_texel_2d_f_rgb_fxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgb_fxt1( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
0, /* DepthBits */
0, /* StencilBits */
0, /* TexelBytes */
- texstore_rgb_fxt1, /* StoreTexImageFunc */
+ _mesa_texstore_rgb_fxt1, /* StoreTexImageFunc */
NULL, /*impossible*/ /* FetchTexel1D */
- fetch_texel_2d_rgb_fxt1, /* FetchTexel2D */
+ _mesa_fetch_texel_2d_rgb_fxt1, /* FetchTexel2D */
NULL, /*impossible*/ /* FetchTexel3D */
NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgb_fxt1, /* FetchTexel2Df */
+ _mesa_fetch_texel_2d_f_rgb_fxt1, /* FetchTexel2Df */
NULL, /*impossible*/ /* FetchTexel3Df */
NULL /* StoreTexel */
};
0, /* DepthBits */
0, /* StencilBits */
0, /* TexelBytes */
- texstore_rgba_fxt1, /* StoreTexImageFunc */
+ _mesa_texstore_rgba_fxt1, /* StoreTexImageFunc */
NULL, /*impossible*/ /* FetchTexel1D */
- fetch_texel_2d_rgba_fxt1, /* FetchTexel2D */
+ _mesa_fetch_texel_2d_rgba_fxt1, /* FetchTexel2D */
NULL, /*impossible*/ /* FetchTexel3D */
NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgba_fxt1, /* FetchTexel2Df */
+ _mesa_fetch_texel_2d_f_rgba_fxt1, /* FetchTexel2Df */
NULL, /*impossible*/ /* FetchTexel3Df */
NULL /* StoreTexel */
};
--- /dev/null
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef TEXCOMPRESS_FXT1_H
+#define TEXCOMPRESS_FXT1_H
+
+extern GLboolean
+_mesa_texstore_rgb_fxt1(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_rgba_fxt1(TEXSTORE_PARAMS);
+
+extern void
+_mesa_fetch_texel_2d_rgba_fxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLchan *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_rgba_fxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_rgb_fxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLchan *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_rgb_fxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+
+#endif /* TEXCOMPRESS_FXT1_H */
#include "dlopen.h"
#include "image.h"
#include "texcompress.h"
+#include "texcompress_s3tc.h"
#include "texformat.h"
#include "texstore.h"
/**
* Called via TexFormat->StoreImage to store an RGB_DXT1 texture.
*/
-static GLboolean
-texstore_rgb_dxt1(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
/**
* Called via TexFormat->StoreImage to store an RGBA_DXT1 texture.
*/
-static GLboolean
-texstore_rgba_dxt1(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
/**
* Called via TexFormat->StoreImage to store an RGBA_DXT3 texture.
*/
-static GLboolean
-texstore_rgba_dxt3(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
/**
* Called via TexFormat->StoreImage to store an RGBA_DXT5 texture.
*/
-static GLboolean
-texstore_rgba_dxt5(TEXSTORE_PARAMS)
+GLboolean
+_mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS)
{
const GLchan *pixels;
GLint srcRowStride;
}
-static void
-fetch_texel_2d_f_rgb_dxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgb_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
}
-static void
-fetch_texel_2d_f_rgba_dxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgba_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
}
-static void
-fetch_texel_2d_f_rgba_dxt3( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgba_dxt3(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
}
-static void
-fetch_texel_2d_f_rgba_dxt5( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_rgba_dxt5(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
}
#if FEATURE_EXT_texture_sRGB
-static void
-fetch_texel_2d_f_srgb_dxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_srgb_dxt1( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
texel[ACOMP] = CHAN_TO_FLOAT(rgba[ACOMP]);
}
-static void
-fetch_texel_2d_f_srgba_dxt1( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_srgba_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
texel[ACOMP] = CHAN_TO_FLOAT(rgba[ACOMP]);
}
-static void
-fetch_texel_2d_f_srgba_dxt3( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_srgba_dxt3(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
texel[ACOMP] = CHAN_TO_FLOAT(rgba[ACOMP]);
}
-static void
-fetch_texel_2d_f_srgba_dxt5( const struct gl_texture_image *texImage,
- GLint i, GLint j, GLint k, GLfloat *texel )
+void
+_mesa_fetch_texel_2d_f_srgba_dxt5(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel)
{
/* just sample as GLchan and convert to float here */
GLchan rgba[4];
0, /* DepthBits */
0, /* StencilBits */
0, /* TexelBytes */
- texstore_rgb_dxt1, /* StoreTexImageFunc */
+ _mesa_texstore_rgb_dxt1, /* StoreTexImageFunc */
NULL, /*impossible*/ /* FetchTexel1D */
fetch_texel_2d_rgb_dxt1, /* FetchTexel2D */
NULL, /*impossible*/ /* FetchTexel3D */
NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgb_dxt1, /* FetchTexel2Df */
+ _mesa_fetch_texel_2d_f_rgb_dxt1, /* FetchTexel2Df */
NULL, /*impossible*/ /* FetchTexel3Df */
NULL /* StoreTexel */
};
0, /* DepthBits */
0, /* StencilBits */
0, /* TexelBytes */
- texstore_rgba_dxt1, /* StoreTexImageFunc */
+ _mesa_texstore_rgba_dxt1, /* StoreTexImageFunc */
NULL, /*impossible*/ /* FetchTexel1D */
fetch_texel_2d_rgba_dxt1, /* FetchTexel2D */
NULL, /*impossible*/ /* FetchTexel3D */
NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgba_dxt1, /* FetchTexel2Df */
+ _mesa_fetch_texel_2d_f_rgba_dxt1, /* FetchTexel2Df */
NULL, /*impossible*/ /* FetchTexel3Df */
NULL /* StoreTexel */
};
0, /* DepthBits */
0, /* StencilBits */
0, /* TexelBytes */
- texstore_rgba_dxt3, /* StoreTexImageFunc */
+ _mesa_texstore_rgba_dxt3, /* StoreTexImageFunc */
NULL, /*impossible*/ /* FetchTexel1D */
fetch_texel_2d_rgba_dxt3, /* FetchTexel2D */
NULL, /*impossible*/ /* FetchTexel3D */
NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgba_dxt3, /* FetchTexel2Df */
+ _mesa_fetch_texel_2d_f_rgba_dxt3, /* FetchTexel2Df */
NULL, /*impossible*/ /* FetchTexel3Df */
NULL /* StoreTexel */
};
0, /* DepthBits */
0, /* StencilBits */
0, /* TexelBytes */
- texstore_rgba_dxt5, /* StoreTexImageFunc */
+ _mesa_texstore_rgba_dxt5, /* StoreTexImageFunc */
NULL, /*impossible*/ /* FetchTexel1D */
fetch_texel_2d_rgba_dxt5, /* FetchTexel2D */
NULL, /*impossible*/ /* FetchTexel3D */
NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_rgba_dxt5, /* FetchTexel2Df */
+ _mesa_fetch_texel_2d_f_rgba_dxt5, /* FetchTexel2Df */
NULL, /*impossible*/ /* FetchTexel3Df */
NULL /* StoreTexel */
};
0, /* DepthBits */
0, /* StencilBits */
0, /* TexelBytes */
- texstore_rgb_dxt1, /* StoreTexImageFunc */
+ _mesa_texstore_rgb_dxt1, /* StoreTexImageFunc */
NULL, /*impossible*/ /* FetchTexel1D */
NULL, /* FetchTexel2D */
NULL, /*impossible*/ /* FetchTexel3D */
NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_srgb_dxt1, /* FetchTexel2Df */
+ _mesa_fetch_texel_2d_f_srgb_dxt1, /* FetchTexel2Df */
NULL, /*impossible*/ /* FetchTexel3Df */
NULL /* StoreTexel */
};
0, /* DepthBits */
0, /* StencilBits */
0, /* TexelBytes */
- texstore_rgba_dxt1, /* StoreTexImageFunc */
+ _mesa_texstore_rgba_dxt1, /* StoreTexImageFunc */
NULL, /*impossible*/ /* FetchTexel1D */
NULL, /* FetchTexel2D */
NULL, /*impossible*/ /* FetchTexel3D */
NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_srgba_dxt1, /* FetchTexel2Df */
+ _mesa_fetch_texel_2d_f_srgba_dxt1, /* FetchTexel2Df */
NULL, /*impossible*/ /* FetchTexel3Df */
NULL /* StoreTexel */
};
0, /* DepthBits */
0, /* StencilBits */
0, /* TexelBytes */
- texstore_rgba_dxt3, /* StoreTexImageFunc */
+ _mesa_texstore_rgba_dxt3, /* StoreTexImageFunc */
NULL, /*impossible*/ /* FetchTexel1D */
NULL, /* FetchTexel2D */
NULL, /*impossible*/ /* FetchTexel3D */
NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_srgba_dxt3, /* FetchTexel2Df */
+ _mesa_fetch_texel_2d_f_srgba_dxt3, /* FetchTexel2Df */
NULL, /*impossible*/ /* FetchTexel3Df */
NULL /* StoreTexel */
};
0, /* DepthBits */
0, /* StencilBits */
0, /* TexelBytes */
- texstore_rgba_dxt5, /* StoreTexImageFunc */
+ _mesa_texstore_rgba_dxt5, /* StoreTexImageFunc */
NULL, /*impossible*/ /* FetchTexel1D */
NULL, /* FetchTexel2D */
NULL, /*impossible*/ /* FetchTexel3D */
NULL, /*impossible*/ /* FetchTexel1Df */
- fetch_texel_2d_f_srgba_dxt5, /* FetchTexel2Df */
+ _mesa_fetch_texel_2d_f_srgba_dxt5, /* FetchTexel2Df */
NULL, /*impossible*/ /* FetchTexel3Df */
NULL /* StoreTexel */
};
--- /dev/null
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef TEXCOMPRESS_S3TC_H
+#define TEXCOMPRESS_S3TC_H
+
+extern GLboolean
+_mesa_texstore_rgb_dxt1(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_rgba_dxt1(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_rgba_dxt3(TEXSTORE_PARAMS);
+
+extern GLboolean
+_mesa_texstore_rgba_dxt5(TEXSTORE_PARAMS);
+
+extern void
+_mesa_fetch_texel_2d_f_rgb_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_rgba_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_rgba_dxt3(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_rgba_dxt5(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_srgb_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_srgba_dxt1(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_srgba_dxt3(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+extern void
+_mesa_fetch_texel_2d_f_srgba_dxt5(const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel);
+
+
+#endif /* TEXCOMPRESS_S3TC_H */