mesa: move the format and type check before select_tex_image()
authorJian Zhao <jian.j.zhao@intel.com>
Sat, 24 Dec 2011 14:58:12 +0000 (07:58 -0700)
committerBrian Paul <brianp@vmware.com>
Sat, 24 Dec 2011 15:00:29 +0000 (08:00 -0700)
commit26195c8417e710e919352ec6b4dfff83fdc178e2
treef5e49bc62e5a0596e4e3f6227abdaa3dadfc2bec
parent1fdecef8868ce1a5ca6c2cb260294fb37d3bd69d
mesa: move the format and type check before select_tex_image()

Move the format and type check before select_tex_image, or it will fail to
report the mismatch error if the teximage is null.

Reported-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Jian Zhao <jian.j.zhao@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/main/texgetimage.c