summaryrefslogtreecommitdiff
path: root/src/mesa/main/formats.c
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-12 11:25:02 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-12 11:25:02 +0800
commit562c127693200822f04a145db50add1be2425d7b (patch)
tree9441774fb212b17ddf2a364f06abc43f166cc00b /src/mesa/main/formats.c
parente5d351dcfde58777162552cf5cd2a9cd8299f4cd (diff)
parent077d6dd7508af88509dd0499c5dfbdaa186b4015 (diff)
Merge branch 'master' into opengl-es-v2
Conflicts: src/mesa/main/dd.h
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r--src/mesa/main/formats.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 7d0e2d2914..5983f00e2d 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -133,6 +133,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4 /* BlockWidth/Height,Bytes */
},
{
+ MESA_FORMAT_XRGB8888_REV, /* Name */
+ "MESA_FORMAT_XRGB8888_REV", /* StrName */
+ GL_RGB, /* BaseFormat */
+ GL_UNSIGNED_NORMALIZED, /* DataType */
+ 8, 8, 8, 0, /* Red/Green/Blue/AlphaBits */
+ 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */
+ 1, 1, 4 /* BlockWidth/Height,Bytes */
+ },
+ {
MESA_FORMAT_RGB888, /* Name */
"MESA_FORMAT_RGB888", /* StrName */
GL_RGB, /* BaseFormat */
@@ -232,6 +241,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 */
@@ -883,6 +910,7 @@ _mesa_test_formats(void)
GLuint t = info->RedBits + info->GreenBits
+ info->BlueBits + info->AlphaBits;
assert(t / 8 == info->BytesPerBlock);
+ (void) t;
}
}
@@ -974,6 +1002,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;