[Mesa-dev] [PATCH] st/va: it is valid to release the VABuffer of an exported resource

Julien Isorce j.isorce at samsung.com
Thu Jun 2 14:03:01 UTC 2016


Signed-off-by: Julien Isorce <j.isorce at samsung.com>
---
 src/gallium/state_trackers/va/buffer.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/gallium/state_trackers/va/buffer.c b/src/gallium/state_trackers/va/buffer.c
index 2fd8661..7d3167b 100644
--- a/src/gallium/state_trackers/va/buffer.c
+++ b/src/gallium/state_trackers/va/buffer.c
@@ -192,14 +192,8 @@ vlVaDestroyBuffer(VADriverContextP ctx, VABufferID buf_id)
       return VA_STATUS_ERROR_INVALID_BUFFER;
    }
 
-   if (buf->derived_surface.resource) {
-      if (buf->export_refcount > 0) {
-         pipe_mutex_unlock(drv->mutex);
-         return VA_STATUS_ERROR_INVALID_BUFFER;
-      }
-
+   if (buf->derived_surface.resource)
       pipe_resource_reference(&buf->derived_surface.resource, NULL);
-   }
 
    FREE(buf->data);
    FREE(buf);
-- 
1.9.1



More information about the mesa-dev mailing list