summaryrefslogtreecommitdiff
path: root/src/mesa/main/formats.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-11-16 14:49:40 -0800
committerIan Romanick <ian.d.romanick@intel.com>2009-11-16 15:23:16 -0800
commiteb437fabe017611e1f855fffa45f59cd38709be8 (patch)
tree1c59487603c0b89b339a364714e4bbee742dfa9c /src/mesa/main/formats.c
parent5fb07a4046a7f00f060bbc6dae92213e635d55f5 (diff)
AL1616: Add formats for GL_LUMINANCE16_ALPHA16 textures
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r--src/mesa/main/formats.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 7d0e2d2914..7d64c462b1 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -232,6 +232,24 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2 /* BlockWidth/Height,Bytes */
},
{
+ MESA_FORMAT_AL1616, /* Name */
+ "MESA_FORMAT_AL1616", /* StrName */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
+ 16, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
+ MESA_FORMAT_AL1616_REV, /* Name */
+ "MESA_FORMAT_AL1616_REV", /* StrName */
+ GL_LUMINANCE_ALPHA, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 16, /* Red/Green/Blue/AlphaBits */
+ 16, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
MESA_FORMAT_RGB332, /* Name */
"MESA_FORMAT_RGB332", /* StrName */
GL_RGB, /* BaseFormat */
@@ -974,6 +992,13 @@ _mesa_format_to_type_and_comps(gl_format format,
*datatype = GL_UNSIGNED_BYTE;
*comps = 2;
return;
+
+ case MESA_FORMAT_AL1616:
+ case MESA_FORMAT_AL1616_REV:
+ *datatype = GL_UNSIGNED_SHORT;
+ *comps = 2;
+ return;
+
case MESA_FORMAT_RGB332:
*datatype = GL_UNSIGNED_BYTE_3_3_2;
*comps = 3;