diff options
author | Brian Paul <[email protected]> | 2005-02-08 14:44:01 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-02-08 14:44:01 +0000 |
commit | 8e5f0e62dd7d6465dcd906d38dffd0b1b476e3b5 (patch) | |
tree | a5c39a3e7a4c1eb3a4c8cff581c5e3cfbb516f83 /src/mesa/main/texstate.c | |
parent | 46cde1715f29dddf5d0a41d8c91ee117208d9685 (diff) |
clamp anisotropy against max value
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r-- | src/mesa/main/texstate.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 0f3eea6f335..914518e4161 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 6.3 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1388,7 +1388,9 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) return; } FLUSH_VERTICES(ctx, _NEW_TEXTURE); - texObj->MaxAnisotropy = params[0]; + /* clamp to max, that's what NVIDIA does */ + texObj->MaxAnisotropy = MIN2(params[0], + ctx->Const.MaxTextureMaxAnisotropy); } else { _mesa_error(ctx, GL_INVALID_ENUM, |