diff options
author | José Fonseca <[email protected]> | 2009-06-11 16:34:56 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-06-11 16:34:56 +0100 |
commit | bf89ecb6c92aaaeccd7b6f093cb8bae9fd56aaf6 (patch) | |
tree | b7b38a1e1bd5e975f77ec23ea872a97dc6963b64 /src/mesa/main | |
parent | 0d2ac7a10b2904eda70794534a9a73b3f4b654cf (diff) | |
parent | cc09724a50a4cabb68b7c5f5b8d3812d38f65391 (diff) |
Merge branch 'mesa_7_5_branch'
Conflicts:
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_framebuffer.c
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/image.c | 2 | ||||
-rw-r--r-- | src/mesa/main/matrix.c | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index c06031e6cb2..090e5eb3300 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -2874,7 +2874,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; diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 39b4967a58e..ebc3cbd59c3 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: |