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

2017-12-01 Thread Eric Engestrom
On Friday, 2017-12-01 00:31:48 +, Mark Thompson wrote:
> It will be present from libva 2.1 (VAAPI 1.1.0 or higher).
> 
> Signed-off-by: Mark Thompson 
> ---
> See:
> 
> 
> 
> Also enabled in mpv:
> 
> 
> There are some other driver functions added in this new version:
> * MFContext (multi-frame) stuff exists for lock-step processing of multiple 
> streams.  As far as I can tell, it is only of value for server transcode 
> setups, and probably has little benefit when encode is already asynchronous 
> (which it isn't in the Intel driver).
> * CreateBuffer2 is for passing 2D buffers to/from the driver.  Nothing uses 
> it yet.
> * QueryProcessingRate is for querying expected performance.  It might be 
> sensible to implement, but would need more hardware information than I have 
> to make the necessary tables.
> All of them are left as NULL.
> 
> Thanks,
> 
> - Mark
> 
> 
>  src/gallium/state_trackers/va/context.c | 8 +++-
>  src/gallium/state_trackers/va/surface.c | 2 +-
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/state_trackers/va/context.c 
> b/src/gallium/state_trackers/va/context.c
> index 78e1f19ab7..c4abe77cf7 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 =
> ,
> ,
> ,
> -#if 0
> +#if VA_CHECK_VERSION(1, 1, 0)
> +   NULL, /* vaCreateMFContext */
> +   NULL, /* vaMFAddContext */
> +   NULL, /* vaMFReleaseContext */
> +   NULL, /* vaMFSubmit */
> +   NULL, /* vaCreateBuffer2 */
> +   NULL, /* vaQueryProcessingRate */

Might be time to use designated initialisers?

> ,
>  #endif
>  };
> diff --git a/src/gallium/state_trackers/va/surface.c 
> b/src/gallium/state_trackers/va/surface.c
> index 636505b720..f9412ce52e 100644
> --- a/src/gallium/state_trackers/va/surface.c
> +++ b/src/gallium/state_trackers/va/surface.c
> @@ -923,7 +923,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,
> -- 
> 2.11.0
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-12-01 Thread Christian König

Am 01.12.2017 um 01:31 schrieb Mark Thompson:

It will be present from libva 2.1 (VAAPI 1.1.0 or higher).

Signed-off-by: Mark Thompson 


Acked-by: Christian König 


---
See:



Also enabled in mpv:


There are some other driver functions added in this new version:
* MFContext (multi-frame) stuff exists for lock-step processing of multiple 
streams.  As far as I can tell, it is only of value for server transcode 
setups, and probably has little benefit when encode is already asynchronous 
(which it isn't in the Intel driver).
* CreateBuffer2 is for passing 2D buffers to/from the driver.  Nothing uses it 
yet.
* QueryProcessingRate is for querying expected performance.  It might be 
sensible to implement, but would need more hardware information than I have to 
make the necessary tables.
All of them are left as NULL.

Thanks,

- Mark


  src/gallium/state_trackers/va/context.c | 8 +++-
  src/gallium/state_trackers/va/surface.c | 2 +-
  2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/va/context.c 
b/src/gallium/state_trackers/va/context.c
index 78e1f19ab7..c4abe77cf7 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 =
 ,
 ,
 ,
-#if 0
+#if VA_CHECK_VERSION(1, 1, 0)
+   NULL, /* vaCreateMFContext */
+   NULL, /* vaMFAddContext */
+   NULL, /* vaMFReleaseContext */
+   NULL, /* vaMFSubmit */
+   NULL, /* vaCreateBuffer2 */
+   NULL, /* vaQueryProcessingRate */
 ,
  #endif
  };
diff --git a/src/gallium/state_trackers/va/surface.c 
b/src/gallium/state_trackers/va/surface.c
index 636505b720..f9412ce52e 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -923,7 +923,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,


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2017-11-30 Thread Mark Thompson
It will be present from libva 2.1 (VAAPI 1.1.0 or higher).

Signed-off-by: Mark Thompson 
---
See:



Also enabled in mpv:


There are some other driver functions added in this new version:
* MFContext (multi-frame) stuff exists for lock-step processing of multiple 
streams.  As far as I can tell, it is only of value for server transcode 
setups, and probably has little benefit when encode is already asynchronous 
(which it isn't in the Intel driver).
* CreateBuffer2 is for passing 2D buffers to/from the driver.  Nothing uses it 
yet.
* QueryProcessingRate is for querying expected performance.  It might be 
sensible to implement, but would need more hardware information than I have to 
make the necessary tables.
All of them are left as NULL.

Thanks,

- Mark


 src/gallium/state_trackers/va/context.c | 8 +++-
 src/gallium/state_trackers/va/surface.c | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/va/context.c 
b/src/gallium/state_trackers/va/context.c
index 78e1f19ab7..c4abe77cf7 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 =
,
,
,
-#if 0
+#if VA_CHECK_VERSION(1, 1, 0)
+   NULL, /* vaCreateMFContext */
+   NULL, /* vaMFAddContext */
+   NULL, /* vaMFReleaseContext */
+   NULL, /* vaMFSubmit */
+   NULL, /* vaCreateBuffer2 */
+   NULL, /* vaQueryProcessingRate */
,
 #endif
 };
diff --git a/src/gallium/state_trackers/va/surface.c 
b/src/gallium/state_trackers/va/surface.c
index 636505b720..f9412ce52e 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -923,7 +923,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,
-- 
2.11.0
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev