st/va: enable dual instances encode by sync surface
authorBoyuan Zhang <boyuan.zhang@amd.com>
Mon, 15 Aug 2016 17:23:30 +0000 (13:23 -0400)
committerLeo Liu <leo.liu@amd.com>
Fri, 19 Aug 2016 14:36:44 +0000 (10:36 -0400)
commitc59628d11b134fc016388a170880f7646e100d6f
treedd6201f9ecbd023c42216a7787e1c51f5907b133
parent93d2b5c57632f5cc57e71511bc6e33f8474e40fd
st/va: enable dual instances encode by sync surface

This patch improves the performance of Vaapi Encode by enabling dual
instances encoding. flush function is not called after each end_frame
call. radeon/vce will do flush whenever 2 frames are submitted for
encoding. Implement sync surface function to flush only if the frame
hasn't been flushed yet.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/picture.c
src/gallium/state_trackers/va/surface.c
src/gallium/state_trackers/va/va_private.h