| CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 304
WaylandBackend: Check features before using color management #1867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I guess All that's actually needed is to avoid preemptively creating image descriptors that are unsupported by the compositor, and throwing an error when transitioning to one. |
1f76c89 to
dc234fb
Compare
|
CI is broken? |
|
Thank you. On the latest version of this PR, colors look correct again + HDR works on Gnome now. |
|
Were the colours off on my first attempt? π |
|
At least on Hyprland, yeah they had a weird hue xD (no HDR) |
|
We should probably make something smarter here and reject Presents with unsupported output TFs and manually output HDR10/whatever is supported. |
|
One thing I don't understand is, why is this not needed with wine wayland? Does wine internally convert everything to bt.2020 container? What's an example of a game/something that uses scRGB? I must say, that wine wayland now works great under gnome and the last hurdle is that steam input just doesn't work at all with wayland driver :/ |
|
Heya, I'm assuming the checks failing is still a problem, I did some digging and seems that the arch repos recently changed the wlroots package name to have multiple versions available. It's probs causing issues on your build but not others yet as it is a fresh system/build-pipeline. I don't really know much about github build stuff, just guessing why tests after yours haven't failed yet, but this is likely going to cause problems for future PRs that use the current build workflow file. Dunno if this warrants making a new issue or such to specifically address the workflow file now being outdated. Should hopefully be an easy fix of changing wlroots to wlroots0.19, wlroots0.18 or wlroots0.17 depending on whichever is preferred in the workflow file for future builds. Re: Switch to a versioned packaging scheme for wlroots : |
|
The CI failure has already been addressed with #1877 As for apps/games that use scRGB, off the top of my head Control's HDR implementation uses that colorspace. |
|
How do you re-run the failed check now that the CI has been fixed upstream? As this fixes an issue that essentially breaks gamescope on gnome (sdl backend only fixes AMD systems, and also can cause performance issues for some), and a good chunk of users don't want to compile the fixed version themselves, it would be good if we tried to merge it again so distro repos can roll it out sooner for less technical users. |
|
Sorry for for not staying on top of this.
Could you elaborate on this? I'm trying to figure out whether this is a big or trivial change π
. |
|
Maybe construct a description based on the values set in the kwin implementation π€·: |
|
Responding to: #1867 (comment) Nah, it's all good, we all have lives and such heh. Just thanks for helping fix these kinda things! π |
TransferFunction(TransferFunction::linear, 0, 80),Implys that it sets min and max luminance to 0 and 80. |
dc234fb to
137e4b1
Compare
|
Previously on this branch I haven't been able to trigger scRGB on gamescope yet. The Cyberpunk 2077 does seem to change it's rendering in scRGB mode (it looks off) but gamescope seems to stick with PQ. |
|
I've gotten gamescope to output in scRGB with Control by using kwin. Looking at the output of I'm trying to figure out what the likelihood of an app trying to present an scRGB surface where the compositor doesn't have I feel that not crashing on every compositor but kwin is worth the risk of some app / compositor combination displaying in the wrong colorspace. That bug can be investigated once it exhibits. That is to say: Would you merge this if I revert this branch to print a warning and unset the image description of the surface when gamescope is attempting to display an scRGB image on a compositor that doesn't support the |
This stops compositors lacking required features, transfer functions or primaries from triggering protocol errors on start.
137e4b1 to
e07c32c
Compare
|
I've updated this branch to be very simple. |
|
Any chance of getting this merged? |
|
Perhaps bringing to the attention of @kisak-valve would help if it's fallen through the cracks. |
This comment was marked as spam.
This comment was marked as spam.
emersion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
This branch adds a check for
windows_scrgbsupport when setting thebSupportsGamescopeColorManagementflag.It also moves unchecked use of the
wp_color_manager_v1protocol out of theregistry::globalcallback so that the compositor has an opportunity to send information on what features are supported during the subsequent roundtrip.This fixes a wayland protocol error and allows gamescope on gnome/mutter.
Old description
This avoids using windows_scrgb where unsupported.m_pWPImageDescriptions[ GAMESCOPE_APP_TEXTURE_COLORSPACE_SCRGB ]won't be set if the feature isn't reported. It should still crash inCWaylandPlane::Presentif switching toGAMESCOPE_APP_TEXTURE_COLORSPACE_SCRGB, however now it logs an error explaining why.The color-management-v1 protocol says that surfaces without a set image description should be treated by the compositor as sRGB.This is my first time using the color management protocol so I'm sorry if it's wrong in some obvious way.I've tested it on mutter with
vkmarkandglxgears.vkmarklooked a little darker than outside of gamescope, but that seems in line with gamescope3.16.4that's available in my distro.If I specify a pixel format the issue goes away:
Or
--pixel-format B8G8R8A8UNORMif you prefer a dark horse:Resolves #1825