mesa: Add missing check of format and type in glTexSubImageXD on GLES 3.0
authorEduardo Lima Mitev <elima@igalia.com>
Wed, 29 Jul 2015 14:01:27 +0000 (16:01 +0200)
committerEduardo Lima Mitev <elima@igalia.com>
Wed, 5 Aug 2015 06:20:16 +0000 (08:20 +0200)
commit03b7221dbb93e2439f30b2e0918f6215eb741979
treed15a98364b2e7cad1b40e9e505770352a2b8ed2a
parent4b07e9a033ddb6733eba206b5bd47a2373756f7d
mesa: Add missing check of format and type in glTexSubImageXD on GLES 3.0

Argument validation for glTexSubImageXD is missing a check of format and type
against texture object's internal format when profile is OpenGL-ES 3.0+.

This patch also groups together all format and type checks on GLES into a
new function texture_format_error_check_gles(), to factorize similar
code in texture_format_error_check().

Fixes 2 dEQP tests:
* dEQP-GLES3.functional.negative_api.texture.texsubimage2d
* dEQP-GLES3.functional.negative_api.texture.texsubimage3d

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/teximage.c