aboutsummaryrefslogtreecommitdiff
path: root/render/wlr_renderer.c
AgeCommit message (Collapse)Author
2022-12-01wlr_texture: Expose owning rendererAlexander Orzechowski
2022-11-30linux-dmabuf-v1: add version arg to create()Simon Ser
To be able to add support for newer versions without breaking changes.
2022-11-30linux-dmabuf-v1: add "_with_renderer" suffix to create() functionSimon Ser
Make it clear this is a helper consuming a wlr_renderer. We'll add a lower-level create() function which doesn't take it in the next commit.
2022-11-15render: use wlr_shm in wlr_renderer_init_wl_shm()Simon Ser
2022-11-15render: add wlr_renderer.events.lostSimon Ser
2022-11-15render: make wlr_renderer_begin return a boolSimon Ser
2022-10-04render: drop wlr_renderer_read_pixels() flagsSimon Ser
These are unused.
2022-10-01render: don't fall back to Pixman if we have a render nodeSimon Ser
If we have a render node, it means there is a GPU which could be used. We probably failed GL because of a kernel or Mesa issue. Instead of automatically falling back to Pixman, error out. This makes it more obvious to users when something goes wrong, instead of silently exposing a slow unaccelerated desktop. References: https://github.com/swaywm/sway/issues/7194
2022-10-01render: don't automatically fall back to VulkanSimon Ser
The Vulkan renderer is still experimental. If GL fails, we don't want to automatically fall back to it by default. Fixes: 8bd7170fd95a ("Use env helpers")
2022-09-23render: drop trailing whitespaceSimon Ser
2022-08-22Use env helpersAlexander Orzechowski
2022-08-18Use wl_signal_emit_mutableAlexander Orzechowski
2022-04-28Zero-initialize structs in init functionsSimon Ser
Ensures there is no field left to its previous undefined value after calling an init function.
2021-12-07render: add wlr_renderer_init_wl_shmSimon Ser
This allows compositors to initialize wl_shm without initializing other globals like linux-dmabuf.
2021-11-25render: introduce WLR_RENDER_DRM_DEVICESimon Ser
This env var allows to override the DRM node used by the GLES2 and Vulkan renderers. It's especially useful to select a DRM node when running with the headless backend. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/2656
2021-11-25render: pick DRM FD in autocreateSimon Ser
If the backend hasn't picked a DRM FD but supports DMA-BUF, pick an arbitrary render node. This will allow removing the DRM device selection logic from the headless backend.
2021-10-18render/vulkan: add Vulkan renderernyorain
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-07-22render: drop wlr_renderer_impl.init_wl_displaySimon Ser
Now that we have our own wl_drm implementation, there's no reason to provide custom renderer hooks to init a wl_display in the interface. We can just initialize the wl_display generically, depending on the renderer capabilities.
2021-07-06move wlr_box from /types to /utilSimon Zeni
2021-07-05render: remove wl_drm support from wlr_rendererSimon Ser
Everything needs to go through the unified wlr_buffer interface now. If necessary, there are two ways support for EGL_WL_bind_wayland_display could be restored by compositors: - Either by using GBM to convert back EGL Wayland buffers to DMA-BUFs, then wrap the DMA-BUF into a wlr_buffer. - Or by wrapping the EGL Wayland buffer into a special wlr_buffer that doesn't implement any wlr_buffer_impl hook, and special-case that buffer type in the renderer.
2021-07-01render: drop wlr_renderer_impl.texture_from_pixelsSimon Ser
2021-06-09render: add missing arg to wlr_renderer_impl.get_buffer_capsSimon Ser
The types of buffers supported by the renderer might depend on the renderer's instance. For instance, a renderer might only support DMA-BUFs if the necessary EGL extensions are available. Pass the wlr_renderer to get_buffer_caps so that the renderer can perform such checks. Fixes: 982498fab3c4 ("render: introduce renderer_get_render_buffer_caps")
2021-06-09render: drop wlr_ prefix from wlr_renderer_bind_bufferSimon Ser
Make it clear this function is a private wlroots API and will stay that way.
2021-06-01render: add wlr_renderer_begin_with_bufferSimon Ser
This allows compositors to choose a wlr_buffer to render to. This is a less awkward interface than having to call bind_buffer() before and after begin() and end(). Closes: https://github.com/swaywm/wlroots/issues/2618
2021-06-01render: disallow wlr_renderer_destroy while renderingSimon Ser
This probably already felt apart, but let's make it explicit that this is not allowed.
2021-04-29render: remove wlr_ prefix from wlr_renderer_autocreate_with_drm_fdSimon Ser
This function is only required because the DRM backend still needs to perform multi-GPU magic under-the-hood. Remove the wlr_ prefix to make it clear it's not a candidate for being made public.
2021-04-28Log when WLR_BACKENDS/WLR_RENDERER is setSimon Ser
Makes it easier to figure out why a backend/renderer is picked.
2021-04-28render: introduce renderer_get_render_buffer_capsSimon Zeni
2021-04-26render: unconditionally read WLR_RENDERERSimon Ser
Prior to this commit, WLR_RENDERER was only looked up when the backend returned a DRM FD. Make it so WLR_RENDERER is always looked up, so that running wlroots on a system without a GPU and with WLR_RENDERER=gles2 fails as expected instead of falling back to the Pixman renderer.
2021-04-20render: introduce WLR_RENDERER in wlr_renderer_autocreate_with_drm_fdSimon Zeni
This env var forces the creation of a specific renderer. If no renderer is specified, the function will try to create all of the renderers one by one until one is created successfuly.
2021-04-17render: make GLES2 renderer optionalayaka
Allow selecting whether the GLES2 renderer gets enabled. Co-authored-by: Simon Ser <contact@emersion.fr>
2021-04-17renderer: create pixman renderer if getting drm fd failedSimon Zeni
2021-04-17render: introduce pixman rendererSimon Zeni
2021-04-15render: rename get_dmabuf_render_formats into get_render_formatsSimon Zeni
2021-04-12backend: move get_drm_fd to public interfaceRoman Gilg
The get_drm_fd was made available in an internal header with a53ab146f. Move it now to the public header so consumers opting in to the unstable interfaces can make use of it.
2021-04-08render: drop support for ellipsesSimon Ser
For anything more complicated than quads, compositors can easily ship their own shaders. Closes: https://github.com/swaywm/wlroots/issues/2759
2021-04-08render: drop wlr_renderer_blit_dmabufSimon Ser
It can be replaced with wlr_renderer_bind_buffer. blit_dmabuf is broken as-is (dies on an assertion).
2021-03-25Move render/shm_format functions to render/pixel_formatSimon Zeni
2021-02-23render: use DRM formats in wlr_renderer_read_pixelsSimon Ser
2021-02-23render: use DRM formats in wlr_renderer_get_shm_texture_formatsSimon Ser
2021-01-29render/egl: remove *config_attribs and wlr_egl->configBrandon Dowdy
Breaking changes: Both "EGLint *config_attribs" and "wlr_egl->config" no longer exist.
2021-01-20Revert "render: add wlr_egl_create_from_drm_fd function"Simon Ser
This reverts commit ee31be167b4e2c4682f3da6f22bddc23796f213d.
2021-01-20Revert "render/egl: remove unused gbm_device member"Simon Ser
This reverts commit 306cf11d8702c82be61e027a9bb76e27e89b34d3.
2021-01-20render/egl: remove unused gbm_device memberSimon Zeni
2021-01-20render: add wlr_egl_create_from_drm_fd functionSimon Zeni
2021-01-16render: introduce private wlr_renderer_autocreate_with_drm_fdSimon Ser
2021-01-16render: drop egl parameters from wlr_renderer_autocreateSimon Zeni
2021-01-12render/egl: replace init/finish with create/destroySimon Ser
This ensures wlr_gles2_renderer can properly take ownership of the wlr_egl. Closes: https://github.com/swaywm/wlroots/issues/2612
2021-01-12render/egl: remove support for EGL_NATIVE_VISUAL_IDSimon Ser
Nobody uses it anymore.
2021-01-07backend: remove wlr_egl from all backendsSimon Zeni