From 0236b8a5de9aaffc8bc442a583672453fbc24df4 Mon Sep 17 00:00:00 2001 From: SureshGuttula Date: Mon, 17 May 2021 14:22:48 +0530 Subject: [PATCH] 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 Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- 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; }