mesa: fix per-level max texture size error checking
authorBrian Paul <brianp@vmware.com>
Wed, 5 Sep 2012 02:17:15 +0000 (20:17 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 5 Sep 2012 14:44:26 +0000 (08:44 -0600)
commit771e7b6d884bb4294a89f276a904d90b28efb90a
tree8f1899177702dbdccec0c150494a3d488b8c3f57
parent456c7355e06c352e1ca9e79f6ef9cdaed66ddf9c
mesa: fix per-level max texture size error checking

This is a long-standing omission in Mesa's texture image size checking.
We need to take the mipmap level into consideration when checking if the
width, height and depth are too large.

Fixes the new piglit max-texture-size-level test.
Thanks to Stéphane Marchesin for finding this problem.

Note: This is a candidate for the stable branches.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/mesa/main/teximage.c