summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/formats.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-12-22 01:11:13 +0100
committerMarek Olšák <[email protected]>2010-12-23 16:54:58 +0100
commitbb5ace68ce9e8bd171a39162ed6bd93632bd6619 (patch)
treeb9e09caf1c2a26ce0b770602143dc69b1f5565d1 /src/mesa/main/formats.c
parenteb31837a0d4fa4fe115bb288ddb37cbedea954ae (diff)
mesa: implement new texture format L16
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r--src/mesa/main/formats.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index efbd4a2c25d..81d907f7a0e 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -303,6 +303,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
+ MESA_FORMAT_L16, /* Name */
+ "MESA_FORMAT_L16", /* StrName */
+ GL_LUMINANCE, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 0, 0, 0, 0, /* Red/Green/Blue/AlphaBits */
+ 16, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 2 /* BlockWidth/Height,Bytes */
+ },
+ {
MESA_FORMAT_I8, /* Name */
"MESA_FORMAT_I8", /* StrName */
GL_INTENSITY, /* BaseFormat */
@@ -1307,6 +1316,7 @@ _mesa_format_to_type_and_comps(gl_format format,
case MESA_FORMAT_R16:
case MESA_FORMAT_A16:
+ case MESA_FORMAT_L16:
*datatype = GL_UNSIGNED_SHORT;
*comps = 1;
return;