render: don't deallocate surface storage of displayed frames.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 9 May 2014 12:53:30 +0000 (14:53 +0200)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 16 Jun 2014 03:53:35 +0000 (11:53 +0800)
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)

src/i965_output_dri.c

index 2a812d3..3b24534 100644 (file)
@@ -207,11 +207,6 @@ i965_put_surface_dri(
         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;