summaryrefslogtreecommitdiff
path: root/test/i965_test_fixture.h
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2016-09-26 13:11:44 -0700
committerSean V Kelley <seanvk@posteo.de>2016-09-28 12:55:19 -0700
commitf4adf3fe4d9bfa2fc8675abf73f6e3ad28881b7c (patch)
treeeafe4eac32ea5953a948c34d9d0f5e5ff5d00704 /test/i965_test_fixture.h
parent55050bdfb168ec17db081bfa57ddedfd3e8ed222 (diff)
downloadlibva-intel-driver-f4adf3fe4d9bfa2fc8675abf73f6e3ad28881b7c.tar.gz
test: add wrapper for CreateSurfaces2
Add support for calling i965_CreateSurfaces2 so that we can pass VASurfaceAttributes. This is needed to set a particular surface pixel format in some tests. We must call i965_CreateSurfaces2 via the vtable since it is a static function within the i965_drv_video.c file... thus hidden. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Diffstat (limited to 'test/i965_test_fixture.h')
-rw-r--r--test/i965_test_fixture.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/i965_test_fixture.h b/test/i965_test_fixture.h
index 511c791f..5915852c 100644
--- a/test/i965_test_fixture.h
+++ b/test/i965_test_fixture.h
@@ -32,6 +32,7 @@
#include <vector>
typedef std::vector<VASurfaceID> Surfaces;
+typedef std::vector<VASurfaceAttrib> SurfaceAttribs;
typedef std::vector<VAConfigAttrib> ConfigAttribs;
/**
@@ -99,10 +100,13 @@ public:
void terminate();
/**
- * Convenience wrapper for i965_CreateSurfaces. May generate a non-fatal
- * test assertion failure.
+ * Convenience wrapper for i965_CreateSurfaces or i965_CreateSurfaces2.
+ * If SurfaceAttribs are specified then i965_CreateSurfaces2 is used,
+ * otherwise i965_CreateSurfaces is used. May generate a non-fatal test
+ * assertion failure.
*/
- Surfaces createSurfaces(int w, int h, int format, size_t count = 1);
+ Surfaces createSurfaces(int w, int h, int format, size_t count = 1,
+ const SurfaceAttribs& = SurfaceAttribs());
/**
* Convenience wrapper for i965_DestroySurfaces. May generate a non-fatal