This test has only supported the GL renderer, with a must pass list of
formats which matches what the GL renderer advertises and supports.
This commit prepares the test to support other renderers by moving the
must pass list to the test setup declaration, so that it can be defined
per renderer. This is in preparation to add more renderers here as a
followup.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
And make use of it in kiosk-shell-test. There's no functional change,
this is for other shells to re-use the code here.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Add a status return value to every test definition. There are no
behavioral changes, previously the RESULT_OK was simply assumed.
The benefit of this is that in the future individual tests can also
return RESULT_SKIP, so that we can keep statistics of skipped tests.
ivi-layout-internal-test.c has the only case where a test function may
return early. That one is set to return RESULT_HARD_ERROR to match the
compositor exit code already there.
Also documentation is updated.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Using the udmabuf allocator which is usually available these days,
both on CI runners and dev mashines. The buffers have the the same
content are tested against the same reference images as in the shm
case.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Allow querying supported formats and modifiers.
We use version 3 as it is easier to implement and also works
if no main device is present - such as when using llvmpipe.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
So we can test them on CI. For completeness and because they
are commonly used by SW decoders.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
Add stride alignment support make various cleanups in
order to support both shm and dmabufs. No changes in
test results intended.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
We have the following error message in parse_color_characteristics():
name=%s: reserved name. Do not use ':' character in the name.
It gets confusing when "name" ends with ':'. So rephrase it to clarify
the error message in such case.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Replace an ad hoc 3x3 matrix, that was supposed to match LittleCMS matrix
but did not, with our new consistent weston_mat3f API.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This converts weston_matrix and weston_vector to use linalg-types
internally. All direct accesses to members had to be converted
everywhere, mostly in the simplest form possible which leaves some
trivially reducable code around.
The intention is that we can now gradually migrate away from
weston_matrix in the future.
Look like one trailing space got accidentally annihilated in
compositor.c.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
These are the same as linalg-4 cases, except the matrices have been
generated anew, and checked with Octave that the condition numbers and
determinant values hold.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
The 24 bpp RGB and BGR SHM formats are meant to be stored little
endian, not big endian.
Fixes a regression in commit 815ccaff.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Found out in https://github.com/mm2/Little-CMS/issues/483
This should be a complete no-op change, but there is one difference.
Previously matrix_inf_norm() summed over rows. Now it sums over columns
as it should be. This shouldn't hurt because it is only used to identify
identity matrices. The bug was actually in is_identity_matrix_stage()
because it deliberately passed what was assumed to be a transpose of the
matrix.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Setup a custom assertion handler that increases an assertion counter
instead of aborting on failure. This allows to run all the sub tests
defined for a test and to correctly report which sub test failed.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
NDEBUG doesn't need to be catched anymore now that the test suite
don't use libc's abort() anymore.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit gets rid of libc's abort() usage in the test suite using
test asserts instead.
Asserts run in the server as plugins aren't converted because they are
shared between server and client.
Co-authored-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
It's much more common to have bits defined as enums than having a
position, so let's just directly take a bit as argument to the bit
asserts. For the few cases where only the position is available, it's
easy to get the right bit using a shift.
The is_pow2_64() helper functions have been added in order to validate
the bit passed as argument and prevent programming errors.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
This commit introduces various Weston based asserts for the testing
framework. The goal is to ease test writing and improve readability.
Using custom asserts instead of relying on libc's assert() will also
help providing NDEBUG builds. This is currently not possible because
setting NDEBUG would disable all the asserts in the tests.
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
As most SDR video content uses that instead of BT.601. Crucially, most
KMS drivers use BT.709 as the default for the COLOR_ENCODING value,
making it the effective default for hardware planes we used before we
started setting an explicit value.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
This adds tests to create image descriptions through color parameters
using the CM&HDR protocol extension.
The code for that was added in commit "color: allow clients to create
image description from parameters".
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Commit "color: add support to the color-management protocol" added
support for the majority of the interfaces from the color-management
protocol.
The missing part was the interface that allows clients to create image
descriptions from parameters. In this patch we do that.
For now this just exercises the mechanical aspects of the protocol, we
still need to write the code to create proper color profiles from that
and make use of them in our codebase.
In the next commits we add a new test file with lots of tests exercising
the creation of image descriptions through parameters.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This is problematic as we don't have namespacing for these and some of
the macros can interfere with other defines.
This reverts commit 8634c7e349.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Previously, commands could only be specified by their path,
so it was not possible to pass arguments.
Use the 'command' config first,
and if it is NULL, fall back to the existing 'path' config.
Signed-off-by: Gyeyoung Baek <gyeyoung976@gmail.com>
Co-authored-by: Michael Olbrich <m.olbrich@pengutronix.de>
As weston_windowed_output_get_api needs ARRAY_LENGTH() move helpers to a
libweston/ so other users can re-use that instead of re-defining these
all over. Easier for other front-ends to make use of them.
With this change windowed-output-api.h also includes the helpers header.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>