1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

173 Commits

Author SHA1 Message Date
narzoul
60129a1000 Suppress the ForceDirectDrawEmulation compatibility shim 2016-12-27 17:31:48 +01:00
narzoul
347713cdce Create off-screen plain surfaces in system memory
Fixes performance issues with Desperados mentioned in issue #5
(possibly #8 as well).
2016-12-22 20:49:12 +01:00
narzoul
26995d6108 Create palettized surfaces in system memory 2016-12-22 20:49:00 +01:00
narzoul
5b5863b028 Fixed various alt-tabbing issues 2016-12-20 18:52:50 +01:00
narzoul
d898961a7e Restore legacy double/triple buffered v-sync behavior
On recent drivers, double buffered DirectDraw flips no longer wait for the
vertical sync before returning and instead just insert the flip into the
flip queue for later execution. This effectively results in triple buffered
behavior (in the render-ahead sense) and causes up to an extra frame of
latency even if the flip queue size is set to 1.

To restore the legacy double buffered behavior, each flip waits for the
presented frame to leave the flip queue before returning.

To restore the legacy triple buffered behavior, the flip queue size is
forced to 1. This causes the flip to wait if the previous flip is still
pending.
2016-12-04 15:43:05 +01:00
narzoul
89f1556789 Lock render targets via off-screen plain copy
Video memory render target surfaces get an additional video memory off-screen
plain surface used for providing efficient direct memory access (locking).
All 2D operations starting with a lock are redirected to the off-screen plain
surface until the next rendering operation requires the render target surface.
The two surfaces are kept in sync via blits as needed.

Fixes performance issues in Rogue Spear menus, mentioned in issue #2.
2016-11-06 19:52:33 +01:00
narzoul
1d14b606c2 Implemented GetGDISurface and FlipToGDISurface 2016-11-05 11:45:55 +01:00
narzoul
fbe34c0341 Handle mirrored blits via HEL
Disabled the indication of mirrored blit support via the driver GetCaps routine
as this may be reported as supported on modern GPUs even when it's not.
Removing this indication allows the HEL (Hardware Emulation Layer) to correctly
handle all mirrored blits. It also seems to perform better than the previous
clumsy line-by-line mirroring emulation.
2016-11-05 11:45:48 +01:00
narzoul
e8f987eb05 Create repository surfaces on the appropriate device
This change assigns a different DirectDraw repository object for each original
DirectDraw object that requires temporary surfaces, ensuring that video memory
surfaces are created on the appropriate device on a multi-GPU system.
2016-10-31 13:48:05 +01:00
narzoul
7220b80999 Tagged all DirectDraw objects for tracking lifetime 2016-10-31 13:47:59 +01:00
narzoul
aabe85db65 Removed CompatVtable dependency on derived interface 2016-10-23 15:28:27 +02:00
narzoul
30bf0435f8 Fixed GetDDInterface implementation 2016-10-23 15:28:20 +02:00
narzoul
d163787437 Allow PrimarySurface to wrap different surface implementations 2016-10-23 15:28:14 +02:00
narzoul
47f02667bf Moved FullScreenTagSurface implementation to separate layer 2016-10-23 15:28:08 +02:00
narzoul
0dbd210649 Moved CompatPrimarySurface implementation to separate layer 2016-10-23 15:28:02 +02:00
narzoul
19cce6b9d6 Preparation for splitting the DirectDrawSurface wrapper into layers 2016-10-23 15:27:56 +02:00
narzoul
b8832a92be Moved DLL related parts to Dll namespace and subdirectory 2016-10-23 15:27:50 +02:00
narzoul
7fc059a02f Moved config header to Config subdirectory 2016-10-23 15:27:44 +02:00
narzoul
367f581e74 Moved Win32 API hooks to Win32 namespace and subdirectory 2016-10-23 15:27:38 +02:00
narzoul
66bc66f42f Moved visitors to Visitors subdirectories 2016-10-23 15:27:32 +02:00
narzoul
2097d737dc Moved common parts to Common subdirectory 2016-10-23 15:27:26 +02:00
narzoul
1a9b4ce860 Moved Direct3D parts to Direct3d namespace and subdirectory 2016-10-23 15:25:32 +02:00
narzoul
55f840cb50 Moved DirectDraw parts to DDraw namespace and subdirectory 2016-10-23 15:25:27 +02:00