summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2016-10-11 12:21:44 -0700
committerSean V Kelley <seanvk@posteo.de>2016-10-13 12:21:43 -0700
commit5c013c55e458a7f476f600e7ff78f59f3246168f (patch)
treea385444a4af2f479020ea0c468872a6c5e948a70 /test
parent8652f05e834bf2c0bbd8a324ee7d2040e1c0cc77 (diff)
test: allow default surface param for create context
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. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
Diffstat (limited to 'test')
-rw-r--r--test/i965_test_fixture.cpp5
-rw-r--r--test/i965_test_fixture.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/test/i965_test_fixture.cpp b/test/i965_test_fixture.cpp
index 8fd9142..74403f8 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 9122d84..3fc11c3 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