From 6f50c9865d96a704cf47f59c3c21b4686bddf1f8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 10 Jun 2009 08:39:10 -0600 Subject: mesa: disable texture unit error check in _mesa_MatrixMode() See comments for details. --- src/mesa/main/matrix.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mesa/main') diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 39b4967a58..ebc3cbd59c 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -160,11 +160,21 @@ _mesa_MatrixMode( GLenum mode ) ctx->CurrentStack = &ctx->ProjectionMatrixStack; break; case GL_TEXTURE: + /* This error check is disabled because if we're called from + * glPopAttrib() when the active texture unit is >= MaxTextureCoordUnits + * we'll generate an unexpected error. + * From the GL_ARB_vertex_shader spec it sounds like we should instead + * do error checking in other places when we actually try to access + * texture matrices beyond MaxTextureCoordUnits. + */ +#if 0 if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { _mesa_error(ctx, GL_INVALID_OPERATION, "glMatrixMode(invalid tex unit %d)", ctx->Texture.CurrentUnit); return; } +#endif + ASSERT(ctx->Texture.CurrentUnit < Elements(ctx->TextureMatrixStack)); ctx->CurrentStack = &ctx->TextureMatrixStack[ctx->Texture.CurrentUnit]; break; case GL_COLOR: -- cgit v1.2.3 From 8fa8669aeba45d1b57f3cc41429578d55cad378a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 10 Jun 2009 21:25:54 +0100 Subject: mesa: Fix typo in bitmask. --- src/mesa/main/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 332febf91f..01fbe40a03 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -2872,7 +2872,7 @@ extract_uint_indexes(GLuint n, GLuint indexes[], } else { for (i = 0; i < n; i++) - indexes[i] = s[i] & 0xfff; /* lower 8 bits */ + indexes[i] = s[i] & 0xff; /* lower 8 bits */ } } break; -- cgit v1.2.3