Hi Christian, An alternative solution would be to refcount on handle_table_get/put (first we need the latter even :-P) although I think that route will be longer (i.e. larger patch). Just thinking out loud, than a suggestion really.
On 16 December 2015 at 20:14, Christian König <deathsim...@vodafone.de> wrote: > @@ -165,18 +178,25 @@ vlVaUnmapBuffer(VADriverContextP ctx, VABufferID buf_id) > VAStatus > vlVaDestroyBuffer(VADriverContextP ctx, VABufferID buf_id) > { > + vlVaDriver *drv; > vlVaBuffer *buf; > > if (!ctx) > return VA_STATUS_ERROR_INVALID_CONTEXT; > > + drv = VL_VA_DRIVER(ctx); > + pipe_mutex_lock(drv->mutex); > buf = handle_table_get(VL_VA_DRIVER(ctx)->htab, buf_id); Reuse drv ? > @@ -227,7 +252,12 @@ vlVaAcquireBufferHandle(VADriverContextP ctx, VABufferID > buf_id, > if (!ctx) > return VA_STATUS_ERROR_INVALID_CONTEXT; > > + drv = VL_VA_DRIVER(ctx); > + screen = VL_VA_PSCREEN(ctx); > + pipe_mutex_lock(drv->mutex); > + drv->pipe->flush(drv->pipe, NULL, 0); > buf = handle_table_get(VL_VA_DRIVER(ctx)->htab, buf_id); > + pipe_mutex_unlock(drv->mutex); > Let's not bury the flush() movement in this patch. -Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev