UNDEFINED when used as source layout means that the contents of
the underlying memory becomes undefined. This isn't what we want
here: we don't want to mutate the imported pixel data.
The Vulkan spec isn't really clear what the proper value should be
here, but after discussing with driver developers [1] it seems like
UNDEFINED isn't the right one. The recommendation is to use GENERAL
instead.
[1]: https://github.com/ValveSoftware/gamescope/issues/356
This has been introduced way back in
be297d9d14 but is never used anywhere.
If compositors want to save the old dimensions before reacting to a
fullscreen or maximize event they can just grab the sizes within their
event handlers instead.
The old code to render transformed textures with pixman would run
composite over the whole output regardless of the texture size. When
rendering something small this caused a huge performance hit.
Rewrite the transform branch of render_pass_add_texture to:
- Only composite over the rectangle we're drawing to
- Generally try to make things a lot clearer and some comments
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3832
This change makes it possible to support both the direct srgb-format
pipeline and indirect (color-managed, or non-srgb-format) pipeline
for the same render buffer.
Fix source crop in the pixman render backend. It was being applied by
using a source offset as arguments to pixman_image_composite32(). But
this is wrong because the source crop should get applied before all the
other transforms, not after them (or at least this is how it works in
the other wlroots render backends). Instead, apply the source crop as
yet another matrix transform when we're doing transforms (Or keep it the
same as previously if there's no other transforming going on).
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3830
The translations for flipped offsets were set the same as non-flipped
ones which was totally wrong and meant that any textures with
flipped-transforms rendered entirely outside the viewport and were
basically invisible.
Instead of having separate getters for shm formats and DMA-BUF
formats, use the same pattern as wlr_output_impl.get_primary_formats
with a single function which takes buffer caps as input.
Clients may, for example, commit an exclusive zone larger than the
output dimensions. Compositors must handle this gracefully, which likely
requires more work on the compositor side but returning a usable area
with negative width or height in wlr_scene_layer_surface_v1_configure()
is nonsensical.
Pre-multipled sRGB values need to be un-multiplied before conversion
to linear and then re-multiplied after. Compare shaders/texture.frag.
This fixes an issue in labwc where titlebar corners (rendered as
ARGB textures) did not match the rest of the titlebar (rendered as
a solid wlr_scene_rect).
Note: 0.17 has other instances in render/vulkan/renderer.c that need
the same fix.
Our multi-gpu path currently needs to blit a buffer in order to have a
primaryfb to add to the commit. This is expensive, and we skip it
entirely during test commits. This in turn also means that we skip tests
commits entirely for such outputs, outside our own basic tests.
Backend-wide commits missed this check, and tried to perform test
commits for multi-gpu outputs despite no primaryfb having been attached,
making them always fail. Add the same exception as we have in the
per-connector commit-test.
As of currently, when an xcursor theme depends on itself or another theme
that will eventually depend on it, `xcursor_load_theme` will recurse
infinitely while processing the inherits.
This change introduces a stack-allocated linked list of visited nodes
by name, and skips any already visited nodes in the inherit list.
Side effects:
* Since the linked list is stack-allocated, there is a potential for an
overflow if there is a very long list of dependencies. If this turns out
to be a legitimate concern, the linked list is trivial to convert to
being heap-allocated.
* There is an existing linked list (technically doubly linked list)
implementation in the wayland codebase. As of currently, the xcursor
codebase does not refer to it. Consequently, this change writes a
minimal single linked list implementation to utilize directly.
This changeset is based on the merge request in wayland/wayland!376.
The xcursor code is mostly shared between the two.
This changeset diverges the files slightly due to stylistic differences
between the repositories, but the logic is identical.
Signed-off-by: Chloé Vulquin <toast@bunkerlabs.net>