aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/varray.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-08 10:54:11 +0200
committermarha <marha@users.sourceforge.net>2011-09-08 10:54:11 +0200
commit23a7aebae0a742d94ffe2304357dcc1234a99155 (patch)
tree08dbd7956bbd1c5717967a4f904f8383139bbe1e /mesalib/src/mesa/main/varray.c
parent53da0b7e7c183ea15692234332b3e337b3fb0cc0 (diff)
downloadvcxsrv-23a7aebae0a742d94ffe2304357dcc1234a99155.tar.gz
vcxsrv-23a7aebae0a742d94ffe2304357dcc1234a99155.tar.bz2
vcxsrv-23a7aebae0a742d94ffe2304357dcc1234a99155.zip
mesa git update 8 sep 2011
Diffstat (limited to 'mesalib/src/mesa/main/varray.c')
-rw-r--r--mesalib/src/mesa/main/varray.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c
index 9c9d0d66e..13b3405e5 100644
--- a/mesalib/src/mesa/main/varray.c
+++ b/mesalib/src/mesa/main/varray.c
@@ -160,10 +160,17 @@ 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 &&
- (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))) {
+ GLboolean bgra_error = GL_FALSE;
+
+ if (ctx->Extensions.ARB_vertex_type_2_10_10_10_rev) {
+ if (type != GL_UNSIGNED_INT_2_10_10_10_REV &&
+ type != GL_INT_2_10_10_10_REV &&
+ type != GL_UNSIGNED_BYTE)
+ bgra_error = GL_TRUE;
+ } else if (type != GL_UNSIGNED_BYTE)
+ bgra_error = GL_TRUE;
+
+ if (bgra_error) {
_mesa_error(ctx, GL_INVALID_VALUE, "%s(GL_BGRA/GLubyte)", func);
return;
}