ValveSoftware / wine

Wine with a bit of extra spice
Other
1.3k stars 244 forks source link

The Last of Us Part I amd_ags_x64 issue (sorted) #196

Closed Hadrianneue closed 12 months ago

Hadrianneue commented 1 year ago

TLOU Part I needs amd_ags_x64=b override to make the outdated driver dialog box go away as well as report the correct amount of vram, however it causes stutters all over the place, bumpy frametimes and overall lower framerate, usually -10% performance hit.

Image comparison showing the issue posted TLOU issue tracker: https://github.com/ValveSoftware/Proton/issues/6653#issuecomment-1668106550

same issue mentioned here with more details by another user, which also tested the changes i did and said it fixed the issue on his end too: https://github.com/HansKristian-Work/vkd3d-proton/issues/1669

Anyhow, i sort of figure it out how to make the issue go away but i'm not exactly sure what specifically causes this issue, so here's the changes i did that made this issue go away:

on amd_ags_x64_main.c remove all version values but the last one:

enum amd_ags_version
{
    AMD_AGS_VERSION_6_1_0,

    AMD_AGS_VERSION_COUNT
};

and since there is logic bellow that relies on those enum values, i just changed / removed the minimum necessary so it builds without errors:

one change on:

static enum amd_ags_version determine_ags_version(void)
{
    ....
    enum amd_ags_version ret = AMD_AGS_VERSION_6_1_0;
    ....
}

and on the function init_ags_context() changed all instances of "context->version >= AMD_AGS_VERSION_6_0_0" to use AMD_AGS_VERSION_6_1_0.

and finally to make it easier, removed agsDriverExtensionsDX11_CreateDevice() and agsDriverExtensionsDX11_Init() functions altogether since they don't really seem to make any difference here specifically (and from amd_ags_x64.spec so it builds without errors).

so at last, replacing the amd_ags_x64 bundled with proton on /lib64/wine/x86_64-windows/ and setting override amd_ags_x64=b does the trick here, replacing amd_ags_x64.dll bundled with the game does not work for reasons that i don't understand.

Hadrianneue commented 12 months ago

closed by https://github.com/ValveSoftware/wine/commit/b208cf202ad6f433f57f632ae10f9486471999db