aboutsummaryrefslogtreecommitdiff
path: root/include/wlr/render/egl.h
AgeCommit message (Collapse)Author
2020-11-30render/egl: remove wlr_egl.external_only_dmabuf_formatsSimon Ser
Replace it with wlr_egl.dmabuf_render_formats.
2020-11-30render: rename wlr_renderer_get_dmabuf_formatsSimon Ser
Rename wlr_renderer_get_dmabuf_formats to wlr_renderer_get_dmabuf_texture_formats. This makes it clear the formats are only suitable for creating wlr_textures.
2020-11-30render: introduce wlr_renderer_get_dmabuf_render_formatsSimon Ser
It describes which DMA-BUF formats can be used to render.
2020-11-30render: expand wlr_renderer_get{,_dmabuf}_formats docsSimon Ser
Make it clear formats returned are only suitable for import/sampling. These formats can't be used to be rendered to.
2020-11-19render/egl: stop including eglmesaext.hSimon Ser
This is a Mesa-specific header that was needed because some Wayland EGL extensions were missing from the Khronos registry. Now that this has been fixed [1] and Mesa [2] & glvnd [3] have sync'ed their headers, we can drop this workaround. [1]: https://github.com/KhronosGroup/EGL-Registry/pull/95 [2]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4953 [3]: https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/225
2020-11-15render/egl: introduce wlr_egl_dup_drm_fdSimon Ser
2020-11-02render: define EGL_NO_PLATFORM_SPECIFIC_TYPES (#2452)Simon Ser
This avoids Xlib.h inclusion via EGL headers. See [1] for discussion. This change is based on a Weston commit [2]. [1]: https://github.com/KhronosGroup/EGL-Registry/pull/111 [2]: https://gitlab.freedesktop.org/wayland/weston/commit/526765ddfdfd
2020-06-08render: egl: Add utility functions for saving/restoring contextAndri Yngvason
2020-06-06render: choose DMA-BUF texture target via eglQueryDmaBufModifiersEXTSimon Ser
EGL_EXT_image_dma_buf_import_modifiers tells us whether we should use GL_TEXTURE_2D or GL_TEXTURE_EXTERNAL_OES. Using the right texture target can fix some failures and/or improve performance on some drivers. This does the same as a Weston commit [1]. [1]: https://gitlab.freedesktop.org/wayland/weston/commit/40c519a3e613 Closes: https://github.com/swaywm/wlroots/issues/2173
2020-05-19render/egl: introduce wlr_egl_unset_currentSimon Ser
This function can be called after wlr_egl_make_current to cleanup the EGL context. This avoids having lingering EGL contexts that make things work by chance. Closes: https://github.com/swaywm/wlroots/issues/2197
2020-05-11render/egl: include EGL/eglmesaext.h only if presentJulien Olivain
This patch will make the EGL renderer work on any EGL/GLESv2 driver providing the EGL_WL_bind_wayland_display extensions. Mesa used to declare provisional EGL_WL_bind_wayland_display directly in <EGL/eglext.h>. Then, all unofficial extensions were moved to <EGL/eglmesaext.h>, to have a cleaner implementation. See: https://gitlab.freedesktop.org/mesa/mesa/-/commit/ab7bb10a2af711086319ce35815acd797b86fe27 The extension was then approved at Khronos Group, and reached the official <EGL/eglext.h>. See: https://www.khronos.org/registry/EGL/extensions/WL/EGL_WL_bind_wayland_display.txt https://github.com/KhronosGroup/EGL-Registry/commit/aa9b63f3ab18aee92c95786a2478156430f809e4 In order to make sure the renderer will work on any version of any implementation providing the extension, only include the mesa-specific header if it's present. Signed-off-by: Julien Olivain <juju@cotds.org>
2020-04-09render/egl: make config attribs constSimon Ser
wlr_egl_init is not allowed to mutate these attribs.
2020-01-24render: unconditionally disable implicit X11 includesSimon Ser
Even if the X11 backend or Xwayland is enabled, we don't rely on EGL/egl.h including Xlib headers.
2019-12-20Refactor EGL/GL API loadingSimon Ser
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-10-16Add new define EGL_NO_X11 for newer mesa libraryDanilo Spinella
Define both MESA_EGL_NO_X11_HEADERS and EGL_NO_X11 for backward combatibility.
2019-07-27Remove all wayland-server.h includesSimon Ser
The documentation for wayland-server.h says: > Use of this header file is discouraged. Prefer including > wayland-server-core.h instead, which does not include the server protocol > header and as such only defines the library PI, excluding the deprecated API > below. Replacing wayland-server.h with wayland-server-core.h allows us to drop the WL_HIDE_DEPRECATED declaration.
2019-04-01render: switch wlr_renderer to wlr_drm_format_setemersion
2018-12-22Protect against redefining MESA_EGL_NO_X11_HEADERSJente Hidskes
2018-11-12Use #if instead of #ifdef for wlroots config dataemersion
This prevents some annoying issues when e.g. not including wlr/config.h or making a typo in the guard name.
2018-11-09Tell Mesa not to attempt X11 headersCedric Sodhi
If no X11 related things are being built, tell Mesa's eglplatform.h not to attempt inclusion of associated X11 header.
2018-10-28render: on Wayland, make eglSwapBuffers non-blockingemersion
2018-07-29Initial pass on API stability guaranteesDrew DeVault
This introduces -DWLR_USE_UNSTABLE and adds information regarding the stability status to all headers. I started with a conservative set of headers to mark as stable: - types/wlr_matrix.h - util/edges.h - util/log.h - util/region.h - xcursor.h
2018-06-17Merge branch 'master' into screencontentemersion
2018-06-09Rename egl.exts to match the extension namesVincent Vanlaer
2018-06-09Split eglSwapBuffersWithDamage feature detectionVincent Vanlaer
Detecting whether eglSwapBuffersWithDamageEXT or eglSwapBuffersWithDamageKHR is used should be based on the extension string, not only on the availability of the function.
2018-06-08render/egl: only request high priority context on DRMemersion
2018-06-08render/egl: consistent extension checkingemersion
2018-06-08Request a high priority EGL contextemersion
2018-05-31Merge branch 'master' into screencontentemersion
2018-05-30render: remove wlr_renderer_check_import_dmabufemersion
It's possible to implement it outside the renderer, by creating a texture and destroying it right away. This reduces the API surface of the renderer.
2018-05-30Only allow one modifier per DMA-BUF, split attributes struct in render/emersion
2018-05-29render: add wlr_texture_to_dmabufemersion
2018-04-25render/egl: allow passing NULL to surface and image destructorsemersion
2018-04-24render/egl: add wlr_egl_destroy_surfaceemersion
2018-04-08backend: remove wlr_backend_get_eglemersion
2018-04-01Untie wlr_gles2_renderer and wlr_gles2_textureemersion
2018-03-31render/egl: add wlr_egl_create_image_from_wl_drmemersion
This allows external renderers and potential future GL-based renderers to re-use this function.
2018-03-28Merge pull request #744 from emersion/texture-redesignTony Crisci
Redesign wlr_texture
2018-03-27Fix issue starting up client EGL on X11 backendDrew DeVault
2018-03-27render: remove GL calls from wlr_eglemersion
2018-03-24Redesign wlr_textureemersion
- Textures are now immutable (apart from those created from raw pixels), no more invalid textures - Move all wl_drm stuff in wlr_renderer - Most of wlr_texture fields are now private - Remove some duplicated DMA-BUF code in the DRM backend - Add more assertions - Stride is now always given as bytes rather than pixels - Drop wl_shm functions Fun fact: this patch has been written 10,000 meters up in the air.
2018-03-21render/egl: use EGL_KHR_debugemersion
2018-03-15Add initial linux_dmabuf protocol supportGuido Günther
Tested with ./weston-simple-dmabuf-drm ./weston-simple-dmabuf-drm --import-immediate=1 ./weston-simple-dmabuf-drm --y-inverted=1 (and combinations) Supports only single plane XRGB dmabufs for now.
2018-02-12Reformat all #include directivesemersion
2018-02-09Swap buffers with damageemersion
2018-01-22render: add wlr_renderer_clear and wlr_renderer_scissoremersion
2018-01-21output: add damage tracking via buffer ageemersion
2017-12-17Refactor wlr_egl_init to accept config_attribsemersion
2017-12-08Listen to display destroy in xwayland, rename wlr_egl_freeemersion
2017-10-22Move egl.h to render/egl.hScott Anderson