protonscr

Missing particle effects in Supreme Commander

dxvkclosed d3d9needs more info
doitsujin/dxvk#2638 · opened 2022-05-05 by Flypaste · updated 2022-06-12 · 18 comments · github
FFlypaste 2022-05-05 github

Supcom is missing a lot of particle effects, some of them critical to playing the game competitively. The easiest way to check if they're working properly is the gate in animation when you start a skirmish match. Here's an example of not working vs. working properly: https://imgur.com/a/WO2PJkc

There is a dll override you can load on windows called dgVoodoo that fixes this D3D9 to DX12 rendering issue. However on linux while this works, it causes random crashes after 10+ minutes of gametime. So it would be nice if this were fixed natively in DXVK since linux users can't use the dgVoodoo fix. dgVoodoo's creator comments on this when patching it: "I can reproduce it, and the reason of the erroneous rendering is as interesting as this game: it's a very special incompatibility between DX shader models (original and converted)."

KK0bin maintainer 2022-05-05 github

Please don't just ignore the issue template. We need an apitrace to look into this.

FFlypaste 2022-05-05 github

Sorry this is my first time reporting an issue on github, I'll go find it

WWinterSnowfall 2022-05-05 github

Interesting... I've actually never played the game on Windows (or tried it with WineD3D for that matter), so never knew those effects were missing... it always looked good enough to me :sweat_smile:. I can probably get you a trace at some point if @Flypaste finds that too hard to do.

Edit: The said effects are not showing with WineD3D either apparently.

FFlypaste 2022-05-05 github

Ok so the template just... didn't appear when I made that first report. I clicked "submit an issue" and it just gave me a blank textbox. I found the template with a different submit an issue button.

I tried to get the apitrace, but it didn't work as expected. When I set the dll overrides in winecfg, nothing happened. So instead I set the dll overrides in the steam launch options with this command: WINEDLLOVERRIDES="d3d9=n,d3d11=n,dxgi=n" PROTON_USE_WINED3D=1
This generates the trace but the file is empty, and most importantly the game just crashes instantly saying it can't create the D3D device. So I had to disable D3D and go back to DXVK. Note that this crash does not happen when I remove the overrides and keep D3D.

Software information

Supreme commander forged alliance, but the issue is also present in the base game and in forged alliance forever.

System information

  • GPU: RX 5700XT
  • Driver: 22.0.2
  • Wine version: 7.7
  • DXVK version: v1.7-8-g51531e4a7

Apitrace file(s)

Log files

WWinterSnowfall 2022-05-05 github

Here's a trace captured with WineD3D, if that helps at all in this case: https://drive.google.com/file/d/1RJ7QglyjP0XB-PnQCmvE4IU5o-OzGr8v/view?usp=sharing

As I mentioned above, WineD3D doesn't fare any better and doesn't show the effects I've seen in @Flypaste's recording.

I tried setting d3d9.shaderModel = 2 & d3d9.shaderModel = 1 to see if that helps in any way, but it did not. The game refused to run at all with d3d9.shaderModel = 1, saying that it needs support for 2.0 at least.

One last thing to mention is that I'm on Nvidia and seeing the same thing, so the probability of it being something AMD-specific is highly unlikely. I'm also using the latest master build, not v1.7, but still getting the same.

WWinterSnowfall 2022-05-05 github

I set the dll overrides in the steam launch options with this command: WINEDLLOVERRIDES="d3d9=n,d3d11=n,dxgi=n"

FYI, you only need WINEDLLOVERRIDES="d3d9=n,b" for the apitrace d3d9.dll to do its work. Setting it simply to "n" will get you the "failed to create Direct3D9 Device" message you mentioned.

KK0bin maintainer 2022-05-27 github

I can't really tell whats wrong with it based on your imgur clips. The two look the same to me except that one is in a desert.

Here's what replaying your apitrace looked like for me.
image
image

Can you please describe the issue a bit more in depth and post some more comparison screenshots?

WWinterSnowfall 2022-05-27 github

@K0bin Here's what I'm seeing (and I think Flypaste is seeing as well). That being said, I'm not entirely sure what is causing the missing effects in both dxvk and WineD3D, since I have all the d3dx9 and d3dcompiler winetricks in my prefix...

FFlypaste 2022-06-01 github

Yup winter has shown it. This warping in swirl effect is the easiest way to troubleshoot the issue since you can see it immediately, but a LOT of shader-based effects are missing throughout the game. Someone who patched this on windows mentioned that the issue is happening because old directx shader models are being converted incorrectly. So if I were to make an unedcuated guess, I'd wager that there's something wrong with the DX9 -> Windows 11 implementation, and that same issue is present in the DX9 -> Vulkan/WineD3D implementation. Most noteworthy, whatever the dgVoodoo creator did that fixed it for windows 11, also works to fix it for Vulkan/WineD3D. It's just the game crashes intermittently using his dll hack. I don't have any more information on the source of the problem beyond that, though.

BBlisto91 2022-06-12 github

So can reproduce this if i use dxvk 1.7. But not when using proton 7.0-2 (dxvk 1.10.1), 7.0-3RC or dxvk 1.10.1 from github.

WWinterSnowfall 2022-06-12 github

So can reproduce this if i use dxvk 1.7. But not when using proton 7.0-2 (dxvk 1.10.1), 7.0-3RC or dxvk 1.10.1 from github.

Hmmm... so maybe this is not something dxvk specific after all, but rather an issue fixed by a Proton hack. That would explain the above, since I assume @K0bin is using Proton, while I am on Wine Staging.

BBlisto91 2022-06-12 github

@WinterSnowfall Which driver do you use?
This seems like a floatEmulation issue, since i can reproduce it if i change it to true. dxvk changes it to strict by default if you use radv/mesa 22 or above. strict wasn't a option in dxvk 1.7 yet.

WWinterSnowfall 2022-06-12 github

@WinterSnowfall Which driver do you use?

I thought everyone knew by now I'm an Nvidia peasant :). I currently have a GTX 1080 on my main gaming rig and an Intel Xe Graphics powered laptop at my disposal.

This seems like a floatEmulation issue, since i can reproduce it if i change it to true.

Alright, let me give it a shot. Thanks for the tip :+1: .

BBlisto91 2022-06-12 github

I thought everyone knew by now I'm an Nvidia peasant :).

My memory is shit xd.

Once you've verified d3d9.floatEmulation = Strict work we can make a pr.

WWinterSnowfall 2022-06-12 github

Once you've verified d3d9.floatEmulation = Strict work we can make a pr.

Yes, that fixed it :partying_face: . @Blisto91 please prep a PR for launch :rocket: . Both the original game and Forged Alliance have the executable named SupremeCommander.exe so this should fix the issue in both games, which is perfect.

BBlisto91 2022-06-12 github

:tada: :+1:

Do you know if supreme commander 2 have similar issues?

WWinterSnowfall 2022-06-12 github

They dropped the fancy warp-in effects at the start of the game in SupCom2, so there's no really easy way to tell... and I no longer have a Windows machine around to compare it against otherwise, unfortunately.

BBlisto91 2022-06-12 github

Rgr. I will make a note of it to check later if i get the game.

Proton versions

Launch options

DLLs