[Mesa-dev] [PATCH 2/4] mesa: Add an unpack function for ARGB2101010_UINT.
Brian Paul
brianp at vmware.com
Tue Apr 23 06:49:37 PDT 2013
One minor nit...
On 04/23/2013 01:17 AM, Kenneth Graunke wrote:
> Signed-off-by: Kenneth Graunke<kenneth at whitecape.org>
> ---
> src/mesa/main/format_unpack.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c
> index feba386..94dd106 100644
> --- a/src/mesa/main/format_unpack.c
> +++ b/src/mesa/main/format_unpack.c
> @@ -610,6 +610,20 @@ unpack_ARGB2101010(const void *src, GLfloat dst[][4], GLuint n)
>
>
> static void
> +unpack_ARGB2101010_UINT(const void *src, GLfloat dst[][4], GLuint n)
> +{
> + const GLuint *s = ((const GLuint *) src);
Extraneous parentheses there.
> + GLuint i;
> + for (i = 0; i< n; i++) {
> + dst[i][RCOMP] = (GLfloat)((s[i]>> 20)& 0x3ff);
> + dst[i][GCOMP] = (GLfloat)((s[i]>> 10)& 0x3ff);
> + dst[i][BCOMP] = (GLfloat)((s[i]>> 0)& 0x3ff);
> + dst[i][ACOMP] = (GLfloat)((s[i]>> 30)& 0x03);
> + }
> +}
> +
> +
> +static void
> unpack_ABGR2101010_UINT(const void *src, GLfloat dst[][4], GLuint n)
> {
> const GLuint *s = ((const GLuint *) src);
> @@ -1770,6 +1784,7 @@ get_unpack_rgba_function(gl_format format)
> table[MESA_FORMAT_GR1616] = unpack_GR1616;
> table[MESA_FORMAT_RG1616] = unpack_RG1616;
> table[MESA_FORMAT_ARGB2101010] = unpack_ARGB2101010;
> + table[MESA_FORMAT_ARGB2101010_UINT] = unpack_ARGB2101010_UINT;
> table[MESA_FORMAT_ABGR2101010_UINT] = unpack_ABGR2101010_UINT;
> table[MESA_FORMAT_Z24_S8] = unpack_Z24_S8;
> table[MESA_FORMAT_S8_Z24] = unpack_S8_Z24;
Otherwise, for the series: Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list