frontends/va: zero-copy efc
authorThong Thai <thong.thai@amd.com>
Thu, 3 Mar 2022 16:05:22 +0000 (11:05 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Mar 2022 14:10:08 +0000 (14:10 +0000)
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15196>

src/gallium/frontends/va/postproc.c

index 1201eb0..a9c76f4 100644 (file)
@@ -328,7 +328,10 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
       if (vlVaHandleSurfaceAllocate(drv, surf, &surf->templat, NULL, 0) != VA_STATUS_SUCCESS)
          return VA_STATUS_ERROR_ALLOCATION_FAILED;
 
+      pipe_resource_reference(&(((struct vl_video_buffer *)(surf->buffer))->resources[0]), ((struct vl_video_buffer *)(src_surface->buffer))->resources[0]);
       context->target = surf->buffer;
+
+      return VA_STATUS_SUCCESS;
    }
 
    if (!src_surface || !src_surface->buffer)