https://bugs.winehq.org/show_bug.cgi?id=54659
--- Comment #3 from François Gouget fgouget@codeweavers.com --- I can see a few options to fix this but it's probably best for the Direct3D experts to pick the right approach:
1. Maybe GenerateRampFromGamma() and/or ComputeGammaFromRamp() could do better to avoid rounding issues.
2. Directly store gamma values in struct wined3d_swapchain alongside the ramps with a flag to indicate which one to use. This would avoid the gamma -> ramp -> gamma round-trips. This may also speed things up a bit for this (presumably minor) use case.
3. Only restore the gamma on swapchain destruction if it was modified. Is it even possible to track gamma modifications? (I'm also assuming there is a good reason to restore the gamma)
4. Something else entirely.