[0.4.10][DDRAW] Handle DDLOCK_WRITEONLY in wined3dmapflags_from_ddrawmapflags() CORE...
authorJoachim Henze <Joachim.Henze@reactos.org>
Wed, 26 Oct 2022 22:05:21 +0000 (00:05 +0200)
committerJoachim Henze <Joachim.Henze@reactos.org>
Wed, 26 Oct 2022 22:05:21 +0000 (00:05 +0200)
Mutes the logging:
fixme:(dll/directx/wine/ddraw/utils.c:584) Unhandled flags 0x20.
gets logged many times per second.

It does affect several applications, e.g. the game 'Anno 1602' from 1998, and the 'Diablo 2 demo' from rapps,
For both games it can be observed with both: our VBEMP driver and the VBox4.3.12 3D-accelerated-driver.

Muting may improve performance a bit in such apps.
It gets logged although no missing features can be perceived visually in the rendering.

The regression was introduced to master by 0.4.9-dev-155-g 9987f02917539e05268ba2ad11e62d24a3636972

Fix it by importing Wine-commit
https://source.winehq.org/git/wine.git/commit/b943c7910b3261c9603343369cd632f7a3b56bba
 ddraw: Handle DDLOCK_WRITEONLY in wined3dmapflags_from_ddrawmapflags().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
fix picked from 0.4.15-dev-5070-g 305aae75f59a9e0e43b9213d86dbafe9e750c525

dll/directx/wine/ddraw/utils.c

index 65f24dc..b0a028d 100644 (file)
@@ -570,7 +570,7 @@ unsigned int wined3dmapflags_from_ddrawmapflags(unsigned int flags)
     unsigned int wined3d_flags;
 
     wined3d_flags = flags & handled;
-    if (!(flags & (DDLOCK_NOOVERWRITE | DDLOCK_DISCARDCONTENTS)))
+    if (!(flags & (DDLOCK_NOOVERWRITE | DDLOCK_DISCARDCONTENTS | DDLOCK_WRITEONLY)))
         wined3d_flags |= WINED3D_MAP_READ;
     if (!(flags & DDLOCK_READONLY))
         wined3d_flags |= WINED3D_MAP_WRITE;
@@ -578,7 +578,7 @@ unsigned int wined3dmapflags_from_ddrawmapflags(unsigned int flags)
         wined3d_flags |= WINED3D_MAP_READ | WINED3D_MAP_WRITE;
     if (flags & DDLOCK_NODIRTYUPDATE)
         wined3d_flags |= WINED3D_MAP_NO_DIRTY_UPDATE;
-    flags &= ~(handled | DDLOCK_WAIT | DDLOCK_READONLY | DDLOCK_NODIRTYUPDATE);
+    flags &= ~(handled | DDLOCK_WAIT | DDLOCK_READONLY | DDLOCK_WRITEONLY | DDLOCK_NODIRTYUPDATE);
 
     if (flags)
         FIXME("Unhandled flags %#x.\n", flags);