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
Philip Rebohle
9444162ca6
[util] Enable constant buffer range check for Titan Quest
...
Reportedly flickers on Nvidia GPUs otherwise.
2019-10-20 13:27:12 +02:00
Philip Rebohle
0ac89ccd9e
[util] Add missing != operator to Sha1Hash
2019-10-18 00:33:40 +02:00
Philip Rebohle
c5c43fb2a4
[d3d11] Allow choosing type wrapper for D3D11DeviceChild base class
...
Allows subclasses to replace ComObject with something else.
2019-10-14 01:44:27 +02:00
Philip Rebohle
dd9a55ecc0
[util] Don't allow multiple inheritance for COM objects
...
This never made any sense whatsoever in the first place.
2019-10-14 01:42:24 +02:00
Philip Rebohle
a743ba6531
[dxvk] Use memcmp replacement for pipeline state lookup
...
Measured to be over twice as fast as memcmp on Ryzen for the
512-byte graphics pipeline state struct, achieving two cycles
per iteration.
2019-10-07 22:01:48 +02:00
Joshua Ashton
e8ee7a0790
[util] Fix Sha1 dword extraction
...
Previously we were getting incorrect values here.
The u suffix is no longer necessary, which was originally there to work around a MSVC compiler warning which now doesn't happen under the new code 🤷 ♀
2019-10-06 00:28:19 +02:00
Philip Rebohle
02b79fb738
[util] Report Nvidia GPUs for Modern Warfare Remastered
2019-10-04 18:35:36 +02:00
Philip Rebohle
85581bdace
[util] Move GetAdapterLUID out of DXGI internals
2019-10-02 08:42:22 +02:00
Philip Rebohle
2e6da26ff0
[dxvk] Spoof Nvidia GPU for HITMAN 2
...
This game requires a functioning AGS implementation when it detects
an AMD GPU and complains about missing D3D11 support otherwise.
2019-09-26 19:27:19 +02:00
Entryhazard
252d71e55e
Retrieve the function pointer once ( #1198 )
2019-09-22 10:11:17 +02:00
Philip Rebohle
71e74f1810
[d3d11] Disable DO_NOT_WAIT for Overwatch
...
Because of course this game breaks for some people with it enabled.
2019-09-21 01:44:38 +02:00
marcin mikołajczak
9941769237
[util] Update comment for FIFA 19+ workaround ( #1197 )
2019-09-20 16:20:26 +02:00
Joshua Ashton
014870b1ff
[util] Add helpers for GDI/DDI interop
2019-09-20 01:44:18 +02:00
Philip Rebohle
c9a0f06ff4
[d3d11] Enable allowMapFlagNoWait by default
...
We still keep the option around so that in case of regressions,
users can check if disabling this option fixes their issue.
2019-09-20 01:44:02 +02:00
Philip Rebohle
51c6eb5cdb
[util] Enable FIFA 19 workaround for FIFA 20 as well
...
Same procedure as every year.
2019-09-20 00:50:01 +02:00
Philip Rebohle
9af8387e4e
[dxgi] Define IDXGIVkInteropAdapter interface
...
Can be used to pull the Vulkan instance and physical device from
a DXGI adapter.
2019-09-18 14:53:44 +02:00
Philip Rebohle
9e02b6b433
[dxgi] Rename IDXGIVkAdapter -> IDXGIDXVKAdapter
...
This interface exposes DXVK internals and cannot be used for
Vulkan interop. We shouldn't pretend like it could.
2019-09-18 14:07:13 +02:00
Philip Rebohle
65428da3fe
[util] Enable allowMapFlagNoWait for Warhammer II
2019-09-18 13:14:53 +02:00