csgo-osx-linux icon indicating copy to clipboard operation
csgo-osx-linux copied to clipboard

[CS2] Performance loss when smoke grenade is active

Open Tabascl opened this issue 1 year ago • 6 comments

Your system information

Please describe your issue in as much detail as possible:

Smoke grenades impact performance greatly on Linux, where Windows isn't affected at all. On Linux, when a smoke is up, the FPS are reduced by around 100. Even worse when a molotov burns additionally.

I've created this comparison, done on the same system with different operating systems:

https://github.com/ValveSoftware/csgo-osx-linux/assets/15350550/6aa0059d-2ae2-4819-81d3-aec6e99c312d

Steps for reproducing this issue:

  1. Throw a smoke grenade
  2. Observe game performance

Tabascl avatar Dec 19 '23 16:12 Tabascl

Hello @Tabascl, it might be interesting to note if you're using DirectX 11 or Vulkan on Windows, and if your initial test was with DirectX 11, then check how the game behaves with the game's launch options set to -vulkan since that is a more direct comparison.

kisak-valve avatar Dec 19 '23 17:12 kisak-valve

Hi @kisak-valve, I've just repeated the test with -vulkan on Windows as you suggested. My initial test was done without that option, so I assume that was DirectX 11.

Here's another video, again on Windows using -vulkan:

https://github.com/ValveSoftware/csgo-osx-linux/assets/15350550/29defe8e-2854-4d71-b255-24f9a8f121f7

This test, apart from the one stutter, did also have reduced performance, although not as drastic as on Linux.

Tabascl avatar Dec 19 '23 23:12 Tabascl

I am experiencing the same behaviour with RADV. I don't know if its related to this problem but my GPU should be the bottleneck and not my CPU (tested with RadeonGPUProfiler) I made round about 40 tests in total on different maps all "CPU" bottlenecked swappy-20231231_153029

I will make a test with a smoke active in a few days

NNxCLUTCHERxCPP avatar Dec 31 '23 14:12 NNxCLUTCHERxCPP

smoke inactive swappy-20240108_074112 swappy-20240108_074156 swappy-20240108_074208 swappy-20240108_074255

NNxCLUTCHERxCPP avatar Jan 08 '24 07:01 NNxCLUTCHERxCPP

smoke active (Wavemode "Unknown" seems weird) swappy-20240108_075304 swappy-20240108_075350 swappy-20240108_075437 swappy-20240108_075156

NNxCLUTCHERxCPP avatar Jan 08 '24 07:01 NNxCLUTCHERxCPP

I did a little test in mirage and inferno comparing windows dxx11 and linux with radv and found that smoke grenades have a bigger impact on linux so I'm posting in this issue.

windows (sorry that a few screenshots are a bit cutoff, I didn't realize until later):

cs2 6 cs2 cs2 2 cs2 3 cs2 4 cs2 5

linux:

Counter-Strike 2_20240115_180444 Counter-Strike 2_20240115_180511 Counter-Strike 2_20240115_180551 Counter-Strike 2_20240115_180728 Counter-Strike 2_20240115_180756 Counter-Strike 2_20240115_181056

Something I found interesting is that mirage runs faster on linux when the smoke grenade isn't active, in the tested location it ran at ~260fps when it wasn't active (vs ~240 on windows), so the smoke grenade costed about 70fps on linux vs 20fps on windows. I didn't test smoke grenades on inferno but that map was faster on windows, opposite of mirage.

simifor avatar Jan 15 '24 22:01 simifor