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

[D3D8]Top Spin 2004: career mode graphics corruptions #4214

Open
tomnic79 opened this issue Aug 21, 2024 · 14 comments
Open

[D3D8]Top Spin 2004: career mode graphics corruptions #4214

tomnic79 opened this issue Aug 21, 2024 · 14 comments

Comments

@tomnic79
Copy link

tomnic79 commented Aug 21, 2024

Top Spin 2004, default configuration, 1024x768, 1920x1080, 1680x1050 all @ 60 Hz. XP SP2 compatibility mode on, run as admin. Both original and with official game patch.

  • GPU: nVidia GeForce RTX 3070 8 Gb (but also with a GeForce GTX 750Ti and a GeForce RTX 2080Ti)
  • Driver: 560.70
  • DXVK version: 2.4
  • Windows 10 and 11 latest versions

Apitrace file: https://mega.nz/file/1jZHnb6Z#fUkahYqxAwjGRH74I2sVoBtM2nOCvREDe54kcMan_1s

1
2

As you can see there is an issue rendering some poligons: totally missing or with crazy vertex positions only in Career mode, if you try a normal exibition everything renders fine.

I've tried the old D8VK 1.0 with the conf option d3d8.managedBufferPlacement = True and it solves the problem, BUT the game exits after 2-3 minutes of gameplay without a specific error: Windows Event Manager says generically that either Topspin.exe or msvcrt.dll (in C:\Windows\System32) crashed.

Is this a possible regression from D8VK? Where can I find an equivalent conf option for DXVK 2.4 for d3d8.managedBufferPlacement = True?

Thanks in advance for your help,
Nicola

@Blisto91
Copy link
Contributor

@tomnic79 Hi there. Can you check what happens if you try with d3d9.allowDirectBufferMapping = False

@tomnic79
Copy link
Author

Hi @Blisto91, just tried now: no corruptions during player personalization, but hangs and exits to desktop as soon as I try to save the player, d3d8.dll causing the issue according to windows event manager.

@WinterSnowfall
Copy link
Contributor

as of course there will be weird things since it is leaking.

Not releasing objects doesn't generally cause graphical artifacting, so I'm not sure what you mean here. The two issues are most likely unrelated.

There were many buffer leaks with other apps on a earlier d8vk, but this case seems survived.

Previous leaks were caused by incorrect refcounting, but that doesn't seem to be the case here - or at least not the obvious ones, since refcounts for all d3d8 objects are identical between a dxvk trace and a WineD3D trace. I'll look closer into what's causing the leaks, but since the problem is rather obscure it will probably take a while.

P.S.: As a fun aside, the game outright crashes when attempting to use d3d8to9, with either dxvk or WineD3D.

@tomnic79
Copy link
Author

tomnic79 commented Aug 24, 2024

Yes with AMD gpus everything's fine, the graphics corruptions problem is with nVIDIA GPUS even in native Windows without any sort of "workaround", that's why I'm trying to use some dll wrapping to try to solve this issue on my nVidia based PCs without exchanging GPUs. The freezing problem, generated by the buffer leak, happens only when wrapping with D8VK and DXVK.

@WinterSnowfall
Copy link
Contributor

that's why I'm trying to use some wrapping to try to solve this issue on my nVidia based PCs

We'll probably end up applying d3d9.allowDirectBufferMapping = False to address the first issue. As to the memory leak, that might prove a bit more challenging to pinpoint. I don't see any obvious wrongdoings with buffers or anything else.

@tomnic79
Copy link
Author

Yes with AMD gpus everything's fine, the graphics corruptions problem is with nVIDIA GPUS even in native Windows without any sort of "workaround", that's why I'm trying to use some dll wrapping to try to solve this issue on my nVidia based PCs without exchanging GPUs. The freezing problem, generated by the buffer leak, happens only when wrapping with D8VK and DXVK.

Maybe try this build d3d8.zip of d3d8to9 1.9.2 (particular version where game AA is actually working) and also it is helding up index buffer. Since index is leaking, that is my quickest guess. Probably wont work, as you said up there this.

've tried the old D8VK 1.0 with the conf option d3d8.managedBufferPlacement = True and it solves the problem, BUT the game exits after 2-3 minutes of gameplay without a specific error:

But it dont hurt to try... or maybe try to limit app to 1 CPU core. That also might not help, because VK is threaded by design... but again it dont hurt to try. Just to know what triggers it and if anything changes.

With your d3d8.dll version it crashes as soon as I try to create a new player, and if I try to set the affinity to CPU0 only it crashes :(

@tomnic79
Copy link
Author

No it crashes the same, even exibition doesn't work anymore with the specific dll provided, nor folder Media\GamePart\Players gets recreated, unless deleting this d3d8.dll

@tomnic79
Copy link
Author

Just to be clear that I've cleaned all the folders you've said with the d3d8.dll you suggested: https://mega.nz/file/Zv5zUQRY#bVIYjY4jAg-ANOWD_tjMdpYU9DS4RiNzMOwMrrHN9J8

You can also see that when I'm trying to start to play it hangs just before recreating the player.ini file you've just said.

The only way I can play this game at the moment with nVidia cards is with the latest dgVoodoo2 forcing DX12 render pathway (or the software based one, albeit a bit slow @ FHD). Just an issue with the intro videos that are not stretched to fill the screen (other issues if I select "stretch" in directx settings so I can live without intro videos ;) ), with D8VK videos were ok, so I'd have preferred that way.

Anyway, I'll use dgVoodoo2 or the other PCs with AMD cards, thanks for all the efforts till today!!!

@tomnic79
Copy link
Author

tomnic79 commented Aug 26, 2024

Now it doesn't crash at all but players are mostly black, no vertex corruptions nor missing polygons too!

@tomnic79
Copy link
Author

tomnic79 commented Aug 27, 2024

Only with the d3d8.dll file found in the default subfolder of your zip alone the game doesn't crash but players remain mostly black. Otherwise it crashes before creating a new player, just like with the first d3d8.dll you sent me.

@mrdeathjr28
Copy link

mrdeathjr28 commented Aug 27, 2024

In my case work with all dxvk 2.4 files and i dont see any character rendering issue (amd renoir igpu)

tpspa

tpsnb

tpspc

@tomnic79
Copy link
Author

In my case work with all dxvk 2.4 files and i dont see any character rendering issue (amd renoir igpu)

tpspa

tpsnb

tpspc

Yes with AMD GPUs no issues at all, we need to solve this problem for nVidia owners

@mrdeathjr28
Copy link

mrdeathjr28 commented Aug 27, 2024

Yes with AMD GPUs no issues at all, we need to solve this problem for nVidia owners

only for give more feedback (amd renoir in this case) and i use new wow64 mode
(./configure --enable-archs=i386,x86_64)

@WinterSnowfall
Copy link
Contributor

I've captured a trace of the demo with WineD3D, however it crashes my Nvidia GPU (Xid 13) on playback with dxvk.

NVRM: Xid (PCI:0000:01:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception on GPC 0: 3D HEIGHT CT Violation. Coordinates: (0x2, 0x208)
NVRM: Xid (PCI:0000:01:00): 13, pid='<unknown>', name=<unknown>, Graphics Exception on GPC 3: WIDTH CT Violation. Coordinates: (0x280, 0xd)

Playing it back with WineD3D shows some warning messages, but works fine.

Not entirely sure if this is a problem with apitrace or the game, but I've asked @Blisto91 to try replaying it with Vulkan validation layer enabled, see if that yields anything interesting.

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

No branches or pull requests

5 participants