Keep the VA surface storage live until it is explicitly scheduled
for destruction through vaDestroySurfaces() interface. Otherwise,
subsequent vaPutSurface() calls would have no effect.
This fixes various use cases like: display of interlaced frames
that are not marked for reference, multiple rendering to Pixmap
for EXT_texture_from_pixmap and more precisely interlaced streams.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit
a840e6403071d397a33e127e8058881a3ef50077)
dri_vtable->swap_buffer(ctx, dri_drawable);
obj_surface->flags |= SURFACE_DISPLAYED;
- if ((obj_surface->flags & SURFACE_ALL_MASK) == SURFACE_DISPLAYED) {
- obj_surface->flags &= ~SURFACE_REF_DIS_MASK;
- i965_destroy_surface_storage(obj_surface);
- }
-
_i965UnlockMutex(&i965->render_mutex);
return VA_STATUS_SUCCESS;