Bookworm has just been released. Add jobs which start using it, but keep
bullseye around as the LTS release, to make sure we can build on new and
old distributions.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Debian bookworm needs a newer version of Mesa to build against LLVM 15.
Upgrade Mesa and the kernel whilst we're at it, just to make sure that
things keep working.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Newer versions of Debian make you pass --break-system-packages to pip in
order for it to install packages. Since we do want to keep using pip for
controlled versions rather than the distribution packages, add this
flag.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Until now we've only had the unadorned arithmetic functions, but they're
easy to abuse and tedious to use.
For now, we just add weston_coord_global_add/sub functions and use them
where appropriate.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This is stored as an unadorned weston_coord internally, but with getter
functions we can put together the appropriate global or surface
coordinate.
Use them where appropriate.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Truncating a weston coord to integer values is something we do
frequently enough to warrant a helper function.
Use this in the kiosk and desktop shells where appropriate.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Let the GL renderer render to FBOs for RDP outputs and read the pixels
into the RDP frame buffer. This allows to run the RDP backend with the
GL renderer.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Add switch statements where renderer specific API is called to prepare
for adding GL renderer support. No functional change.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Partially revert commit 89e1831cd7 ("pixman-renderer: add
weston_renderbuffer and create/destroy interface") to bring back the
shadow_surface pixman image. The renderbuffer is only wrapped around it.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
The 'confine' client is used to showcase the behavior of pointer confinement
through the interface zwp_confined_pointer_v1.
Since zwp_confined_pointer_v1 is part of pointer constraints in general, which
includes pointer locking, it makes sense to augment the scope of the client so
it can serve as a showcase for this category of interfaces through
zwp_pointer_constraints_v1.
Currently 'confine' relies on, and is designed around the limitations of, the
toytoolkit. Adapting the toytoolkit for the new requirements proved
unproductive, especially since we wish to add support for pointer constraints in
sub-surfaces. Hence the solution adopted was to write a new client that would
replace the previous one.
This patch introduces the new client, 'constraints.c', replacing 'confine.c'.
Signed-off-by: Sergio Gómez <sergio.g.delreal@gmail.com>
We need this so that Weston can update the "click to activate" serial, so
that we can then use the constraints protocol (see
maybe_enable_pointer_constraint() in libweston/input.c).
Signed-off-by: Sergio Gómez <sergio.g.delreal@gmail.com>
Translate damage extents used to calculate glReadPixels rectangle from
global to local coordinates.
Fixes: b1606a9f2c ("gl-renderer: support automatically downloading FBO renderbuffers")
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
When an output is moved, all views that are not moving with it should
cause damage where they appear in it before and after the move, and all
prior damage should move with the output.
To avoid this complexity, just damage the full output after the move.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This is similar to commit 'libweston: Update view transforms more often', where
we update the view's transform when getting the panel dimensions.
Fixes#740
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Track damage on struct weston_renderbuffer and drop the custom damage
region from struct wayland_shm_buffer.
Pass repaint damage to wl_surface_damage() instead of accumulated
renderbuffer damage.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
While the GL renderer is not able to directly render into the PipeWire buffers,
it is possible to read the rendered frame from the fbo into the PipeWire buffer.
Use the automatic download to add support for the GL renderer to the PipeWire
backend.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Instead of always initializing the Pixman renderer, make the initialization
dependent on the selected renderer. This makes it easier to add other renderers.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Make it easier to understand where ptr points to by using local variables for
the spa_buffer and spa_data.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Extract the pixman renderbuffer configuration from the add_buffer function into
a helper function to simplify the addition of the GL renderer.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Use helper function for setting up the pixman renderer to simplify the addition
of the GL renderer.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
clip_quad() is a dedicated clipping function for quads that doesn't
depend on any GL renderer internal structures. It can be moved out to
the clipper to be called by both the renderer and the clipping test
client without having to duplicate code.
Signed-off-by: Loïc Molinari <loic.molinari@gmail.com>
Since both the surface rect and the transformed quad are axis-aligned
in the simple clipping path, non-zero area detection can more
efficiently be checked post-clipping by comparing opposite edges.
Signed-off-by: Loïc Molinari <loic.molinari@gmail.com>
Add a basic check to let the clipper take the simple axis-aligned path
when nodes are solely transformed with a translation and/or a scaling.
That makes some nodes like sub-surfaces (which always have their
transform enabled) take the fast path in the common case.
Signed-off-by: Loïc Molinari <loic.molinari@gmail.com>
Move vertex clipper back to single-precision floating point
intermediates. Since positions are sent down the graphics hardware as
single-precision values, this prevents useless conversions between
single and double precision values and lets compilers fit twice as
much data into vector registers. It also removes a copy by letting the
clipper store vertices directly into the vertex buffer.
This is mostly reverting the conversion to double-precision that
happened along with the switch to the weston_coord struct for vertex
coordinates (commit 10e70bf23c).
Signed-off-by: Loïc Molinari <loic.molinari@gmail.com>
Let the graphics hardware handle the transformation from surface
position to texture coordinates. Paint nodes now have a single vertex
position attribute from which texture coordinates are derived. A new
vertex shader variant handles the transformation.
Signed-off-by: Loïc Molinari <loic.molinari@gmail.com>
The clipper transforms dirty rects to surface space before clipping.
Each dirty rect is transformed by the same matrix for each surface
rect. This change decouples the transformation and the clipping code
to transform and compute the bounding box of dirty rects just once.
Signed-off-by: Loïc Molinari <loic.molinari@gmail.com>
Clip dirty rects to surface rects in surface coordinate space.
Dispatch vertices in surface coordinates and let the graphics hardware
handle the transformations. Clipping in global coordinate space
implies a useless roundtrip on the CPU to get the clipped polygons
back in surface coordinates for the buffer transformation. Clipping in
surface coordinate space prevents that.
This might seem counter-intuitive at first because in surface space
it's the dirty rects that are clipped to axis-aligned surface rects,
while it's the opposite in global space.
The projection matrix now combines the view and the output transforms.
Signed-off-by: Loïc Molinari <loic.molinari@gmail.com>
Let the GL renderer render to FBOs and read the pixels into the Neat VNC
frame buffers. This allows to run the VNC backend with the GL renderer.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
For software backends like VNC, support downloading the FBO renderbuffer
contents via glReadPixels automatically at the end of repaint_output.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>