diff options
author | marha <marha@users.sourceforge.net> | 2011-09-08 11:05:14 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-09-08 11:05:14 +0200 |
commit | 32071a97fb69e2cb5a5dc86016b181a5afd2a87b (patch) | |
tree | 23a05e63a91e56c1c97a3c7b991e3acf46893e2f /mesalib/src/mesa/main/varray.c | |
parent | 553aee48675d816bf041a61ab01bb73f8602d365 (diff) | |
parent | 23a7aebae0a742d94ffe2304357dcc1234a99155 (diff) | |
download | vcxsrv-32071a97fb69e2cb5a5dc86016b181a5afd2a87b.tar.gz vcxsrv-32071a97fb69e2cb5a5dc86016b181a5afd2a87b.tar.bz2 vcxsrv-32071a97fb69e2cb5a5dc86016b181a5afd2a87b.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/docs/relnotes.html
mesalib/scons/gallium.py
mesalib/src/mesa/drivers/common/driverfuncs.c
mesalib/src/mesa/main/colortab.c
mesalib/src/mesa/main/dd.h
mesalib/src/mesa/main/enable.c
mesalib/src/mesa/main/formats.c
mesalib/src/mesa/main/framebuffer.c
mesalib/src/mesa/main/get.c
mesalib/src/mesa/main/mtypes.h
mesalib/src/mesa/main/pack.c
mesalib/src/mesa/main/texgetimage.c
mesalib/src/mesa/main/teximage.c
mesalib/src/mesa/main/texobj.c
mesalib/src/mesa/main/texparam.c
mesalib/src/mesa/main/texstate.c
mesalib/src/mesa/swrast/s_drawpix.c
mesalib/src/mesa/vbo/vbo_attrib_tmp.h
Diffstat (limited to 'mesalib/src/mesa/main/varray.c')
-rw-r--r-- | mesalib/src/mesa/main/varray.c | 15 |
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; } |