[Mesa-dev] [PATCH 1/3] mesa/formats: add mesa MESA_FORMAT_ARGB2101010_UINT description.
Dave Airlie
airlied at gmail.com
Sun Nov 27 11:27:15 PST 2011
From: Dave Airlie <airlied at redhat.com>
This format is used in the ARB_texture_rgb10_a2ui spec.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/mesa/main/formats.c | 17 +++++++++++++++++
src/mesa/main/formats.h | 2 ++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index b9871ae..c884646 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:
diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h
index 5f60186..8699092 100644
--- a/src/mesa/main/formats.h
+++ b/src/mesa/main/formats.h
@@ -265,6 +265,8 @@ typedef enum
MESA_FORMAT_Z32_FLOAT,
MESA_FORMAT_Z32_FLOAT_X24S8,
+ MESA_FORMAT_ARGB2101010_UINT,
+
MESA_FORMAT_COUNT
} gl_format;
--
1.7.7.3
More information about the mesa-dev
mailing list