Joshua-Ashton / d9vk

A Direct3D9 to Vulkan layer using the DXVK backend. [Upstreamed to DXVK]
https://github.com/doitsujin/dxvk
zlib License
833 stars 42 forks source link

Sonic Adventure 2 graphical issues #292

Closed CartoonFan closed 4 years ago

CartoonFan commented 4 years ago

Please describe your issue as accurately as possible. If you run into a problem with a binary release, make sure to test with latest master as well.

Important: When reporting an issue with a specific game or application, such as crashes or rendering issues, please include log files and a D3D11/D3D9 Apitrace (see https://github.com/apitrace/apitrace) so that the issue can be reproduced. In order to create a trace for D3D11/D3D10: Run wine apitrace.exe trace -a dxgi YOURGAME.exe. In order to create a trace for D3D9: Follow https://github.com/Joshua-Ashton/d9vk/wiki/Making-a-Trace. DO NOT use DXVK together with apitrace!

Software information

Sonic Adventure 2 (Steam 213610)

System information

Apitrace file(s)

https://drive.google.com/file/d/1MhdrCxRYA1gGxRN0Wuxi0Ak7thHXOLXT/view?usp=sharing

Log files

Hello. Sonic Adventure 2 has a strange bug where the bottom of a train car appears above Sonic at various points in the first level.

The effect is pictured here:

D9VK: D9VK-20190804-183001

Windows: sonic2app_Windows_2

I renamed the exe to be able to run the game (also needed on Wine), so that's why the actual log says Launcher.exe. Thanks for all your hard work.

EDIT: changed the trace to a tar.xz.

Joshua-Ashton commented 4 years ago

Can you see if its corrected as of latest commit?

CartoonFan commented 4 years ago

The bug is still reproducible for me with the current trace and latest commit.

Joshua-Ashton commented 4 years ago

What's the name of the exe?

CartoonFan commented 4 years ago

The actual game is sonic2app.exe. Steam usually calls Launcher.exe and then crashes, and I renamed Launcher.exe to sonic2app.exe to avoid the crash.

Joshua-Ashton commented 4 years ago

Oh, that makes this much more complex then

CartoonFan commented 4 years ago

How do you mean? Also, I wanted to add that the exe renaming is only needed on Wine; The Windows version works fine without any extra workarounds. I have a 2 kb trace of the launcher itself, on the off chance that it's useful:

https://drive.google.com/file/d/1SwdZxyaP6rtHZxGpnMy5JQjb0NrwSvdg/view?usp=sharing

CartoonFan commented 4 years ago

Thank you! On a side note, do you know why the issue is fixed in-game but not in the trace?

Joshua-Ashton commented 4 years ago

Because I did a workaround, the game is actually doing UB

CartoonFan commented 4 years ago

Ah, OK. I don't know what UB means, but thanks for taking the time to reply. I'm mainly curious whether I can trust a trace or if I have to check the actual game every time a new commit comes around. Thanks again!

EDIT: UB looks like...undefined behavior? I guess that makes sense.

Joshua-Ashton commented 4 years ago

Undefined behaviour yeah. It's putting NaNs in as float constant. We do the same as Intel drivers and -> 0 so we hit on the same bug.

CartoonFan commented 4 years ago

I think I kind of get it. At least, I remember that floats are intended to hold numbers, and I assume putting...not-numbers is bad. I guess putting a 0 instead makes the bug show up in the trace but not in the game itself, since the trace is doing...something else. Or something. I appreciate all this, though. I'm definitely not a programming ace by any means, so I'm just trying to do my best.