Jump to content
The Dark Mod Forums

Very low performance on AMD GPU


lowenz

Recommended Posts

I have no ideas actually.

If it was caused by interaction itself, then the slowdown should be visible even without shadows.
If it was caused by shadows, then it should change when you switch between stencil and shadows, since their code is completely separate.
If it was caused by the way inputs are provided, then it should probably work differently with new/old backends.

I think without access to this GPU to comment/uncomment all possible chunks of code I won't be able to anything with it.
The commit does not have any functional changes, only refactoring, and a big one.

It is not something I can simply revert, because without it our progress on shaders side will be slowed down and we'll have many bugs about discrepancy between various modes.

Link to comment
Share on other sites

It's about the OpenGL driver and TDM code, using Mesa to translate to D3D12 solves everything.

 

Will try NO soft shadows!

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

DAMN! 2.11 beta

*Stencil "hard" -> 80 FPS

*Stencil "soft" OR Shadowmaps (soft or not) -> 20 FPS

Edited by lowenz
  • Thanks 1

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

40 minutes ago, lowenz said:

DAMN! 2.11 beta

*Stencil "hard" -> 80 FPS

*Stencil "soft" OR Shadowmaps (soft or not) -> 20 FPS

Ooof. I can't give up soft shadows, too pretty... +80 FPS just by using hard shadows though? Curious if you're still on Mesa 22.2.4 like me, think you said that Mesa 22.3 is supposed to improve performance a bit so fingers crossed.

I don't get anything as bad as that on Linux / amdgpu though. Still feels like performance is lower than it should be... as in I drop below 100 FPS in areas that aren't full of complex geometry and lights enough to feel justified.

Link to comment
Share on other sites

I'm on WINDOWS, but I can use this if my OpenGL driver fails: https://github.com/pal1000/mesa-dist-win/releases

translating to D3D12 (or Vulkan or LLVMPipe)

 

22.3 works perfectly with hard stencil and shadowmaps BUT I get square/block shadows with stencil SOFT

 

The FPS issue is present with the WINDOWS AMD OpenGL driver, NOT present translating to D3D12 thanks to MESA.

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

8 hours ago, MirceaKitsune said:

Ooof. I can't give up soft shadows, too pretty... +80 FPS just by using hard shadows though? Curious if you're still on Mesa 22.2.4 like me, think you said that Mesa 22.3 is supposed to improve performance a bit so fingers crossed.

I don't get anything as bad as that on Linux / amdgpu though. Still feels like performance is lower than it should be... as in I drop below 100 FPS in areas that aren't full of complex geometry and lights enough to feel justified.

On Linux you use Mesa as frontend, so I'm pretty sure you don't have this problem.

But it won't harm if you check it 😉
Just compare FPS on 2.10 and 2.11 beta in something like New Job or Saint Lucia with soft shadows, uncapped FPS and no Vsync.

Link to comment
Share on other sites

@lowenz, could you please try svn rev 10204 ?
(make sure glprogs get copied to game directory, they usually do it automatically along with executable)

Also, I have fixed r_skipAmbient and r_skipInteractions with new backend.
I guess if you set "r_skipAmbient 3" and see only lights, the things should work slowly for you.
But if you set "r_skipInteractions 1" and see only ambient, then the things should work fast.

Link to comment
Share on other sites

I'm also getting horrible performance on latest SVN (10250) with AMD, whereas 2.11b01 seems normal. r_usedebuggroups was 1 but setting to 0 seems to make no difference even after a restart. It seems to be related to shadowcasting: my fps drops from capped 60 to 6 if I switch on a player lantern around shadowcasting objects.

Link to comment
Share on other sites

3 hours ago, Dragofer said:

I'm also getting horrible performance on latest SVN (10250) with AMD, whereas 2.11b01 seems normal. r_usedebuggroups was 1 but setting to 0 seems to make no difference even after a restart. It seems to be related to shadowcasting: my fps drops from capped 60 to 6 if I switch on a player lantern around shadowcasting objects.

I'm compiling latest SVN right now, I'll try on my set up.

Are you windows or Linux? What's your GPU again?

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

Sorry if this sounds redundant but does changing r_softShadowsQuality change performance at all?

( Eg. Does r_softShadowsQuality 6 perform better than 12, 26, etc or do they all offer equally low performance ? )

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

9 minutes ago, nbohr1more said:

Sorry if this sounds redundant but does changing r_softShadowsQuality change performance at all?

( Eg. Does r_softShadowsQuality 6 perform better than 12, 26, etc or do they all offer equally low performance ? )

I did a quick test with that: Noticed "r_softShadowsQuality 4" looks roughly as alright as 6 but gains a notable bit of extra FPS. Problem is that breaks the menu setting causing Soft Shadows to appear as Off.

Actually could we have more options for the menu entry? Like a Lowest setting for 4 samples, 8 for Low, 16 for Medium, 32 for High, 64 for Highest. Or something among those lines, but at least have the lowest start from just 4.

Or why not just use a slider? The sharpness effect has one, feels like it would make more sense here. This is the sort of thing users may want to easily tune based on their hardware and / or perceived visual loss.

Link to comment
Share on other sites

20 minutes ago, MirceaKitsune said:

I did a quick test with that: Noticed "r_softShadowsQuality 4" looks roughly as alright as 6 but gains a notable bit of extra FPS. Problem is that breaks the menu setting causing Soft Shadows to appear as Off.

Actually could we have more options for the menu entry? Like a Lowest setting for 4 samples, 8 for Low, 16 for Medium, 32 for High, 64 for Highest. Or something among those lines, but at least have the lowest start from just 4.

Or why not just use a slider? The sharpness effect has one, feels like it would make more sense here. This is the sort of thing users may want to easily tune based on their hardware and / or perceived visual loss.

I think your performance concerns are different than those seen by lowenz.

That said, there is probably an argument to be made for using a slider in the GUI.

One thing I've noticed is that some quality levels have better looking gradation patterns ( more evenly distributed, no banding between gradients ) thus setting 15 can look even better than one of the built-in settings like 26 ( 25 actually looks better than 26 and many of the higher values ). I only have a 1080P resolution display so I can't confirm whether this behavior holds true for other resolutions but it does seem to hold true for variations in renderscale.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

2 hours ago, nbohr1more said:

Sorry if this sounds redundant but does changing r_softShadowsQuality change performance at all?

( Eg. Does r_softShadowsQuality 6 perform better than 12, 26, etc or do they all offer equally low performance ? )

Equally low performance from "low" ahead

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

48 minutes ago, stgatilov said:

I replugged cable to my AMD RX 550, and I can definitely reproduce the same issue.

I have severe performance degradation (like 3x or 4x) in New Job on all shadows except for hard stencil.
And the degradation starts on the very same dev build.

I think it will get quicker from this moment 😁

^_^

 

Thanks man, much appreciated.

Edited by lowenz

Task is not so much to see what no one has yet seen but to think what nobody has yet thought about that which everybody see. - E.S.

Link to comment
Share on other sites

It's hard to tell if I'm experiencing a completely different problem. What we have in common is we both use AMD cards, what differs is he's getting the issue on Windows while I'm on Linux / Mesa / amdgpu. The exact triggers and results seem to intersect in some areas. In case it helps mine is a ROG-STRIX-RX570-O4G-GAMING if that's a model which should be affected by common driver stuff:

Today I read about the new 2.11 Beta 2 and decided to update. First thing after starting a map, I noticed performance was down to 20 FPS where it would normally be 60 FPS. After a minute of digging I found that's because r_softShadowsQuality reset itself to 24 I think. I set it back to Low / 6 and things went back to normal, but this was a good opportunity to notice how extreme the performance impact of having even a modest setting can be. I could have sworn it wasn't as bad an year ago, albeit the maps I was playing also made a big difference.

This is mainly on shadow maps though: If I use stencil shadows the impact is lesser with more samples. Even if I turn soft shadows off however, I feel I get abnormally low FPS on both Stencil and Maps.

4 hours ago, stgatilov said:

I replugged cable to my AMD RX 550, and I can definitely reproduce the same issue.

I have severe performance degradation (like 3x or 4x) in New Job on all shadows except for hard stencil.
And the degradation starts on the very same dev build.

I think it will get quicker from this moment 😁

This is great news: Compiling the engine from SVN should still work on my end, I'll wait for the patch and see what it changes for me. I really feel something must be up with the AMD driver, at least some of the performance degradation must have a common root between what both me and lowenz are seeing... if not I'm wrong and it's a learning experience, but I sense the engine changed something all AMD cards of a certain type aren't happy with.

Edited by MirceaKitsune
Link to comment
Share on other sites

@lowenz I'm not an engine expert but if that's alright I wanted to offer a few suggestions of my own to see if we can nail this down faster, after playing with the renderer cvars yesterday and noticing some interesting ones.

First of all since I haven't seen this mentioned specifically: Have you ruled out the relatively new volumetric lights as a cause? Set "r_volumetricEnable 0". For me this barely makes a difference, just a few FPS.

Otherwise an idea: Open the console, type r_skip, then press tab... this should print all skip variables. Can you try setting each to 1 and see if any magically brings the FPS back up? Remember to set them back to 0 as those disable core features and should only be used for debugging, also ignore r_skipBackEnd as that will stop drawing everything including the menu / console! For me each has a small contribution but none of them appears to be a silver bullet for the overall low performance, except r_skipFrontEnd because it literally makes everything white 😄

Link to comment
Share on other sites

To everyone who can compile from source: try rev 10211.

Also, I would be glad if you actually compare the performance to that of 2.10.
Even if this issue was the greatest one, there could be other reasons for slowdown.

 

By the way, GLSL specification says that all function arguments must be copied.
Although it is normal to expect from GLSL compiler to inline all function calls, then find def-use relations and not copy read-only data. Maybe AMD had to block this particular case for some reason...

Also, I have launched Radeon GPU tools on TDM, and I like it a lot!
Yeah, it has a bit of AMD roughness (most recent version crashes, I had to backtrack about 1 year into the past to find working version), but I like how open they are. They just write down all the information they measure, without trying to protect developer from information overload. So much stuff there...

One interesting thing is that AMD profiling tool shows everything exclusively in Vulkan terms, nothing related to OpenGL.
I wonder whether they merely represent internal driver routines in Vulkan terms, or they internally convert OpenGL into Vulkan completely.
I've heard that Intel is converting OpenGL to Vulkan on recent drivers --- I guess that's the trend today.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...