Mesa (main): frontends/va/picture:Fix wrong reallocation even surface is protected
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 21 11:50:49 UTC 2021
Module: Mesa
Branch: main
Commit: 0236b8a5de9aaffc8bc442a583672453fbc24df4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0236b8a5de9aaffc8bc442a583672453fbc24df4
Author: SureshGuttula <suresh.guttula at amd.corp-partner.google.com>
Date: Mon May 17 14:40:48 2021 +0530
frontends/va/picture:Fix wrong reallocation even surface is protected
This patch will avoid reallocation,if surface is already protected.
Fixing the comparision logic of boolean value(true \ flase) with
PIPE_BIND_PROTECTED.
Fixes: 81be8b3c2f2 ("va/picture: make sure destination buffer is protected if needed")
Signed-off-by: SureshGuttula <suresh.guttula at amd.corp-partner.google.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10916>
---
src/gallium/frontends/va/picture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c
index d3953b1d36c..12058b3a25f 100644
--- a/src/gallium/frontends/va/picture.c
+++ b/src/gallium/frontends/va/picture.c
@@ -698,7 +698,7 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
}
}
- if ((surf->templat.bind & PIPE_BIND_PROTECTED) != context->desc.base.protected_playback) {
+ if ((bool)(surf->templat.bind & PIPE_BIND_PROTECTED) != context->desc.base.protected_playback) {
if (context->desc.base.protected_playback) {
surf->templat.bind |= PIPE_BIND_PROTECTED;
}
More information about the mesa-commit
mailing list