No description
Find a file
oldosfan 459de34ca7 Implement various improvements to egl renderer
* 12to11.c (MakeColormap): Delete function.
(XLMain): Stop making colormap here.
* compositor.h (ImmediateRelease): New flag.
(struct _BufferFuncs): New field can_release_now.
(struct _State): New flag `BufferAlreadyReleased'.
* egl.c (struct _CompositeProgram): New field `invert_y'.
(EglCompileCompositeProgram): Get new uniform index.
(Composite): Apply InvertY.
(egl_render_funcs): Set ImmediateRelease flag.
(BufferFromDmaBuf): Set InvertY flag if set.
(UpdateTexture, UpdateShmBufferIncrementally): Set CanRelease
flag on SHM buffers.
(UpdateBuffer): Don't update if damage is empty.
(CanReleaseNow): New function.
(egl_buffer_funcs): Add CanReleaseNow.
* picture_renderer.c (MakeCheckWindow): New function.
(FindSupportedModifiers): Use a more similar window to look for
modifiers.
(CanReleaseNow): New function.
(picture_buffer_funcs): Add CanReleaseNow.
* renderer.c (RenderCanReleaseNow): New wrapper function.
(InstallRenderer): Create colormaps here, so the buffer init
function can get it.
* shaders.txt (Composite Rectangle Fragment Shader RGBA)
(Composite Rectangle Fragment Shader RGBX)
(Composite Rectangle Fragment Shader External): New uniform
`invert_y'.
(main): Use it.
* subcompositor.c (SubcompositorUpdate): Always update attached
buffer from damage, even if damage is empty.
* surface.c (TryEarlyRelease): New function.
(InternalCommit): Call it.  Also, do not call role
release_buffer hook if ImmediateRelease is specified by the
renderer.
(SavePendingState): Likewise, release buffers immediately if
possible.
2022-09-24 01:53:15 +00:00
12to11.c Implement various improvements to egl renderer 2022-09-24 01:53:15 +00:00
12to11.man Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
alloc.c Import files 2022-09-12 13:24:50 +00:00
atoms.c Import files 2022-09-12 13:24:50 +00:00
buffer.c Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
compositor.c Import files 2022-09-12 13:24:50 +00:00
compositor.h Implement various improvements to egl renderer 2022-09-24 01:53:15 +00:00
data_device.c Various improvements to primary selections and resize handling 2022-09-15 02:08:55 +00:00
dmabuf.c Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
dnd.c Resolve some TODOs 2022-09-15 02:38:06 +00:00
egl.c Implement various improvements to egl renderer 2022-09-24 01:53:15 +00:00
ewmh.c Import files 2022-09-12 13:24:50 +00:00
fns.c Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
frame_clock.c Import files 2022-09-12 13:24:50 +00:00
icon_surface.c Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
Imakefile Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
libraries.def Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
linux-dmabuf-unstable-v1.xml Import files 2022-09-12 13:24:50 +00:00
media_types.txt Import files 2022-09-12 13:24:50 +00:00
mime0.awk Import files 2022-09-12 13:24:50 +00:00
mime1.awk Implement primary selections, and minor improvements elsewhere 2022-09-13 11:41:07 +00:00
mime2.awk Import files 2022-09-12 13:24:50 +00:00
mime3.awk Import files 2022-09-12 13:24:50 +00:00
mime4.awk Import files 2022-09-12 13:24:50 +00:00
output.c Import files 2022-09-12 13:24:50 +00:00
picture_renderer.c Implement various improvements to egl renderer 2022-09-24 01:53:15 +00:00
positioner.c Import files 2022-09-12 13:24:50 +00:00
primary-selection-unstable-v1.xml Check in new files for primary selection support 2022-09-13 11:33:57 +00:00
primary_selection.c Various improvements to primary selections and resize handling 2022-09-15 02:08:55 +00:00
README Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
region.c Import files 2022-09-12 13:24:50 +00:00
renderer.c Implement various improvements to egl renderer 2022-09-24 01:53:15 +00:00
run.c Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
seat.c Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
select.c Import files 2022-09-12 13:24:50 +00:00
shaders.awk Check in new files for EGL support 2022-09-23 08:28:48 +00:00
shaders.txt Implement various improvements to egl renderer 2022-09-24 01:53:15 +00:00
shm.c Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
subcompositor.c Implement various improvements to egl renderer 2022-09-24 01:53:15 +00:00
subsurface.c Resolve some TODOs 2022-09-15 02:38:06 +00:00
surface.c Implement various improvements to egl renderer 2022-09-24 01:53:15 +00:00
timer.c Import files 2022-09-12 13:24:50 +00:00
xdata.c Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
xdg-shell.xml Update for new versions of xdg-shell 2022-09-24 00:44:24 +00:00
xdg_popup.c Update for new versions of xdg-shell 2022-09-24 00:44:24 +00:00
xdg_surface.c Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
xdg_toplevel.c Update for new versions of xdg-shell 2022-09-24 00:44:24 +00:00
xdg_wm.c Import files 2022-09-12 13:24:50 +00:00
xerror.c Add support for EGL, for YUV image formats 2022-09-23 08:44:37 +00:00
xsettings.c Import files 2022-09-12 13:24:50 +00:00

This is a tool for running Wayland applications on an X server,
preferably with a compositing manager running.

It is not yet complete.  What is not yet implemented includes support
for touchscreens, input methods, device switching in dmabuf feedback,
and the viewporter protocol extension.

There are also problems with output reporting in subsurfaces.

It is not portable to systems other than recent versions of GNU/Linux
running the X.Org server 1.20 or later, and has not been tested on
window (and compositing) managers other than GNOME Shell.

It will not work very well unless the compositing manager supports the
EWMH frame synchronization protocol.

Building and running this tool requires the following X protocol
extensions:

  Nonrectangular Window Shape Extension, version 1.1 or later
  MIT Shared Memory Extension, version 1.2 or later
  X Resize, Rotate and Reflect Extension, version 1.3 or later
    (this will soon be 1.4, once support for multiple GPU
     systems is fully implemented)
  X Synchronization Extension, version 1.0 or later
  X Rendering Extension, version 1.2 or later
  X Input Extension, version 2.3 or later
  Direct Rendering Interface 3, version 1.2 or later
  X Fixes Extension, version 1 or later

In addition, it requires Xlib to be built with the XCB transport, and
the XCB bindings for MIT-SHM and DRI3 to be available.

Sometimes, it might be desirable to build with EGL, and use OpenGL ES
2.0 for i.e. YUV video format support.  To do so, uncomment the block
of code for EGL support in libraries.def before running `xmkmf'.  This
will additionally require the EGL and GLESv2 development files, and
for the following EGL and GLES extensions to be present at runtime:

  EGL_EXT_platform_base
  EGL_EXT_device_query
  EGL_KHR_image_base
  EGL_EXT_image_dma_buf_import_modifiers
  EGL_EXT_image_dma_buf_import
  EGL_EXT_buffer_age

  GL_OES_EGL_image
  GL_OES_EGL_image_external
  GL_EXT_read_format_bgra
  GL_EXT_unpack_subimage

After building with EGL support, the renderer must be enabled by
setting the environment variable "RENDERER" to "egl".

The following Wayland protocols are implemented to a more-or-less
complete degree:

  'wl_output',                                  version:  2
  'wl_compositor',                              version:  5
  'wl_shm',                                     version:  1
  'xdg_wm_base',                                version:  5
  'wl_subcompositor',                           version:  1
  'wl_seat',                                    version:  7
  'wl_data_device_manager',                     version:  3
  'zwp_linux_dmabuf_v1',                        version:  4
  'zwp_primary_selection_device_manager_v1',    version:  1

With the main caveat being that zwp_linux_dmabuf_v1 has no real
support for multiple-provider setups (help wanted).

Window decorations are also not supported, even though they fit in
nicely with X window management.

It would also be nice to have pinch gesture support.

This directory is organized as follows:

  Imakefile     - the top level Makefile template
  libraries.def - files for libraries that don't provide Imakefiles
  *.xml         - Wayland protocol definition source
  *.c, *.h      - C source code
  *.awk         - scripts used to generate headers
  *.txt         - text data used to generate some headers, i.e.
                  those containing MIME types or shaders

Building the source code is simple, provided that you have the
necessary libwayland-server library, wayland-scanner, pixman, XCB, and
X extension libraries installed:

  xmkmf # to generate the Makefile
  make  # to build the binary

Running the binary should be simple as well:

  ./12to11

Wayland programs will then run as regular X windows.