- 20 May, 2022 24 commits
-
-
Most everything else only supports 3 planes, and we don't support any four-plane YUV formats, so. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
It's three planes, not two. Signed-off-by:
Daniel Stone <daniels@collabora.com> Fixes: 8b167a17 ("gl-renderer: Store EGL buffer state in weston_buffer")
-
There's just no good reason to do this. The query entrypoints already tell us if we need to use GL_TEXTURE_EXTERNAL_OES for a particular format/modifier. We also have RGB -> YUV fallbacks which should be able to work well with TEXTURE_2D. TEXTURE_EXTERNAL pessimises quite hard, forcing GPU-side reloads as well as bad filtering. Allowing multi-planar formats to use TEXTURE_2D should thus result in performance and quality improvements. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Try to describe this and yuv_plane_descriptor as well, since they're not blindingly obvious. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Now that we can pull everything we need from pixel-formats, go one step further and reuse the same YUV format descriptors we use to emulate dmabuf/EGLImage imports for SHM. This eliminates all special-case YUV/SHM handling. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
We already have the subsampling levels in pixel-formats - no need to type it out again here. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
We already have this elsewhere. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
These formats are used within gl-renderer to do YUV -> RGB colourspace conversion. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Add a new hide_from_clients flag which, if set, specifies that the format is only for internal information and processing, and should not be advertised for clients. This will be used for formats like R8 and GR88, which are not useful for client buffers, but are used internally to implement YUV -> RGB conversion. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
This was just a duplicate of shader variants, for historical reasons. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
We support this as an explicit YUV fallback path in gl-renderer's dmabuf EGLImage import path, so might as well support it in the SHM path, given it's just YUV420 with no subsampling. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
No need to open-code everything here. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
If we're doing partial uploads from SHM buffers, we need to use the vertical subsampling factor rather than the horizontal for secondary planes. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
We already had these with effective width and height, but they're useful externally as well. Pull them out to a helper. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
No need to open-code bits per pixel and shader variants. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Doing this allows us to get rid of some open-coded per-format calculations inside gl-renderer. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
'depth' isn't actually used to determine the bit depth of meaningful components generally, but specifically to determine whether we can use the legacy drmModeAddFB (pre-AddFB2) with those formats. Rename the member to make it more clear what it's used for. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Since the buffer now has a pixel_format hook, just use that consistently instead of the SHM code. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Clients can't reach this because libwayland-server already checks whether the format is supported. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
pixel-formats already stores the gl_format, at least for single-planar formats; use that instead of storing our own copies. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Instead of checking for each format whether we need compatibility workarounds for GL implementations not supporting ES3.x or when GL_EXT_texture_rg isn't present, have each format declare the ideal case and fix it up later. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Rather than checking all the pixel-format components which are currently duplicated inside gl-renderer, just check for equality of the pixel format itself, which will become useful as we remove some of the duplicate content. This means that the texture storage will now be reallocated when clients switch between pixel formats which could've had compatible GL storage (e.g. XRGB <-> ARGB) on the same surface. However this does not seem like a case worth optimising, and simplifies the code somewhat. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
We've got a nice shiny ARRAY_COPY macro, so use it rather than memcpy or hand-unrolled assignments. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Carried over from gl-renderer's equivalent code. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
- 19 May, 2022 3 commits
-
-
Allow clipboard pasting in and out of an RDP session. Co-authored-by:
Steve Pronovost <spronovo@microsoft.com> Co-authored-by:
Brenton DeGeer <brdegeer@microsoft.com> Signed-off-by:
Hideyuki Nagase <hideyukn@microsoft.com> Signed-off-by:
Steve Pronovost <spronovo@microsoft.com> Signed-off-by:
Brenton DeGeer <brdegeer@microsoft.com>
-
RDP exposes certain features (audio, clipboard, RAIL) through a facility called "virtual channels". Set up the communications framework for using these. Co-authored-by:
Steve Pronovost <spronovo@microsoft.com> Co-authored-by:
Brenton DeGeer <brdegeer@microsoft.com> Signed-off-by:
Hideyuki Nagase <hideyukn@microsoft.com> Signed-off-by:
Steve Pronovost <spronovo@microsoft.com> Signed-off-by:
Brenton DeGeer <brdegeer@microsoft.com>
-
FreeRDP has some features that start new threads and run callback functions in them. We need a way to punt work from these threads back to the compositor thread. Co-authored-by:
Steve Pronovost <spronovo@microsoft.com> Co-authored-by:
Brenton DeGeer <brdegeer@microsoft.com> Signed-off-by:
Hideyuki Nagase <hideyukn@microsoft.com> Signed-off-by:
Steve Pronovost <spronovo@microsoft.com> Signed-off-by:
Brenton DeGeer <brdegeer@microsoft.com>
-
- 18 May, 2022 7 commits
-
-
Pekka Paalanen authored
Log EGL features similar to how GL ES features are logged: listing just the ones weston tests for. This replaces some log messages from gl-renderer.c that become redundant or belong with EGL better. has_native_fence_sync and has_wait_sync are not logged, because missing them already logs warnings. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
Feels like this might be nice to log. The failure case is not fatal, so say it's a warning only. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
Found by inspection, looks like these cases could use an explicit error message. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
This is a human readable replacement for printing out the list of all available GL extensions that doesn't happen anymore by default. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
Print all EGL and OpenGL extension lists into a new log scope "gl-renderer" instead of the usual log. These lists cluttered the log while they were very rarely actually useful. Sometimes they might be interesting, so make them still available through the new log scope. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Pekka Paalanen authored
Plumb struct gl_renderer all the way through to gl_renderer_log_extensions(). In the future, the extension lists will be printed into a debug scope specifically, and it will get the debug scope from gr. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.com>
-
Marius Vlad authored
This fixes the following leaks for weston_curtain/weston_buffer_create_solid_rgba when shutting down the compositor: #0 0x7f9170372987 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154 #1 0x7f915bfeb8b7 in zalloc ../include/libweston/zalloc.h:38 #2 0x7f915bfec71d in weston_curtain_create ../shell-utils/shell-utils.c:150 #3 0x7f915bfd9e51 in shell_ensure_fullscreen_black_view ../desktop-shell/shell.c:2082 #4 0x7f915bfda2a9 in shell_configure_fullscreen ../desktop-shell/shell.c:2118 #5 0x7f915bfdc72d in desktop_surface_committed ../desktop-shell/shell.c:2538 #6 0x7f915bfa3ef5 in weston_desktop_api_committed ../libweston-desktop/libweston-desktop.c:159 #7 0x7f915bfae778 in weston_desktop_xdg_toplevel_committed ../libweston-desktop/xdg-shell.c:746 #8 0x7f915bfb0d45 in weston_desktop_xdg_surface_committed ../libweston-desktop/xdg-shell.c:1374 #9 0x7...
-
- 16 May, 2022 6 commits
-
-
Daniel Stone authored
Now that the gl_buffer_state owns everything related to buffers, move the textures from there rather than living on the surface, to join the EGLImage and/or SHM params. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Now that EGLImages are strongly associated with a gl_buffer_state, which has a lifetime strictly bounded by a weston_buffer, we don't need to have an egl_image wrapper having its own separate refcounting anymore. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
... apart from SHM. EGL and dmabuf buffers already have a gl_buffer_state created for them when we first attach the weston_buffer. By turning gl_surface_state::buffer into a pointer, we can just reference rather than inline the gl_buffer_state. SHM buffers are special, in that we don't keep individual copies of them within the GL renderer. Instead, the GL surface has a texture allocated with a shadow copy of the most up-to-date surface content. Handle this by allocating and destroying gl_buffer_state every time we need to respecify textures or somehow meaningfully change the parameters. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Similarly to EGL buffers, store the gl_buffer_state for a dmabuf buffer inside weston_buffer, rather than on the linux_dmabuf_buffer. This slightly simplifies our gl_buffer_state handling, and will be used later to eliminate the egl_image refcounting. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
We don't need this now we don't try to reimport them on attach. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-
Daniel Stone authored
Introduce a renderer_private hook for weston_buffer, and use this to store a copy of the gl_buffer_state for EGL buffers (i.e. non-dmabuf, via EGL_WL_bind_wayland_display). As part of this, we create the EGLImage along with the weston_buffer information, and just take a reference to it each time it is attached. If you have bisected a failure to update surface content to this commit, it very likely means that your EGL implementation requires images to be recreated rather than only rebound in order to have their content updated, which is contrary to specification. Signed-off-by:
Daniel Stone <daniels@collabora.com>
-