diff options
| author | Simon Ser <contact@emersion.fr> | 2019-11-10 14:31:33 +0100 | 
|---|---|---|
| committer | Scott Anderson <scott@anderso.nz> | 2019-12-20 01:03:34 +0000 | 
| commit | 515679e4fed1c7c762a8c269fca09cbb195a4323 (patch) | |
| tree | 04e4011d75869e07839c2783efaaf52655cb1dbd /include/wlr/render/egl.h | |
| parent | 774548696c0a5f3164a3ce5a85d893da6c3b18be (diff) | |
| download | wlroots-515679e4fed1c7c762a8c269fca09cbb195a4323.tar.xz | |
Refactor EGL/GL API loading
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
Diffstat (limited to 'include/wlr/render/egl.h')
| -rw-r--r-- | include/wlr/render/egl.h | 23 | 
1 files changed, 19 insertions, 4 deletions
| diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h index efded0b6..2853f8ed 100644 --- a/include/wlr/render/egl.h +++ b/include/wlr/render/egl.h @@ -22,6 +22,8 @@  #include <EGL/egl.h>  #include <EGL/eglext.h> +// TODO: remove eglmesaext.h +#include <EGL/eglmesaext.h>  #include <pixman.h>  #include <stdbool.h>  #include <wayland-server-core.h> @@ -34,8 +36,6 @@ struct wlr_egl {  	EGLConfig config;  	EGLContext context; -	const char *exts_str; -  	struct {  		bool bind_wayland_display_wl;  		bool buffer_age_ext; @@ -43,10 +43,25 @@ struct wlr_egl {  		bool image_dma_buf_export_mesa;  		bool image_dmabuf_import_ext;  		bool image_dmabuf_import_modifiers_ext; -		bool swap_buffers_with_damage_ext; -		bool swap_buffers_with_damage_khr; +		bool swap_buffers_with_damage;  	} exts; +	struct { +		PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT; +		PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC eglCreatePlatformWindowSurfaceEXT; +		PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; +		PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR; +		PFNEGLQUERYWAYLANDBUFFERWL eglQueryWaylandBufferWL; +		PFNEGLBINDWAYLANDDISPLAYWL eglBindWaylandDisplayWL; +		PFNEGLUNBINDWAYLANDDISPLAYWL eglUnbindWaylandDisplayWL; +		PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC eglSwapBuffersWithDamage; // KHR or EXT +		PFNEGLQUERYDMABUFFORMATSEXTPROC eglQueryDmaBufFormatsEXT; +		PFNEGLQUERYDMABUFMODIFIERSEXTPROC eglQueryDmaBufModifiersEXT; +		PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC eglExportDMABUFImageQueryMESA; +		PFNEGLEXPORTDMABUFIMAGEMESAPROC eglExportDMABUFImageMESA; +		PFNEGLDEBUGMESSAGECONTROLKHRPROC eglDebugMessageControlKHR; +	} procs; +  	struct wl_display *wl_display;  	struct wlr_drm_format_set dmabuf_formats; | 
