-
Notifications
You must be signed in to change notification settings - Fork 3.2k
vo_gpu/d3d11: add support for configuring swap chain color space #5804
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
|
This would be great to add. Especially now that HDR passthrough can be operated dynamically, when using an Nvidia GPU. Are there plans to further this? |
|
I finally got around to using the test build. It works very well. The display switches to HDR10 when in full screen and reverts when windowed. I haven't experienced any issues, so far. Well done @jeeb. One wrinkle. If I use |
|
What this doesn't do is enable 10 bit, like @rossy has in his test build in this thread.. Is it possible to incorporate that? The full log is too big to attach This is needed for SDR 10 bit. |
|
@jeeb Maybe merge what you have, since our last change was over a year ago, and the TODO on the top is full of harder things on top of it (like passing through the video HDR info). Or just close it as abandoned if that's the case. |
3deed70 to
8d9c921
Compare
|
Just pushed the stuff updated to my current state. Will rebase and make it prettier tomorrow. :) At this point, it's looking pretty good. The ra_fbo warning message is just in a place that will spam warnings. A lot. So that most likely needs a tweak. |
2fd0322 to
f319552
Compare
|
The spam has now been fixed and it warns you once:
|
0ba2ad5 to
9805b0a
Compare
|
I'm eagerly awaiting this. Hopefully it gets rolled into the next master. |
451905d to
bcb8f0a
Compare
rossy
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.
I don't know about colour stuff, but I'm worried this might change the default behaviour for Windows 10 users who don't use HDR/Windows HD Color. Even though Windows specifies the colourspace of each monitor, RGB_FULL_G22_NONE_P709 is likely the value it uses when it doesn't really know, since there's no "unknown" value in the enum. As I understand, this will make pass_colormanage use 2.2 gamma instead of just copying the source gamma, which is what the old "auto" behaviour did. Since the old "auto" behaviour was there for a reason (to match user expectations?) I wonder if we should change it.
Apart from that, this looks good.
This lets us set primaries, transfer function and the target peak based on what the presenting layer would want us to have. Now that this mechanism is available, warn if the user has overridden values such as primaries or transfer function.
Additionally, define the few enum values that are currently missing in mingw-w64 headers.
e0a14e8 to
61830be
Compare
rossy
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 for the changes.
By default utilizes the color space of the desktop on which the swap chain is located. If a specific value is defined, it will be instead be utilized. Enables configuration of the PQ color space (BT.2020 primaries, PQ transfer function) for HDR. Additionally, signals the swap chain color space to the renderer, so that the render looks correct without having to specify target-trc or target-prim manually. Due to all of the APIs being Win10+ only, will only work starting with Windows 10.
|
If I may ask - when will MPV support HDR Passthrough? |
@ObsessedHacker It already does. |
Already does? |
Microsoft has pretty much killed off the 'auto switching'. No, MadVR does not auto switch. It's a workaround that toggles the Windows HDR enable/disable prior to playing. And it's crap. Just turn HDR on, and enjoy. |
Uh, I understand. Thank you! |
Sure, but first what GPU are you using? |
GTX 1650 |
|
Ok, so first I recommend configuring your GPU in the Nvidia control panel, to 4:2:0 12bpc (4:2:2 if your display supports it). Then you can use an mpv.conf like this I find that Windows lowers the gamma a little, so if you want to you can raise it a little by adding |
Thank you! I found it fixed the problem I had. |
Now more or less brought to a relatively good state.
Enables among other things, the configuration of the PQ color space (BT.2020 primaries, PQ transfer function) for HDR.
target-trcortarget-primmanually.Initial things to do:
Things to maybe do later:
Example usage for PQ on a non-PQ desktop:
--d3d11-output-csp=pq --fs --fs-screen=N(the full screen stuff really isn't required since the compositor does seem to handle it nicely, but usually you want this).Relevant example logs:
Resolves #5237 , #5161