Commit graph

10046 commits

Author SHA1 Message Date
Erico Nunes
60f7b59d8f gitlab-ci: Prepare base CI images for Vulkan build and tests
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2025-05-23 20:36:05 +01:00
Erico Nunes
76431a952f clients/simple-dmabuf-egl: Add missing destructors
Destructors for zwp_linux_explicit_synchronization_v1 and
weston_direct_display_v1 were missing.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2025-05-23 20:36:05 +01:00
Erico Nunes
ad4746101a tests: Remove gl_ suffix from force_full_upload
This will also be used for Vulkan-renderer tests.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2025-05-23 20:36:05 +01:00
Rémi Bernon
2f35f84d8e
xwayland: Activate no_focus_window when a Wayland window is activated
None active window might be interpreted from an X point of view as a
transient focus state, and is used by multiple X window managers when
a temporary focus change is in progress, or simply when grabbing the
keyboard.

From Wine side, we translate any active window change to the Win32
application, and handling None active window as an actual window
deactivation and focus loss creates spurious events and an undesired
feedback loop, as apps might react to it.

We still want to be able to detect actual focus loss under an XWayland
session, and having XWayland window manager focus an actual X window
instead will make the distinction possible.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2025-05-23 18:07:02 +02:00
Rémi Bernon
87ae07b63f
xwayland: Create a dummy no_focus_window to use for non-X window focus
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2025-05-23 18:07:02 +02:00
Erico Nunes
4ab8d6d2c4 libweston: move gl-borders up to weston_renderer
This just moves gl-borders up to libweston weston_renderer as-is,
with no change in functionality.
This is a preparation step so that other renderers can use the
same interface.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2025-05-18 18:00:08 +02:00
Pekka Paalanen
f71db77341 tests/client-buffer: reduce the scope of #if
Containining the pre-compiler conditionals inside tiny functions makes
the code easier to read.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-05-15 16:24:53 +03:00
Pekka Paalanen
381bc2761f tests/client-buffer: annotate unintended test cases
These cases were never meant to exist, but because the harness assumes
all tests must run on all fixtures, we have to return something.

This is a temporary measure to improve readability. Eventually this test
program should be split:

- shm RGB + YUV
- dmabuf RGB without force-yuv-fallback
- dmabuf YUV with and without force-yuv-fallback

or

- shm RGB + YUV
- dmabuf RGB + YUV without force-yuv-fallback
- dmabuf YUV with force-yuv-fallback

or

- shm + dmabuf; RGB + YUV without force-yuv-fallback
- dmabuf YUV with force-yuv-fallback

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-05-15 16:24:53 +03:00
Pekka Paalanen
33d82b6b79 tests/client-buffer: handle no-list in format_must_pass()
Make the callers simpler and easier to read.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-05-15 15:49:23 +03:00
Robert Mader
55a85e8e16 pixel-formats: Remove unimplemented header
The implementation got removed already and we can just check
the color_model now.

Fixes: 51ed256d (libweston: Replace pixel format's sampler_type with color_model enum)

Signed-off-by: Robert Mader <robert.mader@collabora.com>
2025-05-15 15:08:18 +03:00
Robert Mader
fe5a846512 tests: client-buffer: Use gl_force_import_yuv_fallback quirk
Ensure we test our internal YUV->RGB shader and multiplane paths.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
2025-05-15 15:08:18 +03:00
Robert Mader
d24caf5f32 gl-renderer: Add gl_force_import_yuv_fallback test quirk
Forcing the fallback paths for YUV formats. This will allow us
to test these paths on CI now that llvmpipe supports all tested
formats natively.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
2025-05-15 15:08:18 +03:00
Robert Mader
65e3a7324a tests: client-buffer: Return RESULT_SKIP where appropriate
Split up the test to run it for SHM and DRM individually so we
get fine-grained results.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
2025-05-15 15:08:18 +03:00
Robert Mader
68aed0775e tests: client-buffer: Remove llvmpipe workarounds
The issue were fixed in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34775

Signed-off-by: Robert Mader <robert.mader@collabora.com>
2025-05-15 15:08:18 +03:00
Robert Mader
e476276bf6 gitlab-ci: Bump wayland-protocols to 1.44
Which we'll need soon, so reuse the image bump in the previous
commit.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
2025-05-15 15:08:18 +03:00
Robert Mader
244f930365 gitlab-ci: Build with llvmpipe multiplanar YCbCr support
As well as fixes for broken packed YUYV variants.

Latest Mesa requires Meson >= 1.3.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
2025-05-15 15:08:18 +03:00
Leandro Ribeiro
e6289aee68 color-lcms: rewrite misleading comment
Update a comment explaining what we may do in the future when
cmsSmoothToneCurve() fails.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-05-15 14:42:45 +03:00
Daniel Stone
4393bec40a core: Short-circuit assign_outputs() during shutdown
If we're shutting down, moving surfaces to a different output will not
be profitable. Just clear out the output mask entirely and return early.

This specifically avoids the following issue seen with the Wayland
backend when shutting down:
  - outputs destroyed
  - colour manager destroyed
  - seats destroyed
  - pointer destroyed
  - sprite view destroyed
  - find new output for the sprite view
  - update colour profile for the sprite view
  - neither the view nor the compositor has any outputs left
  - try to use the stock sRGB transfer
  - oops, no colour manager

Signed-off-by: Daniel Stone <daniels@collabora.com>
2025-05-14 17:24:43 +00:00
Leandro Ribeiro
8ef3423bf7 color: remove unused WESTON_COLOR_MAPPING_TYPE_3D_LUT
Since "color: do not use color steps for non-optimized pipelines",
WESTON_COLOR_MAPPING_TYPE_3D_LUT became unused. So drop it from our
code.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-05-13 17:36:52 +03:00
Leandro Ribeiro
df07af056d color: do not use color steps for non-optimized pipelines
For non-optimized pipelines, stop using the color steps (pre curve,
color mapping and post curve). Instead, make use of the
xform->to_shaper_plus_3dlut() vfunc.

In this patch we add a bool to signalize that the steps are valid (for
optimized pipelines) or not. If not (non-optimized ones), the vfunc must
be used.

This brings flexibility for the renderer/backend implementing the xform.
For now we only implement xform's in the GL-renderer, and this has no
behavior changes. It should be relevant when we implement the xform in
our DRM-backend, see commit "color: add to_shaper_plus_3dlut() vfunc to
struct weston_color_transform".

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-05-13 17:36:52 +03:00
Leandro Ribeiro
3187999208 tests: add color-math-test
This tests a few mathematical operations that are common to color work.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-05-13 17:36:52 +03:00
Leandro Ribeiro
0945ac3fa8 color: add to_shaper_plus_3dlut() vfunc to struct weston_color_transform
This function allow us to get a shaper (3x1D LUT) + 3D LUT that is
equivalent to a certain xform.

With that, we allow backend/renderer that are not capable of handling
the color steps of the xform to fallback to something else.

E.g. when we introduce the code to offload color xform to KMS using the
DRM-backend, we'll depend on the driver/hardware implementing the color
steps. With this patch, DRM-backend should be able to fallback to a
shaper (3x1D LUT) + 3DLUT, color operations that should be commonly
supported by drivers/hardwares.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-05-13 17:36:52 +03:00
Leandro Ribeiro
9f1cf0db24 color-lcms: keep fallback LCMS xform even when pipeline is optimized
Up to now, when we were able to optimize a color pipeline, we'd delete
xform->cmap_3dlut. In such cases, we'd have a pre curve, color mapping
and post curve that Weston recognizes and implements in the shaders. So
there was no need to use xform->cmap_3dlut.

But at some point we'll try to offload such color transformations to our
DRM-backend, and we are not in control of what color operations the
hardware/driver are capable of. In such case, we may want to use the
fallback LCMS xform (xform->cmap_3dlut) and decompose it into a shaper
(3x1D LUT) + 3D LUT, as such operations should be commonly supported
by hardwares/drivers.

This shows that using the optimized pipeline or not should be a
renderer/backend decision. So do not delete xform->cmap_3dlut even when
we optimize the pipeline.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-05-13 17:36:52 +03:00
Leandro Ribeiro
b3fae5ae6b gl-renderer: split gl_color_curve_lut_3x1d()
For now this is useless, but in the next commits this split will be
pretty useful.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-05-13 17:36:52 +03:00
Leandro Ribeiro
4fe16c1bec gl-renderer: split gl_color_mapping_lut_3d()
For now this is useless, but in the next commits this split will be
pretty useful.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-05-13 17:36:52 +03:00
Leandro Ribeiro
334ae04614 gl-renderer: cosmetic improvement to gl_color_mapping_lut_3d()
Change this function signature to look similar to
gl_color_curve_lut_3x1d(), as they do similar things.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-05-13 17:36:52 +03:00
Leandro Ribeiro
209a5b8400 gl-renderer: rename gl_3d_lut() to gl_color_mapping_lut_3d()
We are filling a struct gl_renderer_color_mapping in this function,
so rename to better reflect that.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2025-05-13 17:36:52 +03:00
Erico Nunes
14d95cd6ce tests: client-buffer: Support must pass list per renderer
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>
2025-05-13 17:08:52 +03:00
Erico Nunes
6f6576dec2 tests: client-buffer: Add arguments to fixture setup
Prepare to add more multiple renderer options.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2025-05-13 17:08:52 +03:00
Erico Nunes
0c84f990d6 tests: output-decorations: Add arguments to fixture setup
Prepare to add more multiple renderer options.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2025-05-13 17:08:52 +03:00
Marius Vlad
d76a89c9d8 debug-flight-recorder.rst: Describe how to grab flight recorder
As I found myself writing these for a MR think it would better
to have to easily available to point people to.

Another small change is that since c706e1f8c8 we no longer
default subscribe to drm-backend for the flight recorder so update docs
as well. Combined with this new file should actually explain better how
to make use of it.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-05-13 10:10:23 +03:00
Marius Vlad
a40c638003 doc/sphinx/conf.py.in: Change sphinx.ext.intersphinx
To latest change.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-05-12 20:29:01 +03:00
Marius Vlad
ac2bbe24cb doc/sphinx/doxygen.ini.in: Removed deprecated HTML timestampt option
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-05-12 15:15:01 +03:00
Marius Vlad
35da5ca5a6 xdg-client-helper: Use a default WINDOW size value
If the shell doesn't provide a configure size, use a default one.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-05-06 15:30:37 +03:00
Marius Vlad
7bb9fc5b62 weston-test-client-helper: Move helpers into weston-test-client-helper
As we can re-use this for other tests make them available.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-05-06 15:27:58 +03:00
Marius Vlad
1296690ede weston-test-client-helper: Use the helper already avaible
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-05-06 15:27:58 +03:00
Marius Vlad
3b7d29f871 tests: Add xdg-client-helper library
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>
2025-05-06 15:27:58 +03:00
Pekka Paalanen
5ca78cdf05 color-lcms: accept matrices with offset
Now that color mapping matrix in GL-renderer supports an offset, allow
merging and translating matrix stages with offsets.

color-icc-output test is already hitting these new paths with the
sRGB->sRGB CLUT fixture (number 6), hence new tests are not needed.
Previously, after optimization the pipeline still contained 3
consecutive matrix stages. Now, those three are combined into one.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-05-05 11:26:24 +03:00
Pekka Paalanen
b15dcfe790 gl-renderer: add offset to the color mapping matrix
The offset will be useful for black point handling.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-05-05 11:26:24 +03:00
Pekka Paalanen
42059ce258 libweston: move stuff into colorimetry.h
Add a new header for colorimetry stuff. Adding more things in
libweston.h doesn't feel good, they drown in the sea of everything.

Pure refactoring, no changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-04-30 16:11:58 +03:00
Pekka Paalanen
eadc3d32ce libweston: add C++ braces to linalg headers
Forgot to add these. Looks like all public headers should have them.

Fixes: e8b7ade58b

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-04-30 16:11:58 +03:00
Pekka Paalanen
e837179f14 build: install linalg-3.h
Forgot.

Fixes: e8b7ade58b

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-04-30 16:11:58 +03:00
Pekka Paalanen
e57eb5b15d tests: return status from each test definition
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>
2025-04-30 15:07:35 +03:00
Robert Mader
303d88448a tests: client-buffer: Add dmabuf support
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>
2025-04-30 11:39:25 +02:00
Robert Mader
33db73f134 tests: client-helper: Add dmabuf protocol support
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>
2025-04-30 11:13:06 +02:00
Robert Mader
cd35c6c780 gl-renderer: Add YUV422 and YVU422 to yuv_formats
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>
2025-04-30 11:13:06 +02:00
Robert Mader
d6f1b2a6a4 tests: client-buffer: Preparations for dmabuf support
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>
2025-04-30 11:13:06 +02:00
Robert Mader
9f0ac15ce6 tests: Rename shm-buffer to client-buffer
In preparation to also test dmabufs.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
2025-04-30 11:12:38 +02:00
Marius Vlad
6f94022e8c ivi-shell/layout: Create a temporary background curtain
Similar to 0ff5ac0f7b, "desktop-shell: Add a placeholder curtain on
new outputs", to address the 68761d3f11, "compositor: Ensure the
scene graph isn't empty at repaint".

This is needed to allow ivi-shell to start-up otherwise we hit the
assertion introduced with 68761d3f11.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2025-04-29 17:41:07 +03:00
Pekka Paalanen
edd00d9652 CI: restore junit results in Gitlab
Fix a typo that caused test results to not be found. This adds them back
to the MR and pipeline Gitlab pages.

Fixes: 68fd41a719

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2025-04-29 10:27:34 +03:00