Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
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;
}