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)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Wed, 12 Sep 2012 08:22:03 +0000 (10:22 +0200)
commit6e9baa85a95495e9343ca899a808d264076d67f8
tree21dd1edd883d0a2863a824c591c04264c95b99d8
parent3f6ce3454f4d1331234f74670c82595f84269b1b
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>
(cherry picked from commit 771e7b6d884bb4294a89f276a904d90b28efb90a)
src/mesa/main/teximage.c