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

DXVK DLLs are compiled in debug mode #192

Closed
doitsujin opened this Issue Aug 22, 2018 · 8 comments

Comments

Projects
None yet
5 participants
@doitsujin
Collaborator

doitsujin commented Aug 22, 2018

Browsing through the Proton install directory, it appears that the DXVK binaries are

  • Not stripped (the two 64-bit DLLs are over 120MB in size, compared to 3.6 MB of the release DLLs)
  • Possibly compiled in debug mode rather than release mode, which can reduce performance by as much as 50%. This might be causing the performance regressions compared to Lutris builds reported in #186 .
@sambow23

This comment has been minimized.

sambow23 commented Aug 23, 2018

I have about a 10-20% performance loss in The Forest, I'd send screenshots but recently I can't get the game past the intro screen on Steam Play, it works fine on Lutris.

@Plagman

This comment has been minimized.

Member

Plagman commented Aug 23, 2018

I remember accidentally testing debug DXVK for way longer than I should have, so I can certainly believe we would have accidentally done that in the build system too. Will have to check, thanks for the report!

Not stripping might be desirable if we move both flavours to winegcc, so people can profile and get symbols; right? I would hope it doesn't make a perf difference, even in terms of I/O during loading, since only the code segments get mapped.

@doitsujin

This comment has been minimized.

Collaborator

doitsujin commented Aug 23, 2018

Actually I'm rather convinced now that these are unoptimized debug builds because even my unstripped release builds are only around 14MB per DLL.

Not stripping might be desirable if we move both flavours to winegcc, so people can profile and get symbols; right?

Fair enough, but about that, there have been reports that the 32-bit winelib builds are unstable in games that work fine with the mingw builds for some reason. I'll have to take a closer look at that next week.

@Plagman

This comment has been minimized.

Member

Plagman commented Aug 23, 2018

Hrm, seems like the build system is trying to do the right thing:

https://github.com/ValveSoftware/Proton/blob/proton_3.7/build_proton.sh#L457

Not sure what might be happening offhand, then; I'll leave it in Andrew's capable hands to check that everything is doing what it should during the build.

@doitsujin

This comment has been minimized.

Collaborator

doitsujin commented Aug 23, 2018

Looking at the script, it might be hitting some weird edge case in Meson where it doesn't pick up changes made to certain variables when running inside a script (as opposed to an interactive shell). This has been causing problems before, particularly with -Dprefix and -Dbuildtype.

So instead of doing this:

meson --prefix="$TOP"/build/dxvk.win32 --cross-file build-win32.txt "$TOP"/build/dxvk.win32
meson configure -Dbuildtype=release

It actually should be doing the following:

meson --buildtype "release" --prefix="$TOP"/build/dxvk.win32 --cross-file build-win32.txt "$TOP"/build/dxvk.win32

Maybe throw in --strip as well as long as we're using mingw builds, since the debug info doesn't currently add much value.

Plagman pushed a commit that referenced this issue Aug 23, 2018

build_proton.sh: configure DXVK release-ness differently
To avoid a bug in meson where it apparently ignores configure commands from
scripts.

#192
@Plagman

This comment has been minimized.

Member

Plagman commented Aug 23, 2018

This is fixed, and pushed to the live branch of Proton 3.7, hopefully.

@nirbheek

This comment has been minimized.

nirbheek commented Aug 23, 2018

Looking at the script, it might be hitting some weird edge case in Meson where it doesn't pick up changes made to certain variables when running inside a script (as opposed to an interactive shell). This has been causing problems before, particularly with -Dprefix and -Dbuildtype.

Just for the record, this is not a Meson bug. This is a Ninja bug, which was fixed in October 2017 but a new release with the fix has not been made yet.

The basic issue is that if you make changes to the files generated by Meson too quickly (<1-2 seconds after they are generated), Ninja won't know because it only stores timestamps with resolution in seconds, so it doesn't trigger a meson reconfigure with the new buildtype. Now Ninja has nanosecond resolution, so this should be fixed as soon as Ninja makes a new release.

If you run into other CI issues related to this, I would recommend building your own executable from Ninja master or using the binaries that we at Meson use for our CI.

@Plagman

This comment has been minimized.

Member

Plagman commented Aug 23, 2018

Whoops, sorry for misattributing the problem on Twitter then! Thanks for the explanation, that makes more sense now; pretty serious bug.

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