mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against 4e55dfb7c5e26d45794406a4ce8e50a6bc725b74.
This commit is contained in:
parent
fa8d0abc9d
commit
b31a964e1e
@ -1,116 +0,0 @@
|
||||
From 861cd6c6409efce4eb03aad3bc01f5df772e77fb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 6 Feb 2016 01:15:07 +0100
|
||||
Subject: [PATCH] ddraw: Don't set HWTRANSFORMANDLIGHT flag on d3d7 RGB device.
|
||||
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 9 +++++++++
|
||||
dlls/ddraw/tests/ddraw7.c | 18 ++++++++++++++++++
|
||||
2 files changed, 27 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 705d0335d95..1d916f93c4f 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -49,6 +49,7 @@ static struct enum_device_entry
|
||||
char interface_name[100];
|
||||
char device_name[100];
|
||||
const GUID *device_guid;
|
||||
+ DWORD remove_caps;
|
||||
} device_list7[] =
|
||||
{
|
||||
/* T&L HAL device */
|
||||
@@ -56,6 +57,7 @@ static struct enum_device_entry
|
||||
"WINE Direct3D7 Hardware Transform and Lighting acceleration using WineD3D",
|
||||
"Wine D3D7 T&L HAL",
|
||||
&IID_IDirect3DTnLHalDevice,
|
||||
+ 0,
|
||||
},
|
||||
|
||||
/* HAL device */
|
||||
@@ -63,6 +65,7 @@ static struct enum_device_entry
|
||||
"WINE Direct3D7 Hardware acceleration using WineD3D",
|
||||
"Direct3D HAL",
|
||||
&IID_IDirect3DHALDevice,
|
||||
+ 0,
|
||||
},
|
||||
|
||||
/* RGB device */
|
||||
@@ -70,6 +73,7 @@ static struct enum_device_entry
|
||||
"WINE Direct3D7 RGB Software Emulation using WineD3D",
|
||||
"Wine D3D7 RGB",
|
||||
&IID_IDirect3DRGBDevice,
|
||||
+ D3DDEVCAPS_HWTRANSFORMANDLIGHT,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3749,6 +3753,7 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
{
|
||||
struct ddraw *ddraw = impl_from_IDirect3D7(iface);
|
||||
D3DDEVICEDESC7 device_desc7;
|
||||
+ DWORD dev_caps;
|
||||
HRESULT hr;
|
||||
size_t i;
|
||||
|
||||
@@ -3765,11 +3770,15 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
return hr;
|
||||
}
|
||||
|
||||
+ dev_caps = device_desc7.dwDevCaps;
|
||||
+
|
||||
for (i = 0; i < ARRAY_SIZE(device_list7); i++)
|
||||
{
|
||||
HRESULT ret;
|
||||
|
||||
device_desc7.deviceGUID = *device_list7[i].device_guid;
|
||||
+ device_desc7.dwDevCaps = dev_caps & ~device_list7[i].remove_caps;
|
||||
+
|
||||
ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
|
||||
if (ret != DDENUMRET_OK)
|
||||
{
|
||||
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
|
||||
index d641595baa2..54cc18b74f2 100644
|
||||
--- a/dlls/ddraw/tests/ddraw7.c
|
||||
+++ b/dlls/ddraw/tests/ddraw7.c
|
||||
@@ -577,6 +577,19 @@ static IDirect3DDevice7 *create_device_ex(HWND window, DWORD coop_level, const G
|
||||
return device;
|
||||
}
|
||||
|
||||
+static HRESULT WINAPI enum_devtype_software_cb(char *desc_str, char *name, D3DDEVICEDESC7 *desc, void *ctx)
|
||||
+{
|
||||
+ BOOL *software_ok = ctx;
|
||||
+ if (IsEqualGUID(&desc->deviceGUID, &IID_IDirect3DRGBDevice))
|
||||
+ {
|
||||
+ ok(!(desc->dwDevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT),
|
||||
+ "RGB emulation device shouldn't have HWTRANSFORMANDLIGHT flag\n");
|
||||
+ *software_ok = TRUE;
|
||||
+ return DDENUMRET_CANCEL;
|
||||
+ }
|
||||
+ return DDENUMRET_OK;
|
||||
+}
|
||||
+
|
||||
static IDirect3DDevice7 *create_device(HWND window, DWORD coop_level)
|
||||
{
|
||||
const GUID *device_guid = &IID_IDirect3DHALDevice;
|
||||
@@ -6719,6 +6732,7 @@ static void test_surface_lock(void)
|
||||
ULONG refcount;
|
||||
DDPIXELFORMAT z_fmt;
|
||||
BOOL hal_ok = FALSE;
|
||||
+ BOOL software_ok = FALSE;
|
||||
const GUID *devtype = &IID_IDirect3DHALDevice;
|
||||
D3DDEVICEDESC7 device_desc;
|
||||
BOOL cubemap_supported;
|
||||
@@ -6844,6 +6858,10 @@ static void test_surface_lock(void)
|
||||
if (hal_ok)
|
||||
devtype = &IID_IDirect3DTnLHalDevice;
|
||||
|
||||
+ hr = IDirect3D7_EnumDevices(d3d, enum_devtype_software_cb, &software_ok);
|
||||
+ ok(SUCCEEDED(hr), "Failed to enumerate devices, hr %#x.\n", hr);
|
||||
+ if (!software_ok) win_skip("RGB device not found, unable to check flags\n");
|
||||
+
|
||||
memset(&z_fmt, 0, sizeof(z_fmt));
|
||||
hr = IDirect3D7_EnumZBufferFormats(d3d, devtype, enum_z_fmt, &z_fmt);
|
||||
if (FAILED(hr) || !z_fmt.dwSize)
|
||||
--
|
||||
2.20.1
|
||||
|
@ -8,3 +8,4 @@
|
||||
# The Sims Online
|
||||
Fixes: [19153] Resident Evil 1 fails to start (needs IDirect3D3::EnumDevices() to return a device named "RGB Emulation")
|
||||
Depends: ddraw-Device_Caps
|
||||
Disabled: True
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "4608e1e1257a377cd554a0e885368e3feb7d286f"
|
||||
echo "4e55dfb7c5e26d45794406a4ce8e50a6bc725b74"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -104,7 +104,6 @@ patch_enable_all ()
|
||||
enable_ddraw_Device_Caps="$1"
|
||||
enable_ddraw_IDirect3DTexture2_Load="$1"
|
||||
enable_ddraw_Silence_FIXMEs="$1"
|
||||
enable_ddraw_version_check="$1"
|
||||
enable_dinput_joy_mappings="$1"
|
||||
enable_dsound_EAX="$1"
|
||||
enable_dsound_Fast_Mixer="$1"
|
||||
@ -335,9 +334,6 @@ patch_enable ()
|
||||
ddraw-Silence_FIXMEs)
|
||||
enable_ddraw_Silence_FIXMEs="$2"
|
||||
;;
|
||||
ddraw-version-check)
|
||||
enable_ddraw_version_check="$2"
|
||||
;;
|
||||
dinput-joy-mappings)
|
||||
enable_dinput_joy_mappings="$2"
|
||||
;;
|
||||
@ -1330,13 +1326,6 @@ if test "$enable_dsound_EAX" -eq 1; then
|
||||
enable_dsound_Fast_Mixer=1
|
||||
fi
|
||||
|
||||
if test "$enable_ddraw_version_check" -eq 1; then
|
||||
if test "$enable_ddraw_Device_Caps" -gt 1; then
|
||||
abort "Patchset ddraw-Device_Caps disabled, but ddraw-version-check depends on that."
|
||||
fi
|
||||
enable_ddraw_Device_Caps=1
|
||||
fi
|
||||
|
||||
|
||||
# Patchset Compiler_Warnings
|
||||
# |
|
||||
@ -1597,10 +1586,9 @@ fi
|
||||
# | * [#27002] Properly initialize caps->dwZBufferBitDepths in ddraw7_GetCaps
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ddraw/ddraw.c, dlls/ddraw/tests/ddraw7.c
|
||||
# | * dlls/ddraw/ddraw.c
|
||||
# |
|
||||
if test "$enable_ddraw_Device_Caps" -eq 1; then
|
||||
patch_apply ddraw-Device_Caps/0001-ddraw-Don-t-set-HWTRANSFORMANDLIGHT-flag-on-d3d7-RGB.patch
|
||||
patch_apply ddraw-Device_Caps/0002-ddraw-Set-dwZBufferBitDepth-in-ddraw7_GetCaps.patch
|
||||
fi
|
||||
|
||||
@ -1626,21 +1614,6 @@ if test "$enable_ddraw_Silence_FIXMEs" -eq 1; then
|
||||
patch_apply ddraw-Silence_FIXMEs/0001-ddraw-Silence-noisy-FIXME-about-unimplemented-D3DPRO.patch
|
||||
fi
|
||||
|
||||
# Patchset ddraw-version-check
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * ddraw-Device_Caps
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#19153] Resident Evil 1 fails to start (needs IDirect3D3::EnumDevices() to return a device named "RGB Emulation")
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ddraw/ddraw.c
|
||||
# |
|
||||
if test "$enable_ddraw_version_check" -eq 1; then
|
||||
patch_apply ddraw-version-check/0001-ddraw-Return-correct-devices-based-off-requested-Dir.patch
|
||||
fi
|
||||
|
||||
# Patchset dinput-joy-mappings
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1 +1 @@
|
||||
4a3c7e2758ac10b7947e859015f2a755d25fd7fe
|
||||
4e55dfb7c5e26d45794406a4ce8e50a6bc725b74
|
||||
|
Loading…
Reference in New Issue
Block a user