summaryrefslogtreecommitdiff
path: root/src/mesa/main/formats.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-12-21 18:54:50 +0100
committerMarek Olšák <maraeo@gmail.com>2010-12-23 16:54:58 +0100
commit621e5254ef6714520f106bd3707fe6ddc279aa0c (patch)
tree8b2dfc92e969c173f27476ee77bdf42bb472b6bd /src/mesa/main/formats.c
parent0a7b60f7ed3167acce72b3c367181dcae81f92c1 (diff)
mesa: implement new texture format ARGB2101010
Radeon GPUs do support GL_RGB10_A2.
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r--src/mesa/main/formats.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 42f70ca232..0975407214 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -375,6 +375,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 4
},
{
+ MESA_FORMAT_ARGB2101010,
+ "MESA_FORMAT_ARGB2101010",
+ GL_RGBA,
+ GL_UNSIGNED_NORMALIZED,
+ 10, 10, 10, 2,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
MESA_FORMAT_Z24_S8, /* Name */
"MESA_FORMAT_Z24_S8", /* StrName */
GL_DEPTH_STENCIL, /* BaseFormat */
@@ -1251,6 +1260,11 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 4;
return;
+ case MESA_FORMAT_ARGB2101010:
+ *datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
+ *comps = 4;
+ return;
+
case MESA_FORMAT_RGBA5551:
*datatype = GL_UNSIGNED_SHORT_5_5_5_1;
*comps = 4;