summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2016-09-26 13:11:46 -0700
committerSean V Kelley <seanvk@posteo.de>2016-09-28 12:55:30 -0700
commit0f8dc3d11e470747a1b90fe9c2eea5c8070893a5 (patch)
treee3225f50ab632a8af3ee768544c8aec07627e0dc /test
parentd41af8d42e6f3522d7a1af40cae7232c52d47d9c (diff)
downloadlibva-intel-driver-0f8dc3d11e470747a1b90fe9c2eea5c8070893a5.tar.gz
test: add wrapper for SyncSurface
Add a wrapper that calls the driver i965_SyncSurface. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Diffstat (limited to 'test')
-rw-r--r--test/i965_internal_decl.h3
-rw-r--r--test/i965_test_fixture.cpp6
-rw-r--r--test/i965_test_fixture.h6
3 files changed, 15 insertions, 0 deletions
diff --git a/test/i965_internal_decl.h b/test/i965_internal_decl.h
index 1b6fc407..dbfcbb87 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 dd814303..073a24e1 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 d09f31d8..54d85d22 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();