aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render
AgeCommit message (Collapse)Author
2022-02-28render: allow texture creation while renderingRoman Gilg
This removes an artificial limitation in form of an assert that disallowed the creation of textures while the renderer is rendering. A consumer might run its own rendering pipeline and after start of the renderer still want to create textures for internal usage.
2021-12-20wlr_texture: remove wlr_texture_from_wl_drm() from headerIsaac Freund
This function was already removed in e5b5592a but it was forgotten to remove it from the header.
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-12-03render/drm-format-set: add wlr_drm_format_set_intersectSimon Ser
This intersects two DRM format sets. This is useful for implementing DMA-BUF feedback in compositors, see e.g. the Sway PR [1]. [1]: https://github.com/swaywm/sway/pull/6313
2021-12-02render/egl: improve modifier support detectionSimon Ser
Support for EXT_image_dma_buf_import_modifiers doesn't necessarily indicate support for modifiers. For instance, Mesa will advertise EXT_image_dma_buf_import_modifiers for all drivers. This is a trick to allow EGL clients to enumerate supported formats (something EXT_image_dma_buf_import is missing). For more information, see [1]. Add a new wlr_egl.has_modifiers flag which indicates whether modifiers are supported. It's set to true if any eglQueryDmaBufModifiersEXT query returned a non-empty list. Use that flag to figure out whether the buffer modifier should be passed to the EGL implementation on import. [1]: https://github.com/KhronosGroup/EGL-Registry/issues/142
2021-12-01render/egl: add wlr_egl_create_with_contextSimon Ser
This allows creating a wlr_egl from an already-existing EGL display and context. This is useful to allow compositors to choose the exact EGL initialization parameters.
2021-12-01render/egl: store IMG_context_priority in wlr_eglSimon Ser
The next commit will split extension lookup and context initialization.
2021-11-26render: add DMA-BUF docsSimon Ser
Document some of the assumptions for DMA-BUF buffer sharing and modifiers.
2021-11-17Improve wlr_drm_format documentationDemi Marie Obenour
A wlroots user can easily get confused and think that `cap` refers to wlroots buffer capabilities, not array capacity.
2021-11-17Remove support for DMA-BUF flagsSimon Ser
They are never used in practice, which makes all of our flag handling effectively dead code. Also, APIs such as KMS don't provide a good way to deal with the flags. Let's just fail the DMA-BUF import when clients provide flags.
2021-11-09render/allocator: make wlr_allocator part of the public APISimon Zeni
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-27render/egl: initialize wlr_egl with EGL_PLATFORM_DEVICE_EXTSimon Zeni
Uses the EXT_device_query extension to get the EGL device matching the requested DRM file descriptor. If the extension is not supported or no device is found, the EGL device will be retrieved using GBM. Depends on the EGL_EXT_device_enumeration to get the list of EGL devices.
2021-07-26render/egl: add support for EGL_EXT_device_drm_render_nodeSimon Ser
This EGL extension has been added in [1]. The upsides are: - We directly get a render node, instead of having to convert the primary node name to a render node name. - If EGL_DRM_RENDER_NODE_FILE_EXT returns NULL, that means there is no render node being used by the driver. [1]: https://github.com/KhronosGroup/EGL-Registry/pull/127
2021-07-22render/wlr_texture: put wlr_texture_from_buffer into the public APISimon Zeni
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-12render/egl: rename wlr_egl.exts to better match KhronosSimon Ser
Khronos refers to extensions with their namespace as a prefix in uppercase. Change our naming to align with Khronos conventions. This also makes grepping easier.
2021-07-06move wlr_box from /types to /utilSimon Zeni
2021-07-05render/egl: remove EGL_WL_bind_wayland_display supportSimon Ser
Our GLES2 renderer doesn't use it anymore, so we can drop it.
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_dmabufSimon Ser
2021-07-01render: drop wlr_renderer_impl.texture_from_pixelsSimon Ser
2021-06-24render/egl: make most functions privateSimon Ser
The wlr_egl functions are mostly used internally by the GLES2 renderer. Let's reduce our API surface a bit by hiding them. If there are good use-cases for one of these, we can always make them public again. The functions mutating the current EGL context are not made private because e.g. Wayfire uses them.
2021-06-24render/egl: remove stale wlr_egl_export_image_to_dmabuf declSimon Ser
This function has been removed, but we forgot to drop it from the header.
2021-06-19render: add get native paint target of rendererzccrs
Add wlr_pixman_buffer_get_current_image for wlr_pixman_renderer. Add wlr_gles2_buffer_get_current_fbo for wlr_gles2_renderer. Allow get the FBO/pixman_image_t, the compositor can be add some action for FBO(for eg, attach a depth buffer), or without pixman render to pixman_image_t(for eg, use QPainter of Qt instead of pixman).
2021-06-19render/pixman: add wlr_*_is_pixman and wlr_pixman_texture_get_imagezccrs
Add the following functions: - wlr_renderer_is_pixman - wlr_texture_is_pixman - wlr_pixman_texture_get_image
2021-06-19render/gles2: add wlr_renderer_is_gles2zccrs
Export the interface used to determine whether the wlr_renderer object is gles2.
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-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-05-17render: introduce wlr_texture_from_bufferSimon Ser
This adds a a function to create a wlr_texture from a wlr_buffer. The main motivation for this is to allow the renderer to create a single wlr_texture per wlr_buffer. This can avoid needless imports by re-using existing textures.
2021-05-17render: remove wlr_texture_get_sizeSimon Ser
Users can just access the width/height fields directly.
2021-04-28render: introduce renderer_get_render_buffer_capsSimon Zeni
2021-04-20render/gles2: introduce wlr_gles2_renderer_create_with_drm_fdSimon Zeni
2021-04-17render: introduce pixman rendererSimon Zeni
2021-04-15render: rename get_dmabuf_render_formats into get_render_formatsSimon Zeni
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: remove wlr_texture_to_dmabufSimon Ser
This is unused in wlroots, and the use-cases for compositors are pretty niche since they can access the original DMA-BUF via the wlr_buffer.
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-02-23Remove unnecessary wayland-server-protocol.h includesSimon Ser
2021-02-23render: use DRM formats in wlr_texture_from_pixelsSimon Ser
2021-02-23render: use DRM formats in wlr_renderer_read_pixelsSimon Ser
2021-02-23output: use DRM format in wlr_output_preferred_read_formatSimon Ser
2021-02-23render: use DRM formats in wlr_renderer_get_shm_texture_formatsSimon Ser
2021-02-02render/dmabuf: make src arg const in wlr_dmabuf_attributes_copySimon 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-29render/egl: remove wlr_egl_{create,destroy}_surfaceBrandon Dowdy
Breaking changes: wlr_egl_create_surface and wlr_egl_destroy_surface have been removed and 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