Use the new config methods from fixture.
Also, properly handle config attributes that use bitfields.
That is, some attributes require only one bitmask/value
for vaCreateConfig, therefore we cannot directly use
the attribute returned from vaGetConfigAttributes since
those bitfield attributes will return a bitfield value with
"all" OR'd supported bitmask choices.
Fixes#86
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Add definitions for valid VA rate controls and decode
slice mode values that can be used by test cases.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Define 4 new config methods that provide the functionality
of the existing 11 similar methods. The usage of the existing
methods will be replaced by the new methods in successive
commits.
These new methods will also give control back to the test
cases to handle config attributes depending on need/use-case
and reduce the number fixture member variables needed.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The m_ prefix for a variable indicates it's a member
variable. The g_ prefix indicates it's a global variable.
Use the correct prefix in test_data.h for global variables
and update usage accordingly.
Also, cleanup test_data.h formatting.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Use const and references appropriately.
Streamline logic, variable names and code formatting
Signed-off-by: Jayesh Kumar Tank <jayesh.kumarx.tank@intel.com>
Use const and references appropriately.
Streamline logic, variable names and code formatting
Also remove useless test.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The locally generated va_version.h was erroneous and
not even being used in the tests. This is because
va/va.h already includes the "real" va/va_version.h.
Thus, remove local va_version.h.in.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
m_querySurfaceAttribList was redefined in
doQuerySurfacesWithConfigAttribs which shadows the member
variable of the same name. Removing the redefinition does
not break tests, so remove it.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The minimum surface resolution needs to be considered
when creating a context in CreateContext test.
Fixes#83
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Add method to get minimum allowed surface resolution.
If driver does not specify, then assume 1x1 is min.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
If driver does not specify the max surface resolution,
then assume "any" max is allowed (up to numeric_limits).
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The header is only needed in one compilation unit.
Thus, move it's contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The header is only needed in one compilation unit.
Thus, move it's contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The header is only needed in one compilation unit.
Thus, move it's contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The header is only needed in one compilation unit.
Thus, move its contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The header is only needed in one compilation unit.
Thus, move its contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The header is only needed in one compilation unit.
Thus, move its contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The header is only needed in one compilation unit.
Thus, move its contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The header is only needed in one compilation unit.
Thus, move its contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The header is only needed in one compilation unit.
Thus, move its contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Also remove unused function declaration and unused
member variables.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The header is only needed in one compilation unit.
Thus, move its contents to the compilation unit to
reduce unnecessary complexity and maintenance.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
880 (360 direct, 520 indirect) bytes in 1 blocks are definitely lost in loss record 12 of 15
at 0x4C2EF35: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x503FED9: va_newDisplayContext (in /usr/lib/libva.so.2.0.0)
by 0x4E39F32: vaGetDisplayDRM (in /usr/lib/libva-drm.so.2.0.0)
by 0x11ADD1: VAAPI::VAAPIFixture::getDisplay() (test_va_api_fixture.cpp:80)
by 0x11AE2E: VAAPI::VAAPIFixture_getDisplay_Test::TestBody() (test_va_api_fixture.cpp:527)
Signed-off-by: Victor Toso <victortoso@redhat.com>
880 (480 direct, 400 indirect) bytes in 1 blocks are definitely lost in loss
record 13 of 15
at 0x4C2EF35: calloc
by 0x503FF12: va_newDriverContext (in /usr/lib/libva.so.2.0.0)
by 0x4E39F63: vaGetDisplayDRM (in /usr/lib/libva-drm.so.2.0.0)
by 0x11ADD1: VAAPI::VAAPIFixture::getDisplay() (test_va_api_fixture.cpp:80)
by 0x15133E: VAAPI::VAAPIInitTerminate_vaInitialize_vaTerminate_Bad_vaSetDriverName_Test::TestBody()
Signed-off-by: Victor Toso <victortoso@redhat.com>
The struct wl_registry is created with wl_proxy_marshal_constructor()
while calling wl_display_get_registry() and must be freed wtih
wl_proxy_destroy() by calling wl_registry_destroy().
72 bytes in 1 blocks are definitely lost in loss record 6 of 10
at 0x4C2EF35: calloc (in vgpreload_memcheck-amd64-linux.so)
by 0x5FD7503: ??? (in libwayland-client.so.0.3.0)
by 0x5FD7A26: wl_proxy_marshal_array_constructor_versioned
by 0x5FD7D7B: wl_proxy_marshal_constructor
by 0x10B096: wl_display_get_registry (wayland-client-protocol.h:966)
by 0x10AD72: va_open_display_wayland (va_display_wayland.c:91)
by 0x10A43B: va_open_display (va_display.c:154)
by 0x109B0A: main (vainfo.c:107)
Signed-off-by: Victor Toso <victortoso@redhat.com>
Split each buffer type into it's own test and
make the test params streamable so that test logs
are more useful.
Before:
CreateBufferWithOutData/0 # GetParam() = 32-byte object <...
...
After:
CreateBufferWithOutData/0 # GetParam() =
0:VAProfileMPEG2Simple,1:VAEntrypointVLD,
0:VAPictureParameterBufferType
...
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>