Skip to content

Commit

Permalink
Add initial EGLStream implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
vially committed Mar 30, 2017
1 parent 6a05b37 commit 2a0eca0
Show file tree
Hide file tree
Showing 6 changed files with 359 additions and 69 deletions.
48 changes: 31 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ FEATURES
+------------------+-----------------------+
| Renderers | EGL, GLESv2 |
+------------------+-----------------------+
| Buffer API | GBM, EGL streams |
+------------------+-----------------------+
| TTY session | logind, legacy (suid) |
+------------------+-----------------------+
| Input | libinput, xkb |
Expand Down Expand Up @@ -70,23 +72,25 @@ ENV VARIABLES

``wlc`` reads the following env variables.

+----------------------+------------------------------------------------------+
| ``WLC_DRM_DEVICE`` | Device to use in DRM mode. (card0 default) |
+----------------------+------------------------------------------------------+
| ``WLC_SHM`` | Set 1 to force EGL clients to use shared memory. |
+----------------------+------------------------------------------------------+
| ``WLC_OUTPUTS`` | Number of fake outputs in X11 mode. |
+----------------------+------------------------------------------------------+
| ``WLC_XWAYLAND`` | Set 0 to disable Xwayland. |
+----------------------+------------------------------------------------------+
| ``WLC_LIBINPUT`` | Set 1 to force libinput. (Even on X11) |
+----------------------+------------------------------------------------------+
| ``WLC_REPEAT_DELAY`` | Keyboard repeat delay. |
+----------------------+------------------------------------------------------+
| ``WLC_REPEAT_RATE`` | Keyboard repeat rate. |
+----------------------+------------------------------------------------------+
| ``WLC_DEBUG`` | Enable debug channels (comma separated) |
+----------------------+------------------------------------------------------+
+-----------------------+-----------------------------------------------------+
| ``WLC_DRM_DEVICE`` | Device to use in DRM mode. (card0 default) |
+-----------------------+-----------------------------------------------------+
| ``WLC_USE_EGLDEVICE`` | Set 1 to force EGL streams instead of GBM. |
+-----------------------+-----------------------------------------------------+
| ``WLC_SHM`` | Set 1 to force EGL clients to use shared memory. |
+-----------------------+-----------------------------------------------------+
| ``WLC_OUTPUTS`` | Number of fake outputs in X11 mode. |
+-----------------------+-----------------------------------------------------+
| ``WLC_XWAYLAND`` | Set 0 to disable Xwayland. |
+-----------------------+-----------------------------------------------------+
| ``WLC_LIBINPUT`` | Set 1 to force libinput. (Even on X11) |
+-----------------------+-----------------------------------------------------+
| ``WLC_REPEAT_DELAY`` | Keyboard repeat delay. |
+-----------------------+-----------------------------------------------------+
| ``WLC_REPEAT_RATE`` | Keyboard repeat rate. |
+-----------------------+-----------------------------------------------------+
| ``WLC_DEBUG`` | Enable debug channels (comma separated) |
+-----------------------+-----------------------------------------------------+

KEYBOARD LAYOUT
---------------
Expand All @@ -103,6 +107,16 @@ If you have ``logind``, you don't have to do anything.
Without ``logind`` you need to suid your binary to root user.
The permissions will be dropped runtime.

BUFFER API
----------

``wlc`` supports both ``GBM`` and ``EGL streams`` buffer APIs. ``GBM`` is used by default and is supported by most GPU drivers except the NVIDIA proprietary driver.

If you have a NVIDIA GPU using the proprietary driver you need to:

- enable DRM KMS using the ``nvidia-drm.modeset=1`` kernel parameter
- enable the ``EGL streams`` support by setting the ``WLC_USE_EGLDEVICE`` environment variable: ``export WLC_USE_EGLDEVICE=1``

ISSUES
------

Expand Down
1 change: 1 addition & 0 deletions src/compositor/output.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ struct wlc_output_information {
int32_t physical_width, physical_height;
int32_t subpixel;
uint32_t connector_id;
uint32_t crtc_id;
enum wl_output_transform transform;
enum wlc_connector_type connector;
};
Expand Down
2 changes: 2 additions & 0 deletions src/platform/backend/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ struct wlc_backend_surface {
EGLNativeDisplayType display;
EGLNativeWindowType window;
EGLint display_type;
int drm_fd;
bool use_egldevice;

struct {
WLC_NONULL void (*terminate)(struct wlc_backend_surface *surface);
Expand Down
Loading

0 comments on commit 2a0eca0

Please sign in to comment.