[Mesa-stable] [PATCH] st/va: Enable vaExportSurfaceHandle()

Leo Liu leo.liu at amd.com
Tue Apr 17 14:35:43 UTC 2018



On 04/17/2018 10:32 AM, Juan A. Suarez Romero wrote:
> On Tue, 2018-04-17 at 08:36 -0400, Leo Liu wrote:
>> From: Mark Thompson <sw at jkqxz.net>
>>
>> It is present from libva 2.1 (VAAPI 1.1.0 or higher).
>>
>> Signed-off-by: Mark Thompson <sw at jkqxz.net>
>> Reviewed-by: Christian König <christian.koenig at amd.com>
>> ---
>>   src/gallium/state_trackers/va/context.c | 8 +++++++-
>>   src/gallium/state_trackers/va/surface.c | 2 +-
>>   2 files changed, 8 insertions(+), 2 deletions(-)
>>
>
> I was asked to include this in 18.0.1. The patch is simpler enough and it was
> already tested on 18.0, so I'm including it on 18.0.1.
>
> Thanks!
Thanks Juan.

Leo



>
> 	J.A.
>
>
>> diff --git a/src/gallium/state_trackers/va/context.c b/src/gallium/state_trackers/va/context.c
>> index f567f544fd..189d361ff3 100644
>> --- a/src/gallium/state_trackers/va/context.c
>> +++ b/src/gallium/state_trackers/va/context.c
>> @@ -89,7 +89,13 @@ static struct VADriverVTable vtable =
>>      &vlVaQuerySurfaceAttributes,
>>      &vlVaAcquireBufferHandle,
>>      &vlVaReleaseBufferHandle,
>> -#if 0
>> +#if VA_CHECK_VERSION(1, 1, 0)
>> +   NULL, /* vaCreateMFContext */
>> +   NULL, /* vaMFAddContext */
>> +   NULL, /* vaMFReleaseContext */
>> +   NULL, /* vaMFSubmit */
>> +   NULL, /* vaCreateBuffer2 */
>> +   NULL, /* vaQueryProcessingRate */
>>      &vlVaExportSurfaceHandle,
>>   #endif
>>   };
>> diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c
>> index 9823232413..8604136944 100644
>> --- a/src/gallium/state_trackers/va/surface.c
>> +++ b/src/gallium/state_trackers/va/surface.c
>> @@ -926,7 +926,7 @@ vlVaQueryVideoProcPipelineCaps(VADriverContextP ctx, VAContextID context,
>>      return VA_STATUS_SUCCESS;
>>   }
>>   
>> -#if 0
>> +#if VA_CHECK_VERSION(1, 1, 0)
>>   VAStatus
>>   vlVaExportSurfaceHandle(VADriverContextP ctx,
>>                           VASurfaceID surface_id,



More information about the mesa-stable mailing list