1
0
forked from mirrors/0ad

Fix the random slowdowns and speedups on AMD CPUs for Windows

Remove the MAHAF code and binaries, which doesn't work on anything more
recent than Windows XP due to the usage of an unsigned driver.
Remove the custom timer (PMT, TSC...) code to use the Windows
recommended way aka, QueryPerformanceCounter (QPC)
Remove the deprecated functions in wpthread relating to this. Some
further cleanup will be needed, but this patch is already big enough.

This patch voluntarily excludes the Linux Fix for further investigation
as we haven't ruled out a kernel bug yet;

Discussed with: @wraitii, @vladislavbelov, @janwas, AMD Inc,
Tested by: Dakara, @OptimusShepard, Stan (On W10, Win7; with and without
PCH)

Threads:
https://wildfiregames.com/forum/topic/28367-amd-ryzen-threadripper-user-read-before-posting/
https://wildfiregames.com/forum/index.php?/topic/26890-problem-with-ryzen-3000er-series/page/3/

Differential Revision: https://code.wildfiregames.com/D2726
This was SVN commit r24137.
This commit is contained in:
Stan
2020-11-06 23:18:16 +00:00
parent 429d190fd2
commit ada16439ab
38 changed files with 23 additions and 3522 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-16
View File
@@ -84,22 +84,6 @@ Advanced / diagnostic:
-hashtest-full=X whether to enable computation of full hashes in replaymode (default true). Can be disabled to improve performance.
-hashtest-quick=X whether to enable computation of quick hashes in replaymode (default false). Can be enabled for debugging purposes.
Windows-specific:
-wQpcTscSafe allow timing via QueryPerformanceCounter despite the fact
that it's using TSC and it may be unsafe. has no effect if
a better timer (i.e. the HPET) is available.
should only be specified if:
- you are sure your system does not engage in
thermal throttling (including STPCLK) OR
- an "RDTSC patch" is installed
this flag is also useful if all other alternatives are worse
than a potentially risky or slightly broken TSC-based QPC.
-wNoMahaf prevent any physical memory mapping or direct port I/O.
this disables all ACPI-related code and thus some of the
timer backends. specify this if problems are observed with
one of the abovementioned subsystems.
Archive builder:
-archivebuild=PATH system PATH of the base directory containing mod data to be archived/precached
specify all mods it depends on with -mod=NAME