Commit Graph

183 Commits

Author SHA1 Message Date
Scott Anderson a2bbf2c1f7 Make style more consistent 2018-08-22 21:16:16 +12:00
Mariusz Bialonczyk ad406db21c gles2: change context when it is not current
Texture functions, that create and manipulate textures should switch
the current context if necessary.

thanks to: @emersion

Fixes #934
2018-08-03 07:43:22 +02:00
Drew DeVault b902c2bd7c Revert "Move side-effect out of assert statement"
This reverts commit a0afedcd8f.
2018-07-13 15:46:54 -04:00
Drew DeVault a0afedcd8f Move side-effect out of assert statement 2018-07-13 13:54:09 -04:00
emersion c4915d1492 render: add wlr_texture_is_opaque 2018-07-12 23:35:33 +01:00
emersion 7cbef15206
util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
emersion cc9b198f9e
render/gles2: ditch extra parens 2018-06-30 23:19:02 +01:00
emersion bf7560b7cd
screencopy: add capture_output_region support 2018-06-30 22:18:04 +01:00
emersion 2b9cbaddf3
screencopy: add support for frame flags 2018-06-30 22:18:03 +01:00
Dominique Martinet 4cc4412481 wlr_renderer_destroy: fix renderer NULL check
renderer is checked for NULL, but was dereferenced before that.

Found through static analysis
2018-06-30 11:38:21 +09:00
emersion 57548b557a
Merge branch 'master' into screencontent 2018-06-17 14:49:18 +01:00
emersion d643361c48
Merge pull request #1047 from NotKit/gles2fix
Fix GLES2 renderer to use glGetUniformLocations locations
2018-06-13 15:37:16 +01:00
NeKit 6f29db1044 gles2 renderer: introduce struct wlr_gles2_tex_shader 2018-06-13 13:43:01 +03:00
Vincent Vanlaer f1a62a3200 Rename egl.exts to match the extension names 2018-06-09 19:11:51 +02:00
Vincent Vanlaer 5ec6d8230d Split eglSwapBuffersWithDamage feature detection
Detecting whether eglSwapBuffersWithDamageEXT or
eglSwapBuffersWithDamageKHR is used should be based on the extension
string, not only on the availability of the function.
2018-06-09 11:39:14 +02:00
Brian Ashworth 18bbe2d897 Fix atti assert in wlr_egl_init 2018-06-08 20:25:36 -04:00
emersion 457bfcab19
render/egl: only request high priority context on DRM 2018-06-08 00:17:45 +01:00
emersion d425edc96c
render/egl: consistent extension checking 2018-06-08 00:06:34 +01:00
emersion cbfe0e834a
Request a high priority EGL context 2018-06-08 00:06:34 +01:00
NeKit de91c55ea9 Fix GLES2 renderer to use glGetUniformLocations locations
This is needed as uniform locations are driver implementation-specific.
2018-06-07 18:06:31 +03:00
emersion 6b7a55aa3d
Merge pull request #1020 from emersion/remove-check-dmabuf
render: remove wlr_renderer_check_import_dmabuf
2018-05-31 21:49:57 +01:00
emersion 21928cbe61
Merge branch 'master' into screencontent 2018-05-31 12:33:27 +01:00
Genki Sky d1cf9acbd5 cleanup: Use void for zero-parameter functions
Signed-off-by: Genki Sky <sky@genki.is>
2018-05-30 20:19:16 -04:00
emersion 135721118a
render: remove wlr_renderer_check_import_dmabuf
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-30 17:08:15 +01:00
emersion 28020ff577
Only allow one modifier per DMA-BUF, split attributes struct in render/ 2018-05-30 09:29:12 +01:00
emersion 5ba1a9af56
render: add wlr_texture_to_dmabuf 2018-05-29 18:47:17 +01:00
emersion 6eb4b5b54d
Merge pull request #993 from emersion/bind-wl-drm-in-renderer
render: bind wl_drm in renderer
2018-05-25 13:54:16 +01:00
Ilia Bozhinov 24cf70ae96 backends: implement custom EGL and renderer initialization
Compositors now have more control over how the backend creates its
renderer. Currently all backends create an EGL/GLES2 renderer, so
the necessary attributes for creating the context are passed to a
user-provided callback function. It is responsible for initializing
provided wlr_egl and to return a renderer. On fail, return 0.

Fixes #987
2018-05-25 14:56:52 +03:00
agr 4e89e0fc6c fix server exit: eglMakeCurrent Invalid display 2018-05-23 16:17:29 +02:00
emersion 41130fe54b
render: bind wl_drm in renderer 2018-05-21 19:07:08 +01:00
Ilia Bozhinov 47ffd0e184 gles2: pre-multiply alpha and fix blending function 2018-05-18 20:34:36 +03:00
Brian Ashworth 35e83800d4 Fix alpha for src_rgba and src_rgbx 2018-05-15 22:29:36 -04:00
Alain Greppin b2f8f00ae3 fix check of EGL_WL_bind_wayland_display presence 2018-05-13 15:17:17 +02:00
emersion 5a87712ca8
Log required extension name if unavailable 2018-04-26 11:11:28 +01:00
Drew DeVault fecb971518
Merge pull request #902 from emersion/various-memory-leaks
Various memory leaks
2018-04-26 11:34:49 +02:00
emersion 449f06556a
Destroy wlr_surface with wlr_renderer 2018-04-26 00:11:36 +01:00
emersion 71ca45e2c0
Make sure we don't use others' prefixes 2018-04-25 23:24:58 +01:00
emersion 018b82c01e
render/egl: allow passing NULL to surface and image destructors 2018-04-25 08:28:48 +01:00
emersion eaed6bd03b
render/egl: add wlr_egl_destroy_surface 2018-04-24 23:44:43 +01:00
Rostislav Pehlivanov 12298ce88c Do not advertize *RGB8888 as supported shm formats
They're always available and supported, and are added automatically.
Adding them again just duplicates them.
2018-04-21 14:58:25 +01:00
Drew DeVault b116414bd5
Merge pull request #880 from emersion/advertize-renderer-formats
Advertize supported renderer formats
2018-04-21 14:45:09 +02:00
emersion 1588094b99
Remove a few local prefixed symbols 2018-04-21 10:20:33 +01:00
emersion 70d820be25
Add wlr_renderer_init_wl_shm to advertize supported renderer formats 2018-04-20 23:58:30 +01:00
emersion 1b802d9251
Make wlr_renderer_scissor take normal coords instead of upside-down ones 2018-04-12 19:38:33 -04:00
emersion d2ebbd103c
backend: remove wlr_backend_get_egl 2018-04-08 11:00:56 -04:00
Guido Günther 6a05bd3886 egl: silence dmabuf error when extension is not present
This makes it match 4bf936360d.
2018-04-04 09:28:07 +02:00
emersion f3f61bed3e
Untie wlr_gles2_renderer and wlr_gles2_texture 2018-04-01 16:07:50 -04:00
emersion a7bb48b404
render/egl: add wlr_egl_create_image_from_wl_drm
This allows external renderers and potential future GL-based
renderers to re-use this function.
2018-03-31 23:20:00 -04:00
emersion 33a2eb4b77
Untie wlr_backend from wlr_renderer 2018-03-31 18:49:43 -04:00
Drew DeVault 23d357e371 Downgrade gles2 messages to L_DEBUG
L_INFO is for stuff that's useful to the user
2018-03-31 00:27:30 -04:00