va/picture: make sure destination buffer is protected if needed

Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7006>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2020-10-27 21:13:40 +01:00
parent 70191f38e3
commit 81be8b3c2f

View file

@ -702,6 +702,15 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
}
}
if ((surf->templat.bind & PIPE_BIND_PROTECTED) != context->desc.base.protected_playback) {
if (context->desc.base.protected_playback) {
surf->templat.bind |= PIPE_BIND_PROTECTED;
}
else
surf->templat.bind &= ~PIPE_BIND_PROTECTED;
realloc = true;
}
if (realloc) {
struct pipe_video_buffer *old_buf = surf->buffer;