st/va: force to flush the last p frame in idr period
st/va: force to flush the last p frame in idr period

During dual instance encoding submission, if the second encode task and first
encode task have no reference dependency, e.g. p following with idr-frame,
there is a chance the second task will use for its reconstructed picture
buffer the same buffer used by first task for its reference/reconstructed
picture. In this case, buffer corruption may occur depending on encoding
speed. Fix is to force flush these two tasks separately to avoid race condition

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98005

Signed-off-by: Boyuan Zhang <8cfb4a4fd3f1d146f6a03a94195b31d5559cee7b@amd.com>
Reviewed-by: Christian König <c7ea837d7a46effe4232b086213468b8b31643bf@amd.com>

metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler