[DDRAW] Handle DDLOCK_WRITEONLY in wined3dmapflags_from_ddrawmapflags() CORE-18378 (#4713)

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.

Fix it by importing Wine-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>
This commit is contained in:
Joachim Henze 2022-09-18 20:53:30 +02:00 committed by GitHub
parent d84b76a69e
commit 305aae75f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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);