Bug 100070

Summary: Rocket League: grass gets rendered incorrectly
Product: Mesa Reporter: Gregor Münch <gr.muench>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact: Default DRI bug account <dri-devel>
Severity: normal    
Priority: medium CC: ttimo
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: grass in the main menu

Description Gregor Münch 2017-03-05 19:51:01 UTC
Created attachment 130079 [details]
grass in the main menu

The grass has some black lines in where it shouldnt be.
Im on Radeon HD 7970. But looks like there are more people with the same problem:
http://www.psyonix.com/forum/viewtopic.php?f=34&t=32544
https://www.reddit.com/r/RocketLeague/comments/51wvei/my_impressions_on_the_linux_port/
Comment 1 Gregor Münch 2017-06-12 12:04:45 UTC
No progress here in the last 3 months. Adding porter to CC list, maybe its a game specific bug, as it looks definitely different than the Windows version.
However by looking at different youtube videos the game looks properly rendered on linux nvidia driver.
Comment 2 Nicolai Hähnle 2017-06-12 17:30:36 UTC
Could you provide an apitrace?
Comment 3 Gregor Münch 2017-06-13 12:04:20 UTC
Thanks for your response, I will try to provide the trace by the end of the week.

Im just curious, since Plagman can give you the steam key and the problem also exists on RX470 / RX480 according to the links provided above, which means it looks more like an general problem, wouldnt it speed up the process if yourself would just look into the problem?

However Im happy to deliver that trace for you.
Comment 4 Gregor Münch 2017-06-17 13:59:54 UTC
Here you are:
https://en.file-upload.net/download-12558010/RocketLeague.trace.7z.html

I have a very slow upload, so I compressed the file.
Comment 5 Ilia Mirkin 2017-06-17 15:00:39 UTC
(In reply to Gregor Münch from comment #3)
> Im just curious, since Plagman can give you the steam key and the problem
> also exists on RX470 / RX480 according to the links provided above, which
> means it looks more like an general problem, wouldnt it speed up the process
> if yourself would just look into the problem?

Ultimately the easiest way to reproduce issues is with apitrace or similar tool. Using it doesn't require knowing how to get to the relevant part of the game, or other necessary conditions to trigger the issue.

Farming out the apitrace collection to the bug reporters is one of the ways to reduce the workload on the developers (as there are ~infinite bug reporters, and a very finite number of developers).
Comment 6 Gregor Münch 2017-06-17 20:08:27 UTC
(In reply to Ilia Mirkin from comment #5)
> Ultimately the easiest way to reproduce issues is with apitrace or similar
> tool. Using it doesn't require knowing how to get to the relevant part of
> the game, or other necessary conditions to trigger the issue.
> 
> Farming out the apitrace collection to the bug reporters is one of the ways
> to reduce the workload on the developers (as there are ~infinite bug
> reporters, and a very finite number of developers).

Thanks for the explanation. All this is true but:

-its a popular game, Top10 in Steam ranking, so Valve as AMD should have some interest seeing the game working as good as it does on nvidia
-in this case, its seems it doesnt depend on the architecture, its a problem with GCN 1.0 - 4.0 and maybe Intel too, so it can be reproduced with any hardware
-I cant imagine fixing those bugs is possible without testing the real game, in the end you still need the game to see the impact of your changes

However Im fine with whatever is best for you guys.
Comment 7 Nicolai Hähnle 2017-06-18 14:17:25 UTC
Hmm, I'm afraid that looks a bit tricky to analyze. I wonder if the game actually does something slightly different on NVidia cards? Would be nice if somebody could replay the trace on different hardware and see if the problem exists there as well.
Comment 8 Gregor Münch 2017-06-19 06:42:47 UTC
As said, watching some youtube clips,
Nvidia Linux:
https://www.youtube.com/watch?v=Mjpj3ncO1lw
AMD Windows:
https://www.youtube.com/watch?v=Q8C_w7ouaNI

All show correct rendering.

Its of course something else if it takes another renderpath with mesa and amdgpu-pro.
Comment 9 Marek Olšák 2017-06-20 18:38:42 UTC
It might be a WQM vs KILL issue.
Comment 10 Marek Olšák 2017-06-20 19:20:23 UTC
I have a basic initial fix for the grass issue. It works as follows.

The GLSL discard call site sets a flag that the pixel should be killed, but doesn't kill the thread. The thread is killed at the end of the shader.
Comment 11 Gregor Münch 2017-06-21 06:36:48 UTC
Thank you very much for fixing this!
Its sad to see that our first guess was true and this is actually a game bug.
Since TTimo is CCed already:

@Timothee
Could you respond if a game fix is planned?
Comment 12 Timothee Besset 2017-06-21 14:25:25 UTC
No game fix is planned at this time.

Marek's addition of glsl_correct_derivatives_after_discard is generally a good thing for mesa compatibility with the broader GL driver ecosystem.
Comment 13 Gregor Münch 2017-06-25 10:29:24 UTC
Finally its fixed. Thank you all involved!
Also, I measured no performance difference.
Please also send this to stable!

If someone wants the old behavior back:
glsl_correct_derivatives_after_discard=false

Thanks for the response @Timothee

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.