summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/formats.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-11-27 16:21:02 +0000
committerDave Airlie <[email protected]>2011-11-28 09:40:53 +0000
commitf449be660e70aac2aefd2ce84581e137de25520b (patch)
treea538a4e7992180705f01250424eead00452bdc33 /src/mesa/main/formats.c
parent47e2e367170edec022481f1487cd980e00ef3203 (diff)
mesa/format: add mesa MESA_FORMAT_ARGB2101010_UINT support.
This format is used in the ARB_texture_rgb10_a2ui spec. It adds core mesa support, texformat + texstore support, format_unpack and fbobject.c (all patches from list merged + fixed up). also fixes some whitespace issues. Parts were: Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r--src/mesa/main/formats.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index b9871aec883..c88464641a9 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -1496,6 +1496,15 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
0, 0, 0, 32, 8, /* Lum/Int/Index/Depth/StencilBits */
1, 1, 8 /* BlockWidth/Height,Bytes */
},
+ {
+ MESA_FORMAT_ARGB2101010_UINT,
+ "MESA_FORMAT_ARGB2101010_UINT",
+ GL_RGBA,
+ GL_UNSIGNED_INT,
+ 10, 10, 10, 2,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
};
@@ -2449,6 +2458,11 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 3;
return;
+ case MESA_FORMAT_ARGB2101010_UINT:
+ *datatype = GL_UNSIGNED_INT_2_10_10_10_REV;
+ *comps = 4;
+ return;
+
case MESA_FORMAT_COUNT:
assert(0);
return;
@@ -2772,6 +2786,9 @@ _mesa_format_matches_format_and_type(gl_format gl_format,
/* FINISHME: SNORM */
return GL_FALSE;
+ case MESA_FORMAT_ARGB2101010_UINT:
+ return GL_FALSE;
+
case MESA_FORMAT_RGB9_E5_FLOAT:
return format == GL_RGB && type == GL_UNSIGNED_INT_5_9_9_9_REV;
case MESA_FORMAT_R11_G11_B10_FLOAT: