From: Samuel Pitoiset Date: Wed, 21 Jun 2017 08:01:55 +0000 (+0200) Subject: mesa: fix using texture id 0 with VDPAURegisterSurfaceNV() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f47c31f8cd0a7cc95f152cbc13cc8bec018b0ec;p=mesa.git mesa: fix using texture id 0 with VDPAURegisterSurfaceNV() Signed-off-by: Samuel Pitoiset Reviewed-by: Christian König Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/main/vdpau.c b/src/mesa/main/vdpau.c index 44be3a37443..051071beb5f 100644 --- a/src/mesa/main/vdpau.c +++ b/src/mesa/main/vdpau.c @@ -145,11 +145,11 @@ register_surface(struct gl_context *ctx, GLboolean isOutput, surf->output = isOutput; for (i = 0; i < numTextureNames; ++i) { struct gl_texture_object *tex; - tex = _mesa_lookup_texture(ctx, textureNames[i]); + + tex = _mesa_lookup_texture_err(ctx, textureNames[i], + "VDPAURegisterSurfaceNV"); if (tex == NULL) { free(surf); - _mesa_error(ctx, GL_INVALID_OPERATION, - "VDPAURegisterSurfaceNV(texture ID not found)"); return (GLintptr)NULL; }