Skip to content
Snippets Groups Projects
Commit 791cf8a0 authored by Eduardo Lima Mitev's avatar Eduardo Lima Mitev Committed by Emil Velikov
Browse files

mesa: Validate target before resolving tex obj in glTex(ture)SubImageXD


Currently, glTexSubImageXD attempt to resolve the texture object
(by calling _mesa_get_current_tex_object()) before validating the given
target. However, that method explicitly states that target must have been
validated before calling it, so it never returns a user error.

The target validation occurs later when texsubimage_error_check() is called.

This patch reorganizes target validation, taking it out from the error check
function and into a point before the texture object is resolved.

Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
Cc: 10.6 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 5d64cae8)
[Emil Velikov: s/_mesa_enum_to_string/_mesa_lookup_enum_by_nr/]
Signed-off-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>

Conflicts:
	src/mesa/main/teximage.c
parent 58b2e95c
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment