Joshua Ashton
5d8539672d
[util] Fix config for EverQuest2
2020-11-27 06:27:01 +00:00
Joshua Ashton
bbfd6d0690
[util] Enable alpha test wiggle room for EverQuest 2
...
Fixes clothing being alpha tested incorrectly due to wonky interpolation on NVIDIA.
Game uses oC0 == 1.0f
My testing on NV shows the alpha test has a precision of 1/256 for all A8 and below formats, and around 1 / 2048 for A32F formats and 1 / 4096 for A16F formats (It makes no sense to me too) so anyway, we're just going to round this to a precision of 1 / 4096 and hopefully this should make things happy everywhere.
Closes : #1832
2020-11-26 12:16:33 +00:00
Shawn M. Chapla
7ef6132cf0
[util] Use nvapiHack by default for Far Cry Primal ( #1821 )
...
Remove nvapiHack=False default override for Far Cry Primal as the game
is unplayable without an nvapi implementation and appears to now perform
fine with nvapiHack.
Co-authored-by: Shawn M. Chapla <schapla@codeweavers.com>
2020-11-18 10:12:40 +01:00
Rhys Perry
4251b7a59c
[util]: Set enableRtOutputNaNFixup for Art of Rally
...
Fixes the (Windows) Art of Rally demo.
See https://gitlab.freedesktop.org/mesa/mesa/-/issues/3562
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
2020-10-06 15:57:07 +02:00
Samuel Pitoiset
ccb782219c
[util] Set enableRtOutputNanFixup for some Chilla's Art games
...
See ValveSoftware/Proton#4167
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2020-09-26 16:45:49 +02:00
Samuel Pitoiset
3487685a79
[util] Set enableRtOutputNaNFixup for The Dungeon of Naheulbeuk
...
Fixes rendering issues with RADV and AMDVLK (haven't tried -pro).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2020-09-26 15:06:29 +02:00
ishitatsuyuki
bb85a4caa8
Handle non-ASCII characters properly in paths
2020-09-10 15:56:38 +02:00
Philip Rebohle
645c8f8177
[util] Add option to disable log files entirely
...
But still log to stderr. Fixes #1743 .
2020-08-24 09:09:18 +02:00
Philip Rebohle
2a0f10e611
[util] Enable apitrace mode for Monster Hunter World
2020-08-13 18:52:45 +02:00
Philip Rebohle
346197c8c1
[util] Enable apitrace mode for Darksiders Warmastered Edition
...
Fixes #1719 .
2020-08-12 23:39:53 +02:00
Kevin Schmidt
9f6f6a7979
[util] Enable d3d9.memoryTrackTest for Anarchy Online
...
Prevents the game from consuming all system memory.
Signed-off-by: Kevin Schmidt <kevin.patrick.schmidt@googlemail.com>
2020-08-07 11:11:05 +01:00
Joshua Ashton
e7d9d4739a
[util] Fix trace macro for functions with no args
2020-08-07 10:56:26 +01:00
Joshua Ashton
aa01d914f1
[util] Implement METHOD_NAME for _MSC_VER
2020-08-07 10:56:26 +01:00
Jason Bagavatsingham
145d8225f4
[util] Set enableRtOutputNaNFixup for Observation
2020-08-06 14:14:49 +02:00
ryester27
d88b792447
Use d3d9.deferSurfaceCreation for Fairy Tail
2020-08-04 04:29:57 +02:00
Christopher Egert
76e3bb78c9
[util] Disable DF24 support for Borderlands 2
...
and The Pre Sequel!
2020-07-20 18:41:40 +01:00
Gregor Münch
4ac9dcf855
[util] Enable d3d11.invariantPosition for Mafia III: Definitive Edition
2020-07-05 17:37:13 +02:00
Samuel Pitoiset
c4f37d3981
[util] Enable d3d11.invariantPosition for Star Wars Jedi: Fallen Order
...
Seems to resolve https://gitlab.freedesktop.org/mesa/mesa/-/issues/2706#note_538316
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2020-06-18 13:40:24 +02:00
Rhys Perry
cd0a21dda5
[util] Enable d3d11.invariantPosition for Terminator: Resistance
...
Seems to resolve https://gitlab.freedesktop.org/mesa/mesa/-/issues/2608
2020-06-12 17:58:30 +02:00
Rhys Perry
0a486bd975
[util] Enable d3d11.invariantPosition for Borderlands 3
...
Seems to resolve https://gitlab.freedesktop.org/mesa/mesa/-/issues/2608
2020-06-12 17:58:30 +02:00
Philip Rebohle
51bd84368c
[util] Disable relaxed barrier option for RE7
...
Introduces lighting glitches in some places.
2020-06-11 22:06:53 +02:00
Samuel Pitoiset
86c53bb9e6
[util] Set enableRtOutputNaNFixup for Stars End
...
To fix output NaNs that introduce glitches with RADV.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2020-06-09 16:08:16 +02:00
Joshua Ashton
86e8315416
[d3d9] Revert Nekopara hacks
2020-06-05 23:15:10 +01:00
Joshua Ashton
326f6c26cb
[util] Enable forceSamplerTypeSpecConstants for all of the games in the Spellforce 2 seires
2020-06-05 02:36:17 +01:00
Joshua Ashton
b658cae509
[util] Enable uploadAllManagedSubresources for Nekopara titles
2020-06-05 02:35:03 +01:00
Joshua Ashton
f92d60496c
[util] Enable forceSamplerTypeSpecConstants for SpellForce 2: Faith in Destiny
...
The game binds a 2D texture to a 3D (volume) sampler which causes the readback to be 0 0 0 0 on native, whereas we can workaround it and see the intended texture and cool refracty effect that would have rendered on older real hardware 👏
Closes #1645
2020-05-27 17:14:20 +01:00
DadSchoorse
84bb768a32
[util] Enable d3d9.invariantPosition for Halo/Hale CE
...
Fixes #1550
2020-05-17 23:41:42 +02:00
Christian Sturm
97cd91885d
[util] Enable constant buffer range check for Secret World Legends
2020-04-18 21:53:21 +02:00
Philip Rebohle
487ecd861c
[util] Enable constant buffer range check for Blue Reflection
...
Fixes #1574 .
2020-04-18 14:00:04 +02:00
Philip Rebohle
7f03f45301
[util] Support encapsulated strings in configuration files
...
Fixes #1567 .
2020-04-10 21:16:29 +02:00
Joshua Ashton
6b431851da
[util] Enable d3d9.invariantPosition for Battlefield 2
...
Closes #1558 for good
2020-04-09 14:00:26 +01:00
Joshua Ashton
f549586331
[util] Set d3d9.longMad to True for Battlefield 2
2020-04-08 23:23:21 +01:00
Philip Rebohle
00d371d78d
[util] Spoof AMD GPU for GTA IV
2020-04-03 16:39:29 +01:00
Philip Rebohle
5c3d0c6836
[util] Enable d3d11.relaxedBarriers option for Resident Evil 3
2020-04-03 02:58:59 +02:00
Samuel Pitoiset
649c3805d9
[util] fix typo for Yooka-Laylee executable name
2020-03-25 14:29:28 +01:00
Samuel Pitoiset
f6a79c366a
[util] Set enableRtOutputNaNFixup for Super Monkey and Yooka-Laylee
...
Both games output NaNs that introduce glitches with RADV and
AMDVLK.
2020-03-22 15:38:24 +01:00
Philip Rebohle
3104192af7
[d3d11] Fix winelib build
...
Closes #1521 .
2020-03-20 17:01:46 +01:00
Philip Rebohle
76fd9013d4
[util] Add missing include
2020-03-19 23:22:13 +01:00
Florian Will
ba41a5219a
[util] Disable explicit frontbuffer for ZUSI 3
...
Fixes flickering when parts of the screen are not redrawn in a frame.
Closes #1368
Merges #1437
2020-03-18 19:32:45 +00:00
Philip Rebohle
26798eb312
[util] Use SwitchToThread for yield
...
According to MSDN, this doesn't interfere with scheduling of other threads,
unlike Sleep(0).
2020-03-15 03:43:04 +01:00
Philip Rebohle
da506f5932
[util] Add generic recursive spinlock
2020-03-15 03:43:04 +01:00
Philip Rebohle
55e3240479
[util] Add generic spin function
2020-03-15 03:43:04 +01:00
Philip Rebohle
3a1243b05e
[util] Don't set display mode if the desired mode is already set
...
See #1489 .
Co-authored-by: zvova7890 <zvova7890@gmail.com>
2020-03-04 23:06:15 +00:00
Philip Rebohle
4e16d65bb8
[util] Introduce common functions to set, get and restore display modes
2020-03-04 23:06:15 +00:00
Philip Rebohle
66503aeaa0
[util] Factor out common monitor-related functions
2020-03-04 23:06:15 +00:00
Joshua Ashton
74d23c22de
[build] Use __CRT_UUID_DECL for uuid definitions
...
Closes #1463
2020-02-18 20:25:05 +01:00
Joshua Ashton
760a163fc5
[util] Disable discard for D&D Temple of Elemental Evil
...
This game uses D3DLOCK_DISCARD incorrectly
2020-02-18 17:01:41 +00:00
ryester27
dff2a4ea24
[util] Force 16:9 aspect ratio for Hyperdimension Neptunia U: Action Unleashed
2020-02-14 02:50:15 +00:00
Joshua Ashton
0ea510eb9b
[util] Add clearAll helper to bitset
2020-02-14 00:51:58 +00:00
Joshua Ashton
960d2bd158
[util] Add exchange helper to bitset
2020-02-14 00:51:58 +00:00
Philip Rebohle
07fee4a0e5
[util] Disable VR for Subnautica
2020-02-09 09:05:52 +01:00
Philip Rebohle
4738d12d73
[util] Enable forced TGSM barriers for F1 2019
...
Fixes visual issues on RADV.
2020-02-08 00:48:45 +01:00
Philip Rebohle
c780ed5da3
[util] Enable invariant position for Saint's Row III / IV
2020-02-07 17:40:55 +01:00
Philip Rebohle
8020803340
[util] Disable OpenVR for Raft
2020-02-06 20:48:21 +01:00
František Zatloukal
976d3b5ee4
[util] Include ostream in util_rc_ptr.h
2020-01-31 15:17:18 +01:00
Philip Rebohle
3ab675c233
Revert "[util] Disable float emulation for Hat in Time"
...
Turns out this breaks some levels (e.g. Chapter 1 Act 3).
Performance impact seems minimal on RADV+ACO.
This reverts commit 6f93d3bf22
.
2020-01-28 17:46:33 +00:00
Philip Rebohle
be16da37d7
[d3d11] Introduce COM interface to set and get API version
...
Allows us to identify DirectX 10 applications correctly.
2020-01-28 16:32:58 +00:00
Joshua Ashton
6f93d3bf22
[util] Disable float emulation for Hat in Time
...
Squeezes out some extra performance in this title
2020-01-27 14:21:21 +01:00
Philip Rebohle
c77a9e3bfe
[util] Unify Risen 1/2/3 app profiles
2020-01-25 12:10:05 +01:00
Philip Rebohle
fdb2b972e9
[util] Add more exe names to Gothic 3 app profile
...
Fixes #1372 .
2020-01-25 12:10:05 +01:00
Joshua Ashton
2004fba22c
[util] Disable d3d9.allowDoNotWait for RTHDRIBL
...
This app goes into an infinite loop if it gets D3DERR_WASSTILLDRAWING and the perf penalty of blocking on GetRenderTargetData in other apps is too high!
2020-01-24 15:54:15 +00:00
Philip Rebohle
7469f5d4a0
[util] Disable supportDFFormats for Gothic 3
...
See #1367 .
2020-01-24 14:21:28 +01:00
Joshua Ashton
9919ffe5ca
[util] Add simple [] operator to our bitset
2020-01-23 02:05:09 +00:00
Philip Rebohle
21330497e0
[util] Add app profile for Entropia Universe
...
Fixes #1364 (again).
2020-01-23 01:31:57 +01:00
Joshua Ashton
7de15fe837
[util] Spoof AMD for Skyrim (nvapi)
2020-01-22 16:20:42 +00:00
Philip Rebohle
eed57ed6c4
[util] Enable d3d9.deferSurfaceCreation for a ton of weeb games
2020-01-17 18:29:15 +01:00
Philip Rebohle
e4215252df
[util] Add small_vector helper
...
A vector with a small fixed-size array, which changes to a dynamic
array as needed. Can be used to avoid memory allocations in some
scenarios.
2020-01-16 18:50:23 +01:00
Philip Rebohle
8b9c03ce76
[util] Improve Spinlock implementation
...
Addresses two potential issues:
- Our spinlocks are almost never contested, however the code generated
is not ideal without the likely/unlikely hints.
- In the unlike event that a spinlock is in fact contested, we'd yield
immediately, even though most of the time we'd only have to wait for
a few hundred cycles at most.
Replacing our spinlocks with std::mutex is not an option due to much
higher locking overhead in the uncontested case; doing so reduces
performance significantly for the buffer slice and pipeline locks.
2020-01-07 17:28:33 +01:00
Joshua Ashton
0343938c2e
[util] Enable d3d9.forceSamplerTypeSpecConstants for Halo [CE]
...
The game uses incorrect sampler types in the shaders for glass rendering which breaks it on native + us if we don't spec-constantly chose the sampler type automagically.
2020-01-01 20:58:42 +00:00
Philip Rebohle
694d6c7f77
[util] Improve ticket lock implementation
...
Atomic fetch-and-add on unlock is not needed since no other thread can
modify the serving counter after the calling thread acquired the lock.
May slightly improve performance in games relying on ID3D10Multithread.
2020-01-01 13:59:46 +01:00
Joshua Ashton
fae99907da
[util] Add get to bitset
2019-12-18 23:18:01 +00:00
Alessandro Toia
3c8fdc2863
Report gpu vendor as Nvidia for Star Wars Battlefront II
2019-12-18 17:38:24 +01:00
Joshua Ashton
b99b1d153a
[util] Add bitset helper
2019-12-18 14:48:01 +01:00
Joshua Ashton
e527b963c4
[util] Handle undefined ratios in simplest ratio helper
...
Fixes division by zero error
Closes #1280
2019-12-17 03:16:56 +00:00
Philip Rebohle
9be0bf95ca
[util] Defer D3D9 surface creation for Atelier Ryza
2019-12-16 14:41:29 +01:00
Joshie
54ed8f0bb0
[d3d9] Implement Direct3D9 Frontend ( #1275 )
...
Co-authored-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Co-authored-by: Robin Kertels <robin.kertels@gmail.com>
Co-authored-by: pchome <pchome@users.noreply.github.com>
Co-authored-by: Christopher Egert <cme3000@gmail.com>
Co-authored-by: Derek Lesho <dereklesho52@Gmail.com>
Co-authored-by: Luis Cáceres <lacaceres97@gmail.com>
Co-authored-by: Nelson Chen <crazysim@gmail.com>
Co-authored-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Co-authored-by: Riesi <riesi@opentrash.com>
Co-authored-by: gbMichelle <gbmichelle.dev@gmail.com>
2019-12-16 04:28:01 +01:00
Philip Rebohle
4fcf28f4dc
[util] Spoof Nvidia cards for Crysis 3
...
The game for some reason runs significantly slower in CPU-bound scenarios
when it recognizes an AMD GPU. On the other hand, there seems to be a small
performance hit on an actual Nvidia GPU (GTX 670) in GPU-bound scenarios when
doing this, but on most setups the tradeoff should be worth it.
2019-12-11 23:01:27 +01:00
Joshua Ashton
3fa8691033
[util] Implement simplest ratio helper
2019-12-11 03:18:39 +01:00
Joshua Ashton
16dd1249b7
[util] Add alignDown helper
2019-12-11 03:18:39 +01:00
Joshua Ashton
57b2c02528
[util] Implement lzcnt
2019-12-11 03:18:39 +01:00
Joshua Ashton
aef12f7ee3
[util] Add countof helper
2019-12-11 03:18:39 +01:00
Joshua Ashton
d4cad9055c
[util] Implement a clamped version of ComObject, for D3D9
...
Satisfies a quirk in D3D9, solving an issue in SWTFU.
2019-12-11 03:18:39 +01:00
Joshua Ashton
511ed27733
[util] Add GetPrivateRefCount helper
2019-12-11 03:18:39 +01:00
Joshua Ashton
9280818a57
[util] Implement fclamp for fp special cases
2019-12-11 03:18:39 +01:00
Joshua Ashton
ec197b49f9
[util] Implement some basic vector and matrix math utils
2019-12-11 03:18:39 +01:00
Joshua Ashton
d44707e349
[util] Mark clamp & align as constexpr
2019-12-11 03:18:39 +01:00
Joshua Ashton
a3f74b5eda
[util] Implement bit cast.
2019-12-11 03:18:39 +01:00
Philip Rebohle
3230cec3f3
[util] Enable d3d11.enableRtOutputNanFixup for FFXIV
...
And disable strict division. The previous workaround broke radial blur.
2019-11-30 20:39:32 +01:00
Philip Rebohle
32ac8a8d51
[util] Make Fence and Win32Fence final
...
Otherwise, Josh will keep complaining about this until the end of time.
2019-11-27 12:31:17 +01:00
Philip Rebohle
6ebf3e1656
[util] Implement fence capable of signaling win32 events
2019-11-26 16:11:46 +01:00
Philip Rebohle
2d1fb52b2f
[util] Reimplement Signal
...
The new implementation is more akin to D3D12 fences or timeline
semaphores, and should make implementing similar concepts easier.
2019-11-26 16:11:46 +01:00
Philip Rebohle
e648d59a10
[util] Fix winelib build
...
Fixes #1256 .
2019-11-26 16:09:35 +01:00
Joshua Ashton
bf14371f9e
[util] Wide character conversion changes
...
Replaces tows with an easier helper that fits in nicer with fixed-size arrays in DXGI, etc.
Prefer UTF8 in tows/fromws.
2019-11-26 01:53:49 +01:00
Joshua Ashton
38f945bf0b
[util] Add platform-specific clock implementation
...
MinGW calls to GetSystemTimeAsFileTime via gettimeofday for std::chrono::high_resolution_clock::now,
This is horribly slow and inaccurate.
There are also issues if MinGW is not built with libstdc++ at the same time that can cause the precision to be bad enough to cause massive hangs.
This effectively works around that as well.
Relevant: ValveSoftware/Proton#3198
2019-11-26 01:52:58 +01:00
Philip Rebohle
e787077554
[util] Remove traces of the allowMapFlagNoWait option
2019-11-15 19:45:40 +01:00
Philip Rebohle
1ca235d186
[util] Disable strict DC mode for MGSV again
...
Not necessary since the resubmitted contexts don't contain mapped buffers.
2019-11-12 00:59:33 +01:00
Philip Rebohle
4f7e7979e3
[util] Add app profile for Metal Gear Solid 5
2019-11-11 23:31:14 +01:00
Philip Rebohle
1459f0e852
[util] Fix != and == operator for private/public COM pointers
2019-11-02 13:48:00 +01:00
Alexandr
dacf1ab4d6
[util] Enable constant buffer range check for Saints Row games
...
Fixes character flickering on Nvidia.
2019-10-27 11:55:48 +01:00
Philip Rebohle
7f66373a69
[util] Add virtual destructor to NoWrapper
2019-10-25 22:08:00 +02:00