Commit Graph

206 Commits

Author SHA1 Message Date
Simon Ser 822eb07eac build: set pkgconfig URL
For informational purposes.
2023-02-15 10:38:20 +01:00
Simon Ser faa631c348 build: remove unnecessary pkgconfig arguments
If left unspecified, these defaults to the project name and version.
2023-02-15 10:37:14 +01:00
Simon Ser 6c897756b6 build: use a configuration file for internal features
This avoids re-building the whole project when switching one
Meson option. This shrinks down the compiler invocation command
line, making it more readable and making it easier to inspect
which flags are passed in (the generated file can be opened).
Additionally this is more consistent with our external feature
handling, which uses <wlr/config.h> already.
2022-12-06 22:39:45 +00:00
Simon Ser f0375eed24 backend/session: make optional
Some compositors are not interested in wlr_session, for instance
nested compositors.

Disabling wlr_session removes the udev dependency.
2022-11-25 16:15:29 +00:00
Simon Ser fdb24d19ca allocator/drm_dumb: use libdrm dumb buffer helpers
References: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/272
2022-11-17 08:05:55 +00:00
Simon Ser 8bbe8624df build: bump pixman version
The new version offers const pixman_region32_t APIs, which we will
make use of in the following commits.
2022-11-11 23:11:17 +00:00
Simon Ser 6c33e5dc50 build: add subproject fallback for Pixman
Allows users to use a Meson subproject for Pixman.
2022-11-11 23:11:17 +00:00
Simon Ser 1928d1ce9f build: move udev dep to backend/
The DRM, libinput and session use udev. They are all hosted under
backend/.
2022-11-11 23:11:17 +00:00
Simon Ser 5b23987349 build: bump version to 0.17.0-dev 2022-11-11 18:30:56 +01:00
Simon Ser 1712a7d274 build: bump to version 0.16.0 2022-11-11 18:22:17 +01:00
Simon Ser a75f9be2e8 render/gles2: move shaders to individual files
Instead of having a C file with strings for each shader, move each
shader into its own file. Use a small POSIX shell script to convert
the files into C strings (can't wait for C23 #embed...).

The benefits from this are:

- Improved readability and syntax highlighting.
- Line numbers in shader compiler errors are easier to make sense of.
- Consistency with the Vulkan renderer.
- Shaders will become more complicated as we add color management
  features.
2022-10-28 11:46:06 +00:00
Rouven Czerwinski baf3fa27dc meson: update default options for libdrm
Libdrm now uses enabled/disabled/auto for the drivers, migrate to these
new defaults.

Error message from meson:

  wlroots| subprojects/wlroots/subprojects/libdrm/meson.build:21:0: Exception: Value "false" (of type "string") for combo option "Enable support for Intel's KMS API." is not one of the choices. Possible choices are (as string): "enabled", "disabled", "auto".`
2022-09-25 12:54:38 +02:00
Simon Ser 4ad79d05ca render/egl: improve DMA-BUF format/modifier logging
For each format and modifier, log supported usage. Log a
human-readable format/modifier string.
2022-09-14 12:13:17 +02:00
Simon Zeni 013f121f45 build: remove libkms option and disable tests for libdrm fallback 2022-08-18 07:29:52 +00:00
Simon Ser bd587a7f43 backend/drm: use drmModeGetConnectorTypeName
No need to manually maintain this table now.

The wlroots names and the libdrm (= kernel) names all match.

References: 50f8d51773
2022-07-25 17:28:33 +00:00
José Expósito c8f8ac672c build: bump Wayland to v1.21 2022-07-11 11:01:35 +02:00
Simon Ser c20468cfa2 render: use internal_features to indicate EGL support
Instead of checking whether the wlr_egl dependencies are available
in the GLES2 code, introduce internal_features['egl'] and check
that field.

When updating the EGL dependency list, we no longer need to update
the GLES2 logic.
2022-06-24 07:20:42 +02:00
Simon Ser bb2946f737 build: make GBM optional
Now that the DRM backend no longer depends on GBM, we can make it
optional. The GLES2 renderer still depends on it because of our EGL
device selection.

This is useful for compositors with their own renderers, and for
compositors using the Vulkan renderer.
2022-05-30 13:30:08 +00:00
Simon Ser 078d8dd472 build: bump version to 0.16.0-dev
Same as [1].

[1]: https://github.com/swaywm/sway/pull/6730
2022-05-24 15:04:14 +02:00
Kirill Chibisov 2e14bed9f7 meson: use target_machine instead of host_machine 2022-04-03 11:46:25 +00:00
Kenny Levinsen bb32349c97 meson: soversion arg should be string
muon, a meson implementation in C, is more strict with its types and
revealed this discrepancy between meson behavior and documentation.
2022-03-28 20:21:49 +02:00
Simon Ser b5a019d575 build: simplify Meson subproject fallbacks
All of these projects use meson.override_dependency() so we can
stop referencing their internal variable name to grab the
depndencies we need.
2021-12-19 18:12:16 +00:00
Simon Ser 562b24b9fc build: bump soversion
According to [1] this should be done at each release with breaking ABI
changes.

[1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/wikis/Core-contributor-guide#releasing-a-new-version

Fixes: 7360810f2e ("build: bump to version 0.16.0")
2021-12-17 12:53:18 +01:00
Simon Ser 7360810f2e build: bump to version 0.16.0 2021-12-17 11:54:06 +01:00
Simon Ser 9f41627aa1 backend/wayland: add basic linux-dmabuf feedback support
This patch makes it so we bind to zwp_linux_dmabuf_v1 version 4 and
we use it to grab the main device. v4 sends supported formats via a
table so we need to handle this as well.

v4 allows wlroots to remove the requirement for Mesa's internal
wl_drm interface.
2021-12-15 14:34:08 +00:00
Simon Ser c0b120a30c build: add subproject fallback for libdrm 2021-12-14 14:33:00 +01:00
Simon Ser a15c327718 backend/drm: use drmModeFormatModifierBlobIterNext
This avoids open-coding our own logic. The resulting code is more
readable.

References: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/146
2021-12-14 13:21:09 +00:00
Simon Ser e3fefda023 output: add support for protocol interface version 4
Two new events are added: name and description. The name is
immutable. The description can be updated on-the-fly.
2021-12-13 12:06:16 +00:00
Simon Ser ad28490cf4 build: move wayland-client dep to backend/wayland/
wayland-client isn't really used by wlroots core, so let's move the
dep to where it's needed in the Wayland backend.
2021-12-07 16:11:29 +01:00
Simon Zeni 52c34e8253 tinywl: build with meson if examples option is enabled 2021-11-19 16:42:14 +00:00
nyorain 8e34692250 render/vulkan: add Vulkan renderer
This new renderer is implemented with the existing wlr_renderer API
(which is known to be sub-optimal for some operations). It's not
used by default, but users can opt-in by setting WLR_RENDERER=vulkan.

The renderer depends on VK_EXT_image_drm_format_modifier and
VK_EXT_physical_device_drm.

Co-authored-by: Simon Ser <contact@emersion.fr>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
2021-10-18 11:51:13 +02:00
Simon Ser d9523faa76 build: add subproject fallback for wayland 2021-09-01 15:51:03 -04:00
Simon Ser d48ffac56b build: remove "." from include dirs 2021-08-06 19:44:35 +02:00
ayaka 70fb21c35b backend: make DRM and libinput backends optional
Co-authored-by: Simon Ser <contact@emersion.fr>
2021-07-22 09:56:38 -04:00
Simon Ser 31db232704 build: use meson.global_build_root()
meson.build_root() is deprecated.

References: https://github.com/mesonbuild/meson/pull/8629
2021-06-25 10:01:25 -04:00
Simon Ser 0467a7523a build: bump version to 0.15.0 2021-06-23 14:30:57 +02:00
Kenny Levinsen 15c8453ba1 Revert "meson: Make private static library symbols local"
This reverts commit 28d23ba6bda4f799b8d6689555cd33a40adda17e.

The prelinking and symbol filtering pass breaks builds with link-time
optimization enabled.
2021-06-20 21:04:23 +02:00
Kenny Levinsen cb6db86a28 meson: Make private static library symbols local
Static libraries are not affected by our symbol file, so private symbols
are globally visible by default.

Use objcopy to make symbols that we do not want to expose local.

Closes: https://github.com/swaywm/wlroots/issues/1892
Closes: https://github.com/swaywm/wlroots/issues/2952
2021-06-17 11:02:30 +02:00
Simon Ser fb933d3204 backend/session: use drmIsKMS
This moves the magic incantation into libdrm and is clearer. See
[1] for details.

While at it, fixup the doc comment and improve logging.

[1]: 523b3658aa
2021-06-17 00:27:12 +02:00
Simon Ser 8ff435831f xdg-activation-v1: new protocol implementation
This implements the new xdg-activation-v1 protocol [1].

[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/50
2021-06-02 11:18:25 +02:00
Simon Ser 66d5805594 build: move wayland-protocols dep to protocol/ 2021-05-01 12:33:50 +02:00
ayaka ed1924800d render: make GLES2 renderer optional
Allow selecting whether the GLES2 renderer gets enabled.

Co-authored-by: Simon Ser <contact@emersion.fr>
2021-04-17 16:39:40 +02:00
Simon Zeni 0d90dddfab render: introduce pixman renderer 2021-04-17 09:54:39 +02:00
Kenny Levinsen 95b657ba80 backend/session: Make libseat mandatory 2021-04-14 23:25:07 +02:00
Ryan Farley b29ac8fbac util/uuid: replace with util/token, remove libuuid
Use 128-bit hexadecimal string tokens generated with /dev/urandom
instead of UUIDs for xdg-foreign handles, removing the libuuid
dependency. Update readme and CI. Closes #2830.

build: remove xdg-foreign feature

With no external dependencies required, there's no reason not to always
build it. Remove WLR_HAS_XDG_FOREIGN as well.
2021-04-11 19:09:36 +02:00
Kenny Levinsen d50bbf0bbc backend/session: Remove logind backend
This is instead delegated to libseat.
2021-04-11 10:03:13 +02:00
Simon Ser 1eb38e0015 Remove WLR_HAS_XCB_ERRORS
wlroots' dependency on this library doesn't change the features
exposed to compositors. It's purely a wlroots implementation detail.
Thus downstream compositors shouldn't really care about it.

Introduce an "internal_features" dictionary to store the status of
such internal dependencies.
2021-04-09 21:54:38 +02:00
Simon Ser 1c10079a67 build: bump version to 0.14.0
We now bump the version number right after releases, so that a Git
snapshot is not mistaken for a previous version.

References: https://github.com/swaywm/wlroots/issues/2792
2021-04-08 08:53:07 +02:00
Simon Ser 69c71dbc8a build: bump to v0.13.0
References: https://github.com/swaywm/wlroots/issues/2778
2021-04-07 21:19:31 +02:00
Simon Ser de5347d0f2 xwayland: require xcb-icccm
This dependency is already required by many other widely used X11
programs, such as i3, Qt, and other XWMs. So it should be available
on most systems.

X11 support can be pretty broken without xcb-icccm, with focus issues
for instance. Let's just remove this --please-break-my-desktop footgun
option.
2021-03-29 12:24:26 +02:00