summaryrefslogtreecommitdiff
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2009-01-20 11:12:17 +0100
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2009-01-20 11:12:17 +0100
commitdbda49a9e65f684ca46c7af84cc52d63b0622978 (patch)
tree8b95b5b4a3645544761f7748157119651ee1a21f /src/mesa/main/texformat.c
parent11351f0c8a88ae84ec397c7f9abb4a83c64b2cfc (diff)
Add RGBA4444 and RGBA5551 texture formats.
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 1dd7bdd9ce..08725846c6 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -871,6 +871,30 @@ const struct gl_texture_format _mesa_texformat_rgb565_rev = {
store_texel_rgb565_rev /* StoreTexel */
};
+const struct gl_texture_format _mesa_texformat_rgba4444 = {
+ MESA_FORMAT_RGBA4444, /* MesaFormat */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
+ 4, /* RedBits */
+ 4, /* GreenBits */
+ 4, /* BlueBits */
+ 4, /* AlphaBits */
+ 0, /* LuminanceBits */
+ 0, /* IntensityBits */
+ 0, /* IndexBits */
+ 0, /* DepthBits */
+ 0, /* StencilBits */
+ 2, /* TexelBytes */
+ _mesa_texstore_rgba4444, /* StoreTexImageFunc */
+ fetch_texel_1d_rgba4444, /* FetchTexel1D */
+ fetch_texel_2d_rgba4444, /* FetchTexel2D */
+ fetch_texel_3d_rgba4444, /* FetchTexel3D */
+ NULL, /* FetchTexel1Df */
+ NULL, /* FetchTexel2Df */
+ NULL, /* FetchTexel3Df */
+ store_texel_rgba4444 /* StoreTexel */
+};
+
const struct gl_texture_format _mesa_texformat_argb4444 = {
MESA_FORMAT_ARGB4444, /* MesaFormat */
GL_RGBA, /* BaseFormat */
@@ -919,6 +943,30 @@ const struct gl_texture_format _mesa_texformat_argb4444_rev = {
store_texel_argb4444_rev /* StoreTexel */
};
+const struct gl_texture_format _mesa_texformat_rgba5551 = {
+ MESA_FORMAT_RGBA5551, /* MesaFormat */
+ GL_RGBA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED_ARB, /* DataType */
+ 5, /* RedBits */
+ 5, /* GreenBits */
+ 5, /* BlueBits */
+ 1, /* AlphaBits */
+ 0, /* LuminanceBits */
+ 0, /* IntensityBits */
+ 0, /* IndexBits */
+ 0, /* DepthBits */
+ 0, /* StencilBits */
+ 2, /* TexelBytes */
+ _mesa_texstore_rgba5551, /* StoreTexImageFunc */
+ fetch_texel_1d_rgba5551, /* FetchTexel1D */
+ fetch_texel_2d_rgba5551, /* FetchTexel2D */
+ fetch_texel_3d_rgba5551, /* FetchTexel3D */
+ NULL, /* FetchTexel1Df */
+ NULL, /* FetchTexel2Df */
+ NULL, /* FetchTexel3Df */
+ store_texel_rgba5551 /* StoreTexel */
+};
+
const struct gl_texture_format _mesa_texformat_argb1555 = {
MESA_FORMAT_ARGB1555, /* MesaFormat */
GL_RGBA, /* BaseFormat */