mesa: fix using texture id 0 with gl*TextureParameter*()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
Samuel Pitoiset 2017-06-21 10:04:49 +02:00
parent 7f47c31f8c
commit 45eb87e5e5

View file

@ -157,11 +157,9 @@ get_texobj_by_name(struct gl_context *ctx, GLuint texture, const char *name)
{
struct gl_texture_object *texObj;
texObj = _mesa_lookup_texture(ctx, texture);
if (!texObj) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture)", name);
texObj = _mesa_lookup_texture_err(ctx, texture, name);
if (!texObj)
return NULL;
}
switch (texObj->Target) {
case GL_TEXTURE_1D: