[Libva] [PATCH intel-driver 1/3] test: allow default surface param for create context

Sean V Kelley seanvk at posteo.de
Thu Oct 13 19:36:47 UTC 2016


On Tue, 2016-10-11 at 12:21 -0700, U. Artie Eoff wrote:
> The driver does not require surfaces to create a context.
> That is, i965_CreateContext can accept an empty render_targets
> list.  Thus, make Surfaces an optional parameter to
> I965TestFixture::createContext so that simple tests don't
> have to bother with Surfaces if they are irrelevant to
> the test case.


lgtm, applied.

Thanks,

Sean

> 
> Signed-off-by: U. Artie Eoff <ullysses.a.eoff at intel.com>
> ---
>  test/i965_test_fixture.cpp | 5 +++--
>  test/i965_test_fixture.h   | 3 ++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/test/i965_test_fixture.cpp b/test/i965_test_fixture.cpp
> index 8fd914209467..74403f875a56 100644
> --- a/test/i965_test_fixture.cpp
> +++ b/test/i965_test_fixture.cpp
> @@ -83,12 +83,13 @@ void I965TestFixture::destroyConfig(VAConfigID
> id)
>  }
>  
>  VAContextID I965TestFixture::createContext(
> -    VAConfigID config, int w, int h, int flags, Surfaces& targets)
> +    VAConfigID config, int w, int h, int flags, const Surfaces&
> targets)
>  {
>      VAContextID id = VA_INVALID_ID;
>      EXPECT_STATUS(
>          i965_CreateContext(
> -            *this, config, w, h, flags, targets.data(),
> targets.size(), &id));
> +            *this, config, w, h, flags,
> +            const_cast<VASurfaceID*>(targets.data()),
> targets.size(), &id));
>      EXPECT_ID(id);
>  
>      return id;
> diff --git a/test/i965_test_fixture.h b/test/i965_test_fixture.h
> index 9122d848e129..3fc11c34fa75 100644
> --- a/test/i965_test_fixture.h
> +++ b/test/i965_test_fixture.h
> @@ -88,7 +88,8 @@ public:
>       * Convenience wrapper for i965_CreateContext.  May generate a
> non-fatal
>       * test assertion failure.
>       */
> -    VAContextID createContext(VAConfigID, int, int, int, Surfaces&);
> +    VAContextID createContext(VAConfigID, int, int, int = 0,
> +        const Surfaces& = Surfaces());
>  
>      /**
>       * Convenience wrapper for i965_DestroyContext.  May generate a
> non-fatal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/libva/attachments/20161013/f9915c86/attachment.sig>


More information about the Libva mailing list