Mesa (master): mesa: fix using texture id 0 with VDPAURegisterSurfaceNV()

Samuel Pitoiset hakzsam at kemper.freedesktop.org
Thu Jun 22 08:46:19 UTC 2017


Module: Mesa
Branch: master
Commit: 7f47c31f8cd0a7cc95f152cbc13cc8bec018b0ec
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7f47c31f8cd0a7cc95f152cbc13cc8bec018b0ec

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Wed Jun 21 10:01:55 2017 +0200

mesa: fix using texture id 0 with VDPAURegisterSurfaceNV()

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

---

 src/mesa/main/vdpau.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/main/vdpau.c b/src/mesa/main/vdpau.c
index 44be3a3744..051071beb5 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;
       }
 




More information about the mesa-commit mailing list