Correct clamping of TEXTURE_{MAX, BASE}_LEVEL
authorCorey Richardson <corey@octayn.net>
Wed, 31 Jul 2013 14:46:12 +0000 (10:46 -0400)
committerMatt Turner <mattst88@gmail.com>
Thu, 1 Aug 2013 17:23:39 +0000 (10:23 -0700)
commitabdbd02e5928c881510da0f76b4e49fd92ddfe50
tree0674e2dd4785ea6b08b9e45004edfffb96c7e791
parent986ae4306cea787ed0c71a52b6e92fce14a2a498
Correct clamping of TEXTURE_{MAX, BASE}_LEVEL

Previously, if TEXTURE_IMMUTABLE_FORMAT was TRUE, the levels were allowed to
be set like usual, but ARB_texture_storage states:

> if TEXTURE_IMMUTABLE_FORMAT is TRUE, then level_base is clamped to the range
> [0, <levels> - 1] and level_max is then clamped to the range [level_base,
> <levels> - 1], where <levels> is the parameter passed the call to
> TexStorage* for the texture object

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Corey Richardson <corey@octayn.net>
src/mesa/main/texparam.c