aboutsummaryrefslogtreecommitdiff
path: root/render/egl.c
AgeCommit message (Collapse)Author
2020-04-09render/egl: make config attribs constSimon Ser
wlr_egl_init is not allowed to mutate these attribs.
2020-01-12render/egl: remove SURFACELESS_MESA special caseSimon Ser
Users can just pass EGL_DEFAULT_DISPLAY themselves.
2019-12-21render: fix EGL extensions not loadedSimon Ser
Some extensions are only advertised by the EGL implementation with a non-zero EGLDisplay. That's the case when the extension can only be enabled when the hardware/driver supports it for instance. Instead of checking for all extensions without a display, check only for EGL_EXT_platform_base and EGL_KHR_debug which are used before eglGetDisplay. Check for all other extensions when we have a display. Closes: https://github.com/swaywm/wlroots/issues/1955
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-23render/egl: prevent use-after-free when destroying current surfaceSimon Ser
2019-10-11render/egl: support formats with zero modifiersSimon Ser
2019-09-15render/egl: Change KHR_debug log to include error codeScott Anderson
2019-04-26render/egl: fix swapping with no damageSimon Ser
According to the spec: > If <n_rects> is 0 then <rects> is ignored and the entire > surface is implicitly damaged and the behaviour is equivalent > to calling eglSwapBuffers. When we want to swap with an empty damage region, set the damage to a single empty rectangle.
2019-04-23render/egl: fix zero-length VLASimon Ser
2019-04-22Fix missing headers when building without X11Alyssa Ross
The deleted includes are redundant, because other headers will include the necessary files. Additionally, they cause build failures, because including EGL/egl.h or EGL/eglext.h directly, instead of through wlr/render/egl.h or wlr/render/interface.h, will mean that MESA_EGL_NO_X11_HEADERS will not have been defined, and so the EGL headers will attempt to pull in unnecessary X11 headers that may not exist on the system. For the headers produced by glgen.sh, the includes couldn't simply be deleted, because no other header would include the EGL headers. Neither wlr/render/egl.h or wlr/render/interface.h felt appropriate to include, so I opted instead to copy the MESA_EGL_NO_X11_HEADERS definition before the EGL includes.
2019-04-01render: switch wlr_renderer to wlr_drm_format_setemersion
2018-11-13output: make wlr_egl flip the damageemersion
2018-10-28render: on Wayland, make eglSwapBuffers non-blockingemersion
2018-10-15Fix libdrm includesScott Anderson
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-14Merge pull request #1309 from swaywm/fix-headless-libinputemersion
Fix headless backend
2018-10-13Fix include path for (libdrm/)drm_fourcc.hCole Mickens
This PR broke a private nixpkgs definition I have for wlroots: https://github.com/swaywm/wlroots/pull/1304 It is fixed by changing `#include <drm_fourcc.h>` to `#include <libdrm/drm_fourcc.h>`, which follows what is already done in the dmabuf example.
2018-10-13Fix headless backendDrew DeVault
It was only working if you ran it underneath an already-working Wayland compositor. Running with the headless backend on the API would break.
2018-10-12Support older wlr_linux_dmabuf_v1 clientsnyorain
If a client uses an older version of the dmabuf protocol, use the `formats` event instead of `modifiers` (since that didn't exist in older versions). With a bit of necessary guessing, support dmabuf importing even when EGL_EXT_image_dma_buf_import_modifiers isn't present instead of failing up front.
2018-07-09util: add wlr_ prefix to log symbolsemersion
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-08Fix atti assert in wlr_egl_initBrian Ashworth
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-05-23fix server exit: eglMakeCurrent Invalid displayagr
2018-05-13fix check of EGL_WL_bind_wayland_display presenceAlain Greppin
2018-04-26Log required extension name if unavailableemersion
2018-04-25render/egl: allow passing NULL to surface and image destructorsemersion
2018-04-24render/egl: add wlr_egl_destroy_surfaceemersion
2018-04-21Remove a few local prefixed symbolsemersion
2018-04-04egl: silence dmabuf error when extension is not presentGuido Günther
This makes it match 4bf936360d42fb5b96a44fd17028ae66fc462362.
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-27Implement layer surface damageDrew DeVault
2018-03-27Arrange & render layer surfacesDrew 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-23linux-dmabuf: Support multi plane formats like NV12Guido Günther
2018-03-21render/egl: use EGL_KHR_debugemersion
2018-03-16egl: print supported dmabuf formatsGuido Günther
Useful for debugging dmabuf related problems e.g. when a client requests a certain and we fail to support it.
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-28Avoid false positives on egl extension matchingGuido Günther
Due to the strstr prefix match EGL_EXT_foo would be incorrectly matched if EGL_EXT_foobar would be available but not foo. This doesn't matter for the currently checked extensions but will matter for EGL_EXT_image_dma_buf_import_modifiers vs EGL_EXT_image_dma_buf_import Code borrowed from weston