Commit graph

40 commits

Author SHA1 Message Date
Jan Beich
760e166578 render: completely disable gles2 if requested but libEGL is found
For `required` to disable search the value needs to be of `feature` type.
Checking `gles2` via `in` keyword returns a `bool` but `required: false`
makes the dependency optional instead of disabled.
2021-11-02 09:36:38 +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
3ce2ea9e16 Move allocator stuff into new directory
Add render/allocator/ and include/render/allocator/ to hold
everything allocator-related.
2021-08-25 09:57:20 -04:00
Simon Ser
66e100ffbf render/gbm_allocator: add support for gbm_bo_get_fd_for_plane
See [1]. This allows us to remove the workaround for GBM API
limitations.

[1]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5442
2021-05-19 10:17:28 +02:00
Simon Zeni
ed7f2651b6 render: add DRM dumb buffer allocator 2021-05-05 10:40:21 +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
Simon Ser
c6b009ef85 render: introduce shared memory allocator
It allocates in local main memory via shm_open, and provides a FD
to allow sharing with other processes.

This is suitable for software rendering under the Wayland and X11
backends.
2021-04-17 09:54:39 +02:00
Simon Zeni
50d2985607 Move render/shm_format functions to render/pixel_format 2021-03-25 10:55:54 +01:00
Simon Zeni
5fd82c6f54 render/pixel_format: introduce pixel format info table 2021-03-25 10:55:54 +01:00
Simon Ser
5d6d76c61f render/shm_format: add wl_shm_format conversion helpers 2021-02-23 16:09:26 +01:00
Simon Ser
87293d1b15
render: extract gles2 build files to subdir
This will make it easier to toggle when we make our GLES2 renderer
optional.
2021-01-15 22:13:04 +01:00
Simon Ser
b0a663d39d render: introduce wlr_swapchain
The swapchain maximum capacity is set to 4, so that we have enough room
for:

- A buffer currently displayed on screen
- A buffer queued for display (e.g. to KMS)
- A pending buffer that'll be queued next commit
- An additional pending buffer in case we want to invalidate the
  currently pending one
2020-11-15 22:48:42 +01:00
Simon Ser
5913040110 render: introduce wlr_gbm_allocator 2020-11-15 22:48:42 +01:00
Simon Ser
f47445f142 render: introduce wlr_allocator 2020-11-15 22:48:42 +01:00
Scott Anderson
cff1c2f740 meson: Various improvements
Bumps minimum version to 0.51.0

- Remove all intermediate static libraries.
  They serve no purpose and are just add a bunch of boilerplate for
  managing dependencies and options. It's now managed as a list of
  files which are compiled into libwlroots directly.

- Use install_subdir instead of installing headers individually.
  I've changed my mind since I did that. Listing them out is annoying as
  hell, and it's easy to forget to do it.

- Add not_found_message for all of our optional dependencies that have a
  meson option. It gives some hints about what option to pass and what
  the optional dependency is for.

- Move all backend subdirectories into their own meson.build. This
keeps some of the backend-specific build logic (especially rdp and
session) more neatly separated off.

- Don't overlink example clients with code they're not using.
  This was done by merging the protocol dictionaries and setting some
  variables containing the code and client header file.
  Example clients now explicitly mention what extension protocols they
  want to link to.

- Split compositor example logic from client example logic.

- Minor formatting changes
2019-12-23 07:48:29 -05:00
Simon Ser
515679e4fe Refactor EGL/GL API loading
Remove glapi.sh code generation, replace it with hand-written loading
code that checks extension strings before calling eglGetProcAddress.

The GLES2 renderer still uses global state because of:

- {PUSH,POP}_GLES2_DEBUG macros
- wlr_gles2_texture_from_* taking a wlr_egl instead of the renderer
2019-12-20 01:03:34 +00:00
Simon Ser
16e5e9541b Add -Wmissing-prototypes
This requires functions without a prototype definition to be static.
This allows to detect dead code, export less symbols and put shared
functions in headers.
2019-11-20 02:05:03 +00:00
Scott Anderson
c01b81c99c
render: introduce wlr_drm_format_set
This types adds a container for formats + modifiers.

A list that is of [format [modifier]] was chosen instead of
[format modifer] because that is how GBM accepts them.

Co-Authored-By: emersion <contact@emersion.fr>
2019-04-01 19:15:56 +03:00
Cole Mickens
7297348736 render: fix meson including libdrm 2018-10-15 13:34:23 -07:00
Scott Anderson
7ca3bc1d6f Fix libdrm includes
This removes any assumptions about how the libdrm headers are installed,
and uses the pkg-config include directories as we're "supposed to".
This only adds a partial dependency, since we don't actually need to
link against libdrm.
2018-10-15 11:39:35 +13:00
Scott Anderson
dc37194291 Change how glgen.sh outputs files
This fixes building wlroots as a subproject.
2018-08-24 19:35:21 +12:00
Scott Anderson
fd3fa760d3 Revert "Revert "Merge pull request #1194 from ascent12/meson_feature""
This reverts commit 9c886f20b9.
2018-08-24 19:35:02 +12:00
Drew DeVault
9c886f20b9 Revert "Merge pull request #1194 from ascent12/meson_feature"
This breaks wlroots when used as a meson subproject.

This reverts commit dea311992e, reversing
changes made to 6db9c4b746.
2018-08-23 21:00:58 -04:00
Scott Anderson
a2bbf2c1f7 Make style more consistent 2018-08-22 21:16:16 +12:00
emersion
21928cbe61
Merge branch 'master' into screencontent 2018-05-31 12:33:27 +01:00
emersion
b6a3f240c7
matrix: move to types/ 2018-03-15 09:11:27 +01:00
Rodrigo Lourenço
168e26489a Add missing dependencies 2018-02-14 18:42:39 +00:00
emersion
c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
emersion
bde255933e
output: add wlr_output::damage, fixes #572 2018-01-18 19:47:21 +01:00
Scott Anderson
02374b945d Change glapi.sh to generate both files 2017-11-22 14:04:29 +13:00
Scott Anderson
c0e5feea37 Add GL/EGL extension loader generator 2017-10-08 13:23:41 +13:00
Tony Crisci
368f74e4df Refactor meson build files
Use tabs for indentation and break up function calls over 80 col.
2017-08-30 14:30:47 -04:00
Drew DeVault
d4b4bfb8bc Fix #64 2017-08-13 08:26:32 -04:00
Drew DeVault
62d8b252c0 Refactor meson and move xdg-shell into wlroots 2017-08-11 09:37:09 -04:00
Drew DeVault
c24351681f Refactor EGL handling 2017-08-10 22:15:37 -04:00
nyorain
e167f41fde Rename wlr_surface -> wlr_texture; attach -> upload 2017-08-08 18:25:16 +02:00
nyorain
fdab81e1c9 Use meson build system 2017-08-05 22:34:24 +02:00
Drew DeVault
b08aa9fd35 Revert "Merge pull request #27 from ascent12/meson"
This reverts commit 85805da021, reversing
changes made to 8189c64d7f.
2017-07-11 22:16:56 -04:00
Scott Anderson
a2ba226ba3 Use subdir 2017-07-11 09:56:54 +12:00