Chris Forbes <chr...@ijw.co.nz> writes:

> Signed-off-by: Chris Forbes <chr...@ijw.co.nz>
> ---
>  src/mesa/drivers/dri/i965/brw_draw_upload.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c 
> b/src/mesa/drivers/dri/i965/brw_draw_upload.c
> index f5f65ca..8ffcc57 100644
> --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
> +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
> @@ -290,6 +290,10 @@ static GLuint get_size( GLenum type )
>     case GL_UNSIGNED_SHORT: return sizeof(GLushort);
>     case GL_UNSIGNED_BYTE: return sizeof(GLubyte);
>     case GL_FIXED: return sizeof(GLuint);
> +   /* packed formats: always have 4 components, and element size is
> +     * 4 bytes, so pretend each component is 1 byte. */
> +   case GL_INT_2_10_10_10_REV: return sizeof(GLbyte);
> +   case GL_UNSIGNED_INT_2_10_10_10_REV: return sizeof(GLubyte);

Nitpicky: Something went weird with whitespace here.  Our current Mesa
style is that you never use tabs for indents, and if you do, they're 8
spaces anyway.  Also, closing */ on its own line unless it's a single
line comment.

It looks like we ought to be able to replace this size calculation with
glarray->_ElementSize, except that that's being calculated wrong for
2_10_10_10 formats.

Attachment: pgpIcAF6FHTLQ.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to