Mesa (master): va/picture: make sure destination buffer is protected if needed
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Nov 4 09:57:52 UTC 2020
Module: Mesa
Branch: master
Commit: 81be8b3c2f2785932b63d4b82ee33cc3d6ac2765
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=81be8b3c2f2785932b63d4b82ee33cc3d6ac2765
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Tue Oct 27 21:13:40 2020 +0100
va/picture: make sure destination buffer is protected if needed
Reviewed-by: Boyuan Zhang <boyuan.zhang at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7006>
---
src/gallium/frontends/va/picture.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c
index c358bc25c6b..b4706665d3b 100644
--- a/src/gallium/frontends/va/picture.c
+++ b/src/gallium/frontends/va/picture.c
@@ -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;
More information about the mesa-commit
mailing list