mesa: rearrange texture error checking order
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 22 Jul 2015 16:59:46 +0000 (12:59 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 23 Jul 2015 20:22:52 +0000 (16:22 -0400)
commit17f71483698a4e134a0c85ef0aa3da80fdfdb180
treed394e1f40efc1190b56d53fcf790396d50e97c25
parentc844afe94eaecc66e00cc4869f700ac1236bdc89
mesa: rearrange texture error checking order

This moves the width/height/depth == 0 check to the front and avoids
doing any other checking when that is the case.

Also moves the dimensions check after the format/type checks so that we
don't bail out with success on a width/height/depth == 0 request when
the format/type don't match.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91425
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/texgetimage.c