Bug 107694 - [wine] RAGE: texture problems
Summary: [wine] RAGE: texture problems
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: 18.2
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact: Default DRI bug account
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-26 18:58 UTC by Sven Arvidsson
Modified: 2019-09-25 18:09 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
screenshot of bug in RAGE (189.25 KB, image/jpeg)
2018-08-26 18:58 UTC, Sven Arvidsson
Details
rendering on i965/skylake (249.19 KB, image/jpeg)
2018-08-31 13:42 UTC, Sven Arvidsson
Details

Description Sven Arvidsson 2018-08-26 18:58:22 UTC
Created attachment 141292 [details]
screenshot of bug in RAGE

The game RAGE starts and runs, but have some quite severe texture problems. See attached screenshot.  The problem is especially bad when loading new areas.

Settings these options in default.cfg minimizes but doesn't get rid of the bug fully:

jobs_numThreads 1
vt_maxPPF 128

as suggested in https://store.steampowered.com/news/6464/

This bug looks quite a lot like one that plagued the Windows drivers (ATI Performance) back when the game was released:
https://www.youtube.com/watch?v=z-yl6pDFgtw

I have seen video of RAGE rendering fine with radeonsi (https://www.youtube.com/watch?v=OgqgNrN16KM) so I tried jumping back quite a few Mesa releases* to see if there was a regression somewhere, but AFAICT it is still there as far back as 11.2.2. 

I'm guessing the bug happened as a change from radeon to amdgpu on the kernel side?

* Using a hack for Wine to skip the check for a compat profile.


System environment:
-- system architecture: 64-bit
-- Linux distribution: Debian unstable
-- GPU: TONGA
-- Model: Asus Strix R9 285 2GB
-- Display connector: DVI
-- xf86-video-amdgpu: 18.0.1
-- xserver: 1.20.1
-- mesa: 18.2.0~rc4
-- drm: 2.4.93
-- kernel: 4.17
Comment 1 Timothy Arceri 2018-08-31 01:24:54 UTC
As far as I can tell this is a game bug that was never actually fixed. It seems they did some transcoding on Nvidia via CUDA which helped reduce the problem there but never bothered to fix it for AMD cards.

There are other config settings  suggested I'm afraid you will just have to experiment.
Comment 2 Sven Arvidsson 2018-08-31 13:42:17 UTC
Created attachment 141396 [details]
rendering on i965/skylake

Can't say that I agree. Attached is a screenshot from the same place in the game, with the same settings on i965/Skylake, no texture bug. Software rendering with llvmpipe is likewise fine.

Maybe you're thinking of the notorious texture pop-ins? This is quite a different problem. 

The second video clip I linked to was recorded on a Tahiti GPU in 2016 and was presumably using radeon and not amdgpu. Probably why my regression testing lead nowhere.
Comment 3 James B 2018-08-31 15:23:29 UTC
FYI,

This bug does not occur on the 64-bit version of the game only the 32-bit.  The 32-bit is very unstable for me also, it crashes quite often.

Unfortunately, the 64-bit version's in-game audio is broken on Proton currently.

I have spent hours testing different settings on and off for over a year, never managed to find a setting that cured the issue.  The game works fine on proprietary drivers.

System info:
-- Arch 64-bit
-- GPU: RX Vega 56
-- Mesa 18.3.0-devel (git-e345247092)
-- Kernel 4.18.5
Comment 4 Timothy Arceri 2018-09-20 01:01:39 UTC
(In reply to Sven Arvidsson from comment #2)
> Created attachment 141396 [details]
> rendering on i965/skylake
> 
> Can't say that I agree. Attached is a screenshot from the same place in the
> game, with the same settings on i965/Skylake, no texture bug. Software
> rendering with llvmpipe is likewise fine.
> 
> Maybe you're thinking of the notorious texture pop-ins? This is quite a
> different problem. 
> 
> The second video clip I linked to was recorded on a Tahiti GPU in 2016 and
> was presumably using radeon and not amdgpu. Probably why my regression
> testing lead nowhere.

Well I'll reopen the bug in case someone else takes a look. However unlike comment #3 I have see the bug on 64-bit also and the issues in not present when replaying an apitrace both of these things lead me to believe this is a game bug.
Comment 5 Axel Davy 2018-09-20 08:40:19 UTC
Hi,

The youtube video linked in the first comment has very likely been taken with gallium nine (gearsongallium mentionned in the video was a website of a gallium nine tester with a lot of performance comparisons and tests, plus a distro with gallium nine).

Then maybe the 64 bit version of the game was used, since comment 3 mentions t his version works better. I haven't tested the game myself.
Comment 6 Sven Arvidsson 2018-09-20 10:31:59 UTC
(In reply to Axel Davy from comment #5)
> Hi,
> 
> The youtube video linked in the first comment has very likely been taken
> with gallium nine (gearsongallium mentionned in the video was a website of a
> gallium nine tester with a lot of performance comparisons and tests, plus a
> distro with gallium nine).
> 
> Then maybe the 64 bit version of the game was used, since comment 3 mentions
> t his version works better. I haven't tested the game myself.

The game uses OpenGL, so gallium nine wouldn't make a difference. Could very well be 64bit though.

I was quite convinced that it was something specific to AMD given that the 11.11a catalyst driver is specifically mentioned as fix for a very similar problem, and the release notes mention fixes specific to the 32bit version.

I'm not so sure anymore though, if it is reproducible on 64bit too. 

There's also this an entry about a similar problem on the PC Gaming Wiki, suggestions include turning off anisotropic filter, antialiasing or Catalyst A.I. (whatever that is?):
https://pcgamingwiki.com/wiki/RAGE#Corrupted.2C_black.2C_jagged_or_dotted_textures

Even if it is a game bug, it would be nice to find a workaround.
Comment 7 Timothy Arceri 2018-09-20 10:49:19 UTC
For all my searching it seemed AMD released multiple "fixes" for this game but people were still reporting issues many years after the release [1].

[1] https://www.reddit.com/r/pcgaming/comments/3ic13g/4_years_later_and_rage_is_still_a_glitchy_mess_on/
Comment 8 James B 2018-09-24 21:16:30 UTC
All tests performed with same settings.

- Rage 32-bit on Windows 10: Works perfect out of the box no performance issues, no issue with the virtual textures, no texture pop-in bug. I noticed the player shadow wasn't rendered correctly, but everything else is fine.
Rage.exe RAM usage ~1,370MB on the Wasteland map.

- Rage 32-bit on Ubuntu w/ 18.20 Pro drivers: I experience good performance out of the box but the virtual textures bug is present although very minor.  Can be totally cured by setting "jobs_numThreads 1", texture pop in bug still persists.
Rage.exe RAM usage ~780MB on the Wasteland map.  

- Rage 32-bit on Arch w/ latest mesa-git:  Massive issue with virtual textures unless you set "jobs_numThreads 1" which reduces but doesn't fix the issue, frame rate dips to 30-40fps in certain areas of the wasteland and the "texture pop" is there regardless even if you enabled the texture cache, set the maxPPF etc.
Rage.exe RAM usage ~730MB on the Wasteland map.

http://renderingpipeline.com/2012/03/megatextures-in-rage/

Adding "+com_allowconsole 1" to the launch options using "toggle vt_showPageNumbers; vt_restart" you can see the wrong mipmap level and texture numbers are being loaded for some of the tiles.

I'm wondering if somebody at AMD would have access to the changelogs for the proprietary drivers back when the Rage patches were first introduced, it would atleast point you in the right direction.

Heres a video I made comparing 32/64-bit versions on my system: https://www.youtube.com/watch?v=EUwq4dbnFkA
Comment 9 Michael Monreal 2019-01-06 13:50:03 UTC
(In reply to Sven Arvidsson from comment #6)
> There's also this an entry about a similar problem on the PC Gaming Wiki

The Wiki as well as many other guides recommend to set fc_maxcachememoryMB to a higher value. I noticed that on Proton, the highest value I can set is 96 (which is the default). Can this actually be set to values of 1024 and higher on Windows?
Comment 10 Michael Monreal 2019-01-06 13:54:19 UTC
(In reply to James B from comment #8)
> Heres a video I made comparing 32/64-bit versions on my system:
> https://www.youtube.com/watch?v=EUwq4dbnFkA

Same results on my system (RX 580) running Ubuntu and Padoka PPA.

It would be nice to be able to play the 32 bit version as it supports achievements, which the 64 bit version does not.
Comment 11 Dan Bardo 2019-07-15 12:32:57 UTC
Seems like in Windows the problem is solved with AMD Catalyst Control Center by turning on 'Surface Format Optimization' option.
https://steamcommunity.com/sharedfiles/filedetails/?id=313663882

Maybe this can give some hints on how to solve this in Linux.
Comment 12 GitLab Migration User 2019-09-25 18:09:45 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1326.


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.