On Sun, 4 Sep 2011 15:05:05 +0100, Dave Airlie <airl...@gmail.com> wrote: > From: Dave Airlie <airl...@redhat.com> > > This just adds all the API check for vertex arrays using 2101010 types. > > 2101010 is also useable with GL_BGRA.
Except for one tiny nit, this (along with 2/4) is: Reviewed-by: Eric Anholt <e...@anholt.net> > Signed-off-by: Dave Airlie <airl...@redhat.com> > --- > src/mesa/main/varray.c | 48 > +++++++++++++++++++++++++++++++++++++++--------- > 1 files changed, 39 insertions(+), 9 deletions(-) > > diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c > index 29a345f..e9a7b47 100644 > --- a/src/mesa/main/varray.c > +++ b/src/mesa/main/varray.c > @@ -150,18 +160,26 @@ update_array(struct gl_context *ctx, > if (ctx->Extensions.EXT_vertex_array_bgra && > sizeMax == BGRA_OR_4 && > size == GL_BGRA) { > - if (type != GL_UNSIGNED_BYTE) { > + if (type != GL_UNSIGNED_BYTE && > + (ctx->Extensions.ARB_vertex_type_2_10_10_10_rev && > + (type != GL_UNSIGNED_INT_2_10_10_10_REV && > + type != GL_INT_2_10_10_10_REV))) { > _mesa_error(ctx, GL_INVALID_VALUE, "%s(GL_BGRA/GLubyte)", func); > return; > } > format = GL_BGRA; > size = 4; > - } > - else if (size < sizeMin || size > sizeMax || size > 4) { > + } else if (size < sizeMin || size > sizeMax || size > 4) { > _mesa_error(ctx, GL_INVALID_VALUE, "%s(size=%d)", func, size); > return; > } unrelated whitespace change.
pgpg07fs3czrl.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev