Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED] GEARS OF WAR (2007), the Toika turrets and birds are affected. #7

Open
Mrblubb opened this issue Mar 15, 2022 · 32 comments
Open

Comments

@Mrblubb
Copy link

Mrblubb commented Mar 15, 2022

Hello,
Hope you're well!
Just wanted to request the very same fix for "Gears of War" on PC since it is also affected by the same bug and the turrets and birds and some terrain objects produces same artifacts on modern FX & Ryzen CPUs and utilising this "dll" doesn't seem to fix in this game.

Thanks!!

@mirh
Copy link

mirh commented Mar 15, 2022

Can you take a screenshot?
And what CPU do you have? If it's ryzen, try the second solution here.

@Mrblubb
Copy link
Author

Mrblubb commented Mar 16, 2022

Can you take a screenshot? And what CPU do you have? If it's ryzen, try the second solution here.

Here are some screenshots with the bug in action :
Gears of War Screenshot dx9
Gears of War Screenshot 2022 03 16 - 18 41 51 91
Gears of War Screenshot 2022 03 16 - 18 42 06 47
Gears of War Screenshot 2022 03 16 - 19 15 44 73

With DXVK 1.10 (dx9) :
Gears of War Screenshot 2022 03 16 - 18 57 49 35
Gears of War Screenshot 2022 03 16 - 18 58 29 44
Gears of War Screenshot 2022 03 16 - 19 14 01 89

Tested on 2 systems
FX8350 | NVIDIA GTX1060 6gb |511.79 | 16gb ram | Win 10 21H1
RYZEN 3900X | NVIDIA RTX 2060 8gb |511.79 | 64gbram | Win 10 21H1

Both having exact same issue.

@Mrblubb
Copy link
Author

Mrblubb commented Mar 16, 2022

Also setting the PSGP flag in registry doesn't seem to fix it.
Edit : With Dx10 ingame there is a heavy dark blob just like Mass effect, doesn't happen with dxvk but model isn't lit just like dx9.

@CookiePLMonster
Copy link
Owner

Also setting the PSGP flag in registry doesn't seem to fix it.

In which case, even though it looks identical to the naked eye, it's not the same issue.

@mirh
Copy link

mirh commented Mar 16, 2022

In the case of mass effect and bulldozer cpus, disabling PSGP also somehow still didn't fix the problem (see #3, which we never got around to understand)
On the other hand, dxvk making a difference sounds different indeed.

@Mrblubb
Copy link
Author

Mrblubb commented Mar 16, 2022

Thanks a lot for your attention on this! Can anything be done at this point? Any workarounds, I'm very ready to help out with any info needed.

@CookiePLMonster
Copy link
Owner

No ideas from me.

@Mrblubb
Copy link
Author

Mrblubb commented Mar 16, 2022

3dnow! was very ahead of its time eh! No one imagined it'll be remembered in 2022 lol! Why o why amd doesn't include a similar into their chips. Well then, guess it'll be fixed when "it'll be fixed". Should it be logical to report this issue to DXVK repo as well ?

@mirh
Copy link

mirh commented Mar 16, 2022

The problem with ME is different rounding of SSE operations, not lack of 3dnow per se.
You could try to capture the game with PIX maybe (take note DX10 requires to use Vista or 7 without KB2670838)

Dxvk then doesn't like much "clueless bug reports that have only been validated in windows".

@adjonesey
Copy link

I was having a look at this issue today, and I found that Gears of War imports D3DXMatrixInverse from the d3dx10 DLL rather than the d3dx9 one. So I cloned this repo and rewrote the inits/exports for the d3dx10 functions that Gears uses, copied the compiled DLL to the game folder, and what do you know? It works great!

Here's the DLL if anyone wants to try:

drive.google.com/file/d/1a7jYhc-lpk1feJXXQ-c7B5MHBKpg5kH3

Huge props to CookiePLMonster and team for root causing this issue.

image

@Mrblubb
Copy link
Author

Mrblubb commented Nov 20, 2024

Oh my GOD!!! I thought it would never be possible. Going to install the game immediately to try this. THANK YOU SO MUCH!!! 🤩 🙏

@CookiePLMonster
Copy link
Owner

I'm going to change the issue's title and pin it for visibility 🙂

@CookiePLMonster CookiePLMonster changed the title A humble request to please look into this very same issue in GEARS OF WAR (2007) where the Toika turrets and birds are affected. [SOLVED] GEARS OF WAR (2007), the Toika turrets and birds are affected. Nov 20, 2024
@CookiePLMonster CookiePLMonster pinned this issue Nov 20, 2024
@Mrblubb
Copy link
Author

Mrblubb commented Nov 20, 2024

Wonderful! I've been blessed by Lords themselves. Thanks a lot

@Mrblubb
Copy link
Author

Mrblubb commented Nov 20, 2024

Sorry for bothering but I'm still facing the issue. I tried running on dx9 and dx10 with the d3dx10_35.dll placed in the game folder yet the turrets still appear like black blobs 😥 Should I need to rename it ?

@CookiePLMonster
Copy link
Owner

@adjonesey

@adjonesey
Copy link

Hmm, not sure tbh. It works for me in DX9 and DX10 as soon as that DLL is in place. Are you sure you are putting the DLL in the "Binaries" folder (same place as WarGame-G4WLive.exe), @Mrblubb ? Also right-click the file, go to Properties, and make sure you "Unblock" it if necessary.

Bit of a long shot, but I compiled the DLL with VS2022, so make sure you have the latest C++ redistributables installed as well.

@adjonesey
Copy link

Just tried it on a 2nd Ryzen system with no Dev tools or SDKs installed, and it works fine there too.

@Mrblubb
Copy link
Author

Mrblubb commented Nov 21, 2024

@adjonesey Just tried the patch on my Ryzen machine and it does work beautifully (sharing the screens here). But on the FX 8350 system it doesn't. Can it be made compatible with it somehow ?

vlcsnap-2024-11-21-14h55m43s478
vlcsnap-2024-11-21-14h55m15s365
vlcsnap-2024-11-21-14h55m03s671

@CookiePLMonster
Copy link
Owner

I'm suspecting it's the same issue as the one we still have in Mass Effect:

Fixed an issue causing black blobs to appear with contemporary AMD CPUs. Warning: AMD FX and Bulldozer chips are still affected. We are investigating the issue.

@Mrblubb
Copy link
Author

Mrblubb commented Nov 21, 2024

Oh I see. So no support for FX yet. Hopefully in near future. Still I'm very happy that I can finally play the game 4k without issues on my modern PC. Thanks a million for fixing this 😊❤🙏✨

@mirh
Copy link

mirh commented Nov 21, 2024

Sounds the same of #3, yes. How wack could 15h accuracy even be?
Can the fact that we have the full source code of the game and the uncompiled maps help here?

@adjonesey
Copy link

@adjonesey Just tried the patch on my Ryzen machine and it does work beautifully (sharing the screens here). But on the FX 8350 system it doesn't. Can it be made compatible with it somehow ?

Nice, glad it's at least half working for you!

As I don't have an FX CPU to test with it's unfortunately a bit difficult to comment on that. I don't have any theories why the fix isn't working on those CPUs, possibly something to do with 3Dnow!?

One thing you could possibly try (although I'm not very optimistic) - the d3dx10 DLL seems to depend on the DisableD3DX10PSGP setting rather than DisableD3DXPSGP, so you could try adding that DisableD3DX10PSGP to your registry and see if it makes any difference.

@Mrblubb
Copy link
Author

Mrblubb commented Nov 21, 2024

@adjonesey Sure! will try. Its just that its been more than a year so I forgot where to add that flag in registry (pardon my volatile memory). If you could guide me where it should be added in the registry it would be lifesaver. Thanks again:)

@adjonesey
Copy link

Sure no probs, you should be able to drop the setting in here (DWORD, value = 1)

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Direct3D

Also I think there's some good info on how to configure these properly in Silent's original blog on Mass Effect

@Mrblubb
Copy link
Author

Mrblubb commented Nov 21, 2024

Wonderful! Thanks a lot. I'm trying it now.

@Mrblubb
Copy link
Author

Mrblubb commented Nov 21, 2024

@adjonesey so I tried registry flags but it doesn't seem to work. Also this is how I added the flags in the registry according to Rafael's guide provided in Silent's blog. Below it is how the game looks on fx 8350 cpu
image
vlcsnap-2024-11-21-22h26m42s228

@Mrblubb
Copy link
Author

Mrblubb commented Nov 21, 2024

Edit: Sorry posted image twice

@adjonesey
Copy link

adjonesey commented Nov 21, 2024

It probably won't help, but I think Rafael's example shows application-specific settings inside a subkey of Direct3D (he called it SolitaireOverrides so I don't think it matters what name you give it)

@mirh
Copy link

mirh commented Nov 21, 2024

IIRC his fancy overrides don't work at all for these values, and the only proper place is HKLM\SOFTWARE\Wow6432Node\Microsoft\Direct3D

@Mrblubb
Copy link
Author

Mrblubb commented Nov 21, 2024

@adjonesey @mirh thanks I tried the new location but I think game doesn't accept the flags from registry at all with any location whatsoever. The only proper way seems to be via the dll injection that worked on the ryzen cpu. If somehow that could be translated for fx lineup as well, glory will be made and this long 3dnow! black blobs will be history forever.
image

@mirh
Copy link

mirh commented Nov 21, 2024

You mean that's not even working on the ryzen? This is strange. Could you check with procmon if the game is even trying to read any such value anywhere?

@Mrblubb
Copy link
Author

Mrblubb commented Nov 22, 2024

@mirh yeah the game doesn't read these registry values at all even on ryzen. Also I never used procmon so I don't know how should I approach it to look for a particular value for an exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants