[Libva] [PATCH intel-driver v2 5/7] test: add wrapper for SyncSurface

Zhao Yakui yakui.zhao at intel.com
Tue Sep 27 01:44:48 UTC 2016


On 09/27/2016 04:11 AM, U. Artie Eoff wrote:
> Add a wrapper that calls the driver i965_SyncSurface.
>

This looks good to me.

Thanks
     Yakui

> Signed-off-by: U. Artie Eoff<ullysses.a.eoff at intel.com>
> ---
>   test/i965_internal_decl.h  | 3 +++
>   test/i965_test_fixture.cpp | 6 ++++++
>   test/i965_test_fixture.h   | 6 ++++++
>   3 files changed, 15 insertions(+)
>
> diff --git a/test/i965_internal_decl.h b/test/i965_internal_decl.h
> index 1b6fc407168f..dbfcbb87ee26 100644
> --- a/test/i965_internal_decl.h
> +++ b/test/i965_internal_decl.h
> @@ -66,6 +66,9 @@ extern "C" {
>       extern VAStatus i965_DestroyImage(
>           VADriverContextP, VAImageID);
>
> +    extern VAStatus i965_SyncSurface(
> +        VADriverContextP, VASurfaceID);
> +
>       extern struct hw_codec_info *i965_get_codec_info(int);
>       extern const struct intel_device_info *i965_get_device_info(int);
>
> diff --git a/test/i965_test_fixture.cpp b/test/i965_test_fixture.cpp
> index dd8143031fe9..073a24e1d142 100644
> --- a/test/i965_test_fixture.cpp
> +++ b/test/i965_test_fixture.cpp
> @@ -212,6 +212,12 @@ void I965TestFixture::destroyImage(VAImage&image)
>           i965_DestroyImage(*this, image.image_id));
>   }
>
> +void I965TestFixture::syncSurface(VASurfaceID surface)
> +{
> +    EXPECT_STATUS(
> +        i965_SyncSurface(*this, surface));
> +}
> +
>   class I965TestFixtureTest
>       : public I965TestFixture
>   {
> diff --git a/test/i965_test_fixture.h b/test/i965_test_fixture.h
> index d09f31d859b1..54d85d223789 100644
> --- a/test/i965_test_fixture.h
> +++ b/test/i965_test_fixture.h
> @@ -207,6 +207,12 @@ public:
>       void destroyImage(VAImage&);
>
>       /**
> +     * Convenience wrapper for i965_SyncSurface.  May generate a non-fatal
> +     * test assertion failure.
> +     */
> +    void syncSurface(VASurfaceID);
> +
> +    /**
>        * VADisplay implicit and explicit conversion operator.
>        */
>       operator VADisplay();



More information about the Libva mailing list