After updating to mesa master (6575ebdc), Dota 2 colors are much more darker.
From the IRC log 2016-08-10 it seems haagch already bisected it:
15:53 #radeon: < haagch> anyway, am I the only one seeing some opengl games being far too dark, like dota 2 and portal 2?
16:03 #radeon: < nha> haagch, since when? maybe since those sRGB changes?
16:38 #radeon: < haagch> nha: you were right, 3190c7ee9727161d627f107c2e7f8ec3a11941c1 is the first bad commit
I can confirm that reverting patch 3190c7ee9727161d627f107c2e7f8ec3a11941c1 takes away the darkness in Dota 2.
OpenGL renderer string: Gallium 0.4 on AMD CYPRESS (DRM 2.46.0 / 4.8.0-rc1, LLVM 3.8.1)
OpenGL core profile version string: 4.1 (Core Profile) Mesa 12.1.0-devel (git-796d760)
OpenGL core profile shading language version string: 4.10
This will probably affect i965 too... do you have an apitrace or something at the locations in question? I know Ken tried some Source engine games before pushing the series.
On i965, both Dota 2 (Source 2) and Left 4 Dead 2 (Source 1) appear to be working. I took screenshots from the same point in a Dota 2 tournament replay both with and without the sRGB patches, and they look identical.
So perhaps I just broke Gallium or radeonsi drivers? Sorry about that :(
It might also be worth testing with and without multisampling...
I can confirm seeing the same behaviour in TF2 on a 7970. I suspect this is a driver bug, and not a game bug, as the lighting sometimes works after I play the game for a bit (but never at the start). The lighting may break later during the same session. In the couple games where it fixed itself, it was usually around the time this bug: https://bugs.freedesktop.org/show_bug.cgi?id=93649 occurred, though I don't know if that is significant.
I independently bisected out the same commit as well.
I'll try to get an apitrace, see if that shows anything interesting.
Also, as another point of data, CS:GO seems to have no issues. Would an apitrace of it be useful?
apitrace with screen darkening can be found at https://stuff.mjdsystems.ca/tf2_srgb_issue.trace. Running it against mesa 11.2.2 shows no lightening issues (other rendering issues do appear). I couldn't test the trace against the broken commit, but I assume it works.
If you are unsure whether you are affected, you are not affected.
It's *very* dark and you will immediately see it on the startup logo and menu of dota 2 already.
Since nobody posted a screenshot or so yet, here is some gameplay of Portal 2
(contains some Portal 2 story spoilers)
with the commit in question: https://www.youtube.com/watch?v=Gn0jp0-AABE
with the commit reverted: https://www.youtube.com/watch?v=FxIaqZRuWow
Created attachment 125699 [details] [review]
I seem to have trashed my Steam installation, so I cannot currently test the attached patch with TF2 or Dota2. However, it does fix some Piglit failures I've been seeing, so please try it out.
The patched fixed brightness issues for me, tested in TF2, CS:Source, Left4Dead2, ETS2.
OpenGL renderer string: Gallium 0.4 on AMD TAHITI (DRM 2.45.0 / 4.7.0-4.g89a2ada-default, LLVM 4.0.0)
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.1.0-devel
(In reply to Kenneth Graunke from comment #3)
> It might also be worth testing with and without multisampling...
Oh, I tested this without the patch as well in TF2, and I saw no change enabling or disabling MSAA.
I also tested the patch on TF2 and it also fixed the darkness issue, at least on the main screen. I didn't try playing the game.
I'm sure I'm affected (the difference between the two are like night and day), but I have also seen it switch when using the affected commmit during game play.
Your patch fixes the darkness issue for me.
Tested-by: Edmondo Tommasina <edmondo.tommasina at gmail.com>
The patch looks good to me.
Please add this patch to git master branch. This patch fix bug 91342 too.
Patch to fix: https://bugs.freedesktop.org/attachment.cgi?id=125699
Nicolai Hähnle, thanks for working patch. It's RESOLVED.
Why fixed? Patch not in git master. Current git master stil broken.
Please don't close bugs before the relevant patch(es) land(s) on master of the respective repository. AFAIK attachment 125699 [details] [review] hasn't even been officially reviewed on mesa-dev (though Marek's "looks good to me" in comment #11 should probably suffice).
Sorry. Waiting for fix in master branch.
Any news on this bug? I was planning to upgrade mesa from master, but It looks that patch wasn't accepted yet, so I wonder if there is a new version of patch to test?
Nicolai posted the patch to the mesa-dev mailing list:
The patch is Tested-by myself.
Brian asked for some more details in the commit message.
I update mesa to latest git and dota LGTM. I dont now maybe mesa fixed, maybe dota.
@Vladimir: I've updated to mesa master (c9c989763aa7ad636407cb33c27d586e6f559d7a) and the issue is not fixed for me.
Fixed by b662c70aeab6a92751514f30719c13a6de253b4. Closing.
on Mar 30, 2017 at 08:55:37.
(provided by the Example extension).