wlroots merge requestshttps://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests2023-02-02T21:53:52Zhttps://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3805Draft: render/gles2: unify fragment shader2023-02-02T21:53:52ZSimon Sercontact@emersion.frDraft: render/gles2: unify fragment shaderInstead of having 3 different fragment shaders for textures and 1
more for quads, unify them all and compile different variants via
a SOURCE constant.
In the future, we will have more variant dimensions: pre-multiplied
alpha on/off, col...Instead of having 3 different fragment shaders for textures and 1
more for quads, unify them all and compile different variants via
a SOURCE constant.
In the future, we will have more variant dimensions: pre-multiplied
alpha on/off, color transformation, etc. It will become inpractical
to have one file per combination.
Weston has a similar approach:
https://gitlab.freedesktop.org/wayland/weston/-/blob/main/libweston/renderer-gl/fragment.glsl
Depends on !3803 and !3807https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3804Draft: Add support for ICC profiles for outputs2022-12-12T01:36:21ZSimon Sercontact@emersion.frDraft: Add support for ICC profiles for outputsSupersedes !2353
Depends on !3807Supersedes !2353
Depends on !3807https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3655render/gles2: produce 16f screencopy data2023-05-19T23:44:12ZM. Stoecklrender/gles2: produce 16f screencopy dataThis MR makes it possible for wlroots to read pixel data from XBGR16161616F buffers in the exact same format, instead of needing to fall back to reading XRGB8888 data. This did not work before, because the GL_IMPLEMENTATION_COLOR_READ_TY...This MR makes it possible for wlroots to read pixel data from XBGR16161616F buffers in the exact same format, instead of needing to fall back to reading XRGB8888 data. This did not work before, because the GL_IMPLEMENTATION_COLOR_READ_TYPE provided by Mesa was `GL_HALF_FLOAT` (0x140b) instead of `GL_HALF_FLOAT_OES` (0x8D61). See comments in the code, and the commit message, for more details.
Note: another alternative to the approach taken in this PR is to make wlroots require GL ES 3.0 to create half float textures and render buffers, in which case GL_HALF_FLOAT would be the format used both to create GL textures and to read from render buffers.
To test this code, build Sway from the branch at PR https://github.com/swaywm/sway/pull/7108 -- and run `swaymsg output 'output-name' render_bit_depth 16f`. Assuming the graphics driver and hardware support it, this should change the format of the output buffer to `XBGR16161616F`. If this succeeds, trying to take a screenshot using `grim` will produce the error `unsupported format 1211384408 = 0x48344258`, indicating that wlroots would provide a screenshot in format `XBGR16161616F`. With a build of grim from a branch made to support 16f formats, https://git.sr.ht/~mstoeckl/grim/log/16f-direct , taking screenshots should work and give normal looking output.