https://bugs.freedesktop.org/show_bug.cgi?id=94705
Bug ID: 94705 Summary: [radeonsi] blue ground in Company of Heroes 2 Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel@lists.freedesktop.org Reporter: lordheavym@gmail.com QA Contact: dri-devel@lists.freedesktop.org
Created attachment 122566 --> https://bugs.freedesktop.org/attachment.cgi?id=122566&action=edit battlefield with some blue ground
* radeon Tonga (was the same with Pitcairn) * kernel 4.5.0 * mesa-git 511ce29 * llvm-svn r264392
Please note that it isn't a regression, this bug is present since the release of the game for Linux
Here is the link to an apitrace: https://drive.google.com/file/d/0B1WCo3k21FK3NW9DaGZpR1cxWjA/view?usp=sharin...
https://bugs.freedesktop.org/show_bug.cgi?id=94705
Laurent carlier lordheavym@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #122566|text/plain |image/png mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=94705
Nicolai Hähnle nhaehnle@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |NOTOURBUG Status|NEW |RESOLVED
--- Comment #1 from Nicolai Hähnle nhaehnle@gmail.com --- Hi Laurent, thanks for the report. I did some digging into the apitrace you provided.
Long story short: The game does not properly deal with the implementation-defined limit on the number of samplers that are available in a fragment shader. Perhaps there is some graphics quality setting that can be reduced to convince the game to use only shaders with fewer samplers as a workaround.
The long story: In the provided apitrace, the artefacts first appear in textures 10884 and 10885, which are terrain colour and normal maps. They are rendered to around call @516614, which is a glLinkProgram call for program 658 that fails because the attached fragment shader 611 has not been compiled. It is evident from the trace leading up to @516933 that the game intends to do rendering using 658 precisely when the artefacts appear, because there are a bunch of (failing) calls to query uniform locations.
Why has shader 611 not been compiled? Well, most likely there is logic in the game that does check for implementation-defined sampler limits, because shader 611 uses 18 samplers and we only expose 16. So probably some part of the game engine notices the limitation and doesn't even try to compile the shader, but this problem is not propagated up to higher layers in the engine.
https://bugs.freedesktop.org/show_bug.cgi?id=94705
Edwin Smith esmith@feralinteractive.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|NOTOURBUG |---
--- Comment #2 from Edwin Smith esmith@feralinteractive.com --- This issue is caused by Mesa not exposing more than 16 samplers, once Mesa supports more samplers then Mesa will start to render correctly.
There is no simple way of downgrading the engine to avoid this issue. We have request that the Mesa limitation is removed so Mesa can support more samplers like other drivers.
https://bugs.freedesktop.org/show_bug.cgi?id=94705
--- Comment #3 from Edwin Smith esmith@feralinteractive.com --- Please Note: We can help developers working on this issue with a Steam key and other details as needed.
https://bugs.freedesktop.org/show_bug.cgi?id=94705
--- Comment #4 from Nicolai Hähnle nhaehnle@gmail.com --- I agree that it makes sense to raise the limit for the long run. I'll take a look into that.
https://bugs.freedesktop.org/show_bug.cgi?id=94705
Edwin Smith esmith@feralinteractive.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |94835 See Also| |https://bugs.freedesktop.or | |g/show_bug.cgi?id=94835
https://bugs.freedesktop.org/show_bug.cgi?id=94705
--- Comment #5 from Edwin Smith esmith@feralinteractive.com --- I have logged a specific bug for this request here along with some extra information that might come in handy when implementing this:
https://bugs.freedesktop.org/show_bug.cgi?id=94835
I have also marked this bug as depends on 94835.
https://bugs.freedesktop.org/show_bug.cgi?id=94705 Bug 94705 depends on bug 94835, which changed state.
Bug 94835 Summary: Increase fragment shader sample limits from 16 to 32 (AMD Linux - Mesa/RadeonSi) https://bugs.freedesktop.org/show_bug.cgi?id=94835
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
https://bugs.freedesktop.org/show_bug.cgi?id=94705
Nicolai Hähnle nhaehnle@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED
--- Comment #6 from Nicolai Hähnle nhaehnle@gmail.com --- We now support up to 32 samplers in Git master as of commit 2abe4f8d7dcdcff75c28958e1a691ebf6cdee1ac
https://bugs.freedesktop.org/show_bug.cgi?id=94705
Edwin Smith esmith@feralinteractive.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED
--- Comment #7 from Edwin Smith esmith@feralinteractive.com --- Verified as working using the latest git.
dri-devel@lists.freedesktop.org