Compare commits

..

7 Commits
v7.15 ... v7.16

Author SHA1 Message Date
Alistair Leslie-Hughes
aa2eb6eed6 Release v7.16 2022-08-29 13:47:16 +10:00
Alistair Leslie-Hughes
4ae0f97bc7 Rebase against a4930f003f45ab82c4c05746cbd29cbd4af09735. 2022-08-29 10:59:27 +10:00
Alistair Leslie-Hughes
b31a964e1e Rebase against 4e55dfb7c5e26d45794406a4ce8e50a6bc725b74. 2022-08-25 15:32:33 +10:00
Alistair Leslie-Hughes
fa8d0abc9d Updated winepulse-aux_channels patchset
Add a reference to proton report which this patch would help.
2022-08-18 20:07:09 +10:00
Alistair Leslie-Hughes
2c5c068424 Rebase against 4a3c7e2758ac10b7947e859015f2a755d25fd7fe. 2022-08-18 08:18:00 +10:00
Alistair Leslie-Hughes
e893644049 Rebase against 4608e1e1257a377cd554a0e885368e3feb7d286f. 2022-08-17 08:24:50 +10:00
Alistair Leslie-Hughes
afbc5756c9 Rebase against b4a5556da983c7ebc8a25b228100c08947024c59. 2022-08-16 10:15:01 +10:00
13 changed files with 43 additions and 563 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -1,144 +0,0 @@
From 042e39ff36dcecd47af4102e8bb890cb9779db5e Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 13 Aug 2022 11:57:20 +1000
Subject: [PATCH 1/2] dsdmo: Add Echo FX Support
---
dlls/dsdmo/dsdmo.idl | 8 ++++
dlls/dsdmo/main.c | 97 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+)
diff --git a/dlls/dsdmo/dsdmo.idl b/dlls/dsdmo/dsdmo.idl
index 7f172084828..c8130f8a1ce 100644
--- a/dlls/dsdmo/dsdmo.idl
+++ b/dlls/dsdmo/dsdmo.idl
@@ -41,3 +41,11 @@ coclass DirectSoundParamEqDMO {}
uuid(87fc0268-9a55-4360-95aa-004a1d9de26c)
]
coclass DirectSoundWavesReverbDMO {}
+
+[
+ uuid(ef3e932c-d40b-4f51-8ccf-3f98f1b29d5d),
+ threading(both),
+ progid("Microsoft.DirectSoundEchoDMO.1"),
+ vi_progid("Microsoft.DirectSoundEchoDMO")
+]
+coclass DirectSoundEchoDMO {}
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
index 3b106a8f633..200293f5214 100644
--- a/dlls/dsdmo/main.c
+++ b/dlls/dsdmo/main.c
@@ -947,6 +947,102 @@ static HRESULT waves_reverb_create(IUnknown *outer, IUnknown **out)
return S_OK;
}
+struct dmo_echofx
+{
+ struct effect effect;
+ IDirectSoundFXEcho IDirectSoundFXEcho_iface;
+};
+
+static inline struct dmo_echofx *impl_from_IDirectSoundFXEcho(IDirectSoundFXEcho *iface)
+{
+ return CONTAINING_RECORD(iface, struct dmo_echofx, IDirectSoundFXEcho_iface);
+}
+
+static HRESULT WINAPI echofx_QueryInterface(IDirectSoundFXEcho *iface, REFIID iid, void **out)
+{
+ struct dmo_echofx *effect = impl_from_IDirectSoundFXEcho(iface);
+ return IUnknown_QueryInterface(effect->effect.outer_unk, iid, out);
+}
+
+static ULONG WINAPI echofx_AddRef(IDirectSoundFXEcho *iface)
+{
+ struct dmo_echofx *effect = impl_from_IDirectSoundFXEcho(iface);
+ return IUnknown_AddRef(effect->effect.outer_unk);
+}
+
+static ULONG WINAPI echofx_Release(IDirectSoundFXEcho *iface)
+{
+ struct dmo_echofx *effect = impl_from_IDirectSoundFXEcho(iface);
+ return IUnknown_Release(effect->effect.outer_unk);
+}
+
+static HRESULT WINAPI echofx_SetAllParameters(IDirectSoundFXEcho *iface, const DSFXEcho *echo)
+{
+ struct dmo_echofx *effect = impl_from_IDirectSoundFXEcho(iface);
+ FIXME("(%p) %p\n", effect, echo);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI echofx_GetAllParameters(IDirectSoundFXEcho *iface, DSFXEcho *echo)
+{
+ struct dmo_echofx *effect = impl_from_IDirectSoundFXEcho(iface);
+ FIXME("(%p) %p\n", effect, echo);
+
+ return E_NOTIMPL;
+}
+
+static const struct IDirectSoundFXEchoVtbl echofx_vtbl =
+{
+ echofx_QueryInterface,
+ echofx_AddRef,
+ echofx_Release,
+ echofx_SetAllParameters,
+ echofx_GetAllParameters
+};
+
+static struct dmo_echofx *impl_echo_from_effect(struct effect *iface)
+{
+ return CONTAINING_RECORD(iface, struct dmo_echofx, effect);
+}
+
+static void *echo_query_interface(struct effect *iface, REFIID iid)
+{
+ struct dmo_echofx *effect = impl_echo_from_effect(iface);
+
+ if (IsEqualGUID(iid, &IID_IDirectSoundFXEcho))
+ return &effect->IDirectSoundFXEcho_iface;
+ return NULL;
+}
+
+static void echo_destroy(struct effect *iface)
+{
+ struct dmo_echofx *effect = impl_echo_from_effect(iface);
+
+ free(effect);
+}
+
+static const struct effect_ops echo_ops =
+{
+ .destroy = echo_destroy,
+ .query_interface = echo_query_interface,
+};
+
+static HRESULT echo_create(IUnknown *outer, IUnknown **out)
+{
+ struct dmo_echofx *object;
+
+ if (!(object = calloc(1, sizeof(*object))))
+ return E_OUTOFMEMORY;
+
+ effect_init(&object->effect, outer, &echo_ops);
+ object->IDirectSoundFXEcho_iface.lpVtbl = &echofx_vtbl;
+
+ TRACE("Created echo effect %p.\n", object);
+ *out = &object->effect.IUnknown_inner;
+ return S_OK;
+}
+
struct class_factory
{
IClassFactory IClassFactory_iface;
@@ -1031,6 +1127,7 @@ class_factories[] =
{&GUID_DSFX_STANDARD_I3DL2REVERB, {{&class_factory_vtbl}, reverb_create}},
{&GUID_DSFX_STANDARD_PARAMEQ, {{&class_factory_vtbl}, eq_create}},
{&GUID_DSFX_WAVES_REVERB, {{&class_factory_vtbl}, waves_reverb_create}},
+ {&GUID_DSFX_STANDARD_ECHO, {{&class_factory_vtbl}, echo_create}},
};
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
--
2.35.1

View File

@@ -1,145 +0,0 @@
From 7a9faf6c5f18a24f4fcbda2fc3066a4b7dd9a892 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 13 Aug 2022 15:03:46 +1000
Subject: [PATCH 2/2] dsdmo: Add Compressor FX Support
---
dlls/dsdmo/dsdmo.idl | 8 ++++
dlls/dsdmo/main.c | 97 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+)
diff --git a/dlls/dsdmo/dsdmo.idl b/dlls/dsdmo/dsdmo.idl
index c8130f8a1ce..ee3154f64d1 100644
--- a/dlls/dsdmo/dsdmo.idl
+++ b/dlls/dsdmo/dsdmo.idl
@@ -49,3 +49,11 @@ coclass DirectSoundWavesReverbDMO {}
vi_progid("Microsoft.DirectSoundEchoDMO")
]
coclass DirectSoundEchoDMO {}
+
+[
+ uuid(ef011f79-4000-406d-87af-bffb3fc39d57),
+ threading(both),
+ progid("Microsoft.DirectSoundCompressorDMO.1"),
+ vi_progid("Microsoft.DirectSoundCompressorDMO")
+]
+coclass DirectSoundCompressorDMO {}
\ No newline at end of file
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
index 200293f5214..bb19b7b7e2e 100644
--- a/dlls/dsdmo/main.c
+++ b/dlls/dsdmo/main.c
@@ -1043,6 +1043,102 @@ static HRESULT echo_create(IUnknown *outer, IUnknown **out)
return S_OK;
}
+struct dmo_compressorfx
+{
+ struct effect effect;
+ IDirectSoundFXCompressor IDirectSoundFXCompressor_iface;
+};
+
+static inline struct dmo_compressorfx *impl_from_IDirectSoundFXCompressor(IDirectSoundFXCompressor *iface)
+{
+ return CONTAINING_RECORD(iface, struct dmo_compressorfx, IDirectSoundFXCompressor_iface);
+}
+
+static HRESULT WINAPI compressorfx_QueryInterface(IDirectSoundFXCompressor *iface, REFIID iid, void **out)
+{
+ struct dmo_compressorfx *effect = impl_from_IDirectSoundFXCompressor(iface);
+ return IUnknown_QueryInterface(effect->effect.outer_unk, iid, out);
+}
+
+static ULONG WINAPI compressorfx_AddRef(IDirectSoundFXCompressor *iface)
+{
+ struct dmo_compressorfx *effect = impl_from_IDirectSoundFXCompressor(iface);
+ return IUnknown_AddRef(effect->effect.outer_unk);
+}
+
+static ULONG WINAPI compressorfx_Release(IDirectSoundFXCompressor *iface)
+{
+ struct dmo_compressorfx *effect = impl_from_IDirectSoundFXCompressor(iface);
+ return IUnknown_Release(effect->effect.outer_unk);
+}
+
+static HRESULT WINAPI compressorfx_SetAllParameters(IDirectSoundFXCompressor *iface, const DSFXCompressor *compressor)
+{
+ struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface);
+ FIXME("(%p) %p\n", This, compressor);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI compressorfx_GetAllParameters(IDirectSoundFXCompressor *iface, DSFXCompressor *compressor)
+{
+ struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface);
+ FIXME("(%p) %p\n", This, compressor);
+
+ return E_NOTIMPL;
+}
+
+static const struct IDirectSoundFXCompressorVtbl compressor_vtbl =
+{
+ compressorfx_QueryInterface,
+ compressorfx_AddRef,
+ compressorfx_Release,
+ compressorfx_SetAllParameters,
+ compressorfx_GetAllParameters
+};
+
+static struct dmo_compressorfx *impl_compressor_from_effect(struct effect *iface)
+{
+ return CONTAINING_RECORD(iface, struct dmo_compressorfx, effect);
+}
+
+static void *compressor_query_interface(struct effect *iface, REFIID iid)
+{
+ struct dmo_compressorfx *effect = impl_compressor_from_effect(iface);
+
+ if (IsEqualGUID(iid, &IID_IDirectSoundFXCompressor))
+ return &effect->IDirectSoundFXCompressor_iface;
+ return NULL;
+}
+
+static void compressor_destroy(struct effect *iface)
+{
+ struct dmo_compressorfx *effect = impl_compressor_from_effect(iface);
+
+ free(effect);
+}
+
+static const struct effect_ops compressor_ops =
+{
+ .destroy = compressor_destroy,
+ .query_interface = compressor_query_interface,
+};
+
+static HRESULT compressor_create(IUnknown *outer, IUnknown **out)
+{
+ struct dmo_compressorfx *object;
+
+ if (!(object = calloc(1, sizeof(*object))))
+ return E_OUTOFMEMORY;
+
+ effect_init(&object->effect, outer, &compressor_ops);
+ object->IDirectSoundFXCompressor_iface.lpVtbl = &compressor_vtbl;
+
+ TRACE("Created compressor effect %p.\n", object);
+ *out = &object->effect.IUnknown_inner;
+ return S_OK;
+}
+
struct class_factory
{
IClassFactory IClassFactory_iface;
@@ -1128,6 +1224,7 @@ class_factories[] =
{&GUID_DSFX_STANDARD_PARAMEQ, {{&class_factory_vtbl}, eq_create}},
{&GUID_DSFX_WAVES_REVERB, {{&class_factory_vtbl}, waves_reverb_create}},
{&GUID_DSFX_STANDARD_ECHO, {{&class_factory_vtbl}, echo_create}},
+ {&GUID_DSFX_STANDARD_COMPRESSOR, {{&class_factory_vtbl}, compressor_create}},
};
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **out)
--
2.35.1

View File

@@ -1 +0,0 @@
Fixes: [52396] dsdmo: Add More FX interfaces.

View File

@@ -51,13 +51,13 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "a1af412482d36c4046061faa676ff7bc774f40eb"
echo "a4930f003f45ab82c4c05746cbd29cbd4af09735"
}
# Show version information
version()
{
echo "Wine Staging 7.15"
echo "Wine Staging 7.16"
echo "Copyright (C) 2014-2019 the Wine Staging project authors."
echo "Copyright (C) 2018-2020 Alistair Leslie-Hughes"
echo ""
@@ -104,9 +104,7 @@ 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_dsdmo_fx_support="$1"
enable_dsound_EAX="$1"
enable_dsound_Fast_Mixer="$1"
enable_eventfd_synchronization="$1"
@@ -229,7 +227,6 @@ patch_enable_all ()
enable_wined3d_SWVP_shaders="$1"
enable_wined3d_Silence_FIXMEs="$1"
enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM="$1"
enable_wined3d_adapter_create_output="$1"
enable_wined3d_bindless_texture="$1"
enable_wined3d_mesa_texture_download="$1"
enable_wined3d_rotate_WINED3D_SWAP_EFFECT_DISCARD="$1"
@@ -337,15 +334,9 @@ 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"
;;
dsdmo-fx-support)
enable_dsdmo_fx_support="$2"
;;
dsound-EAX)
enable_dsound_EAX="$2"
;;
@@ -712,9 +703,6 @@ patch_enable ()
wined3d-WINED3DFMT_B8G8R8X8_UNORM)
enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM="$2"
;;
wined3d-adapter_create_output)
enable_wined3d_adapter_create_output="$2"
;;
wined3d-bindless-texture)
enable_wined3d_bindless_texture="$2"
;;
@@ -1338,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
# |
@@ -1605,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
@@ -1634,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:
@@ -1666,19 +1631,6 @@ if test "$enable_dinput_joy_mappings" -eq 1; then
patch_apply dinput-joy-mappings/0004-dinput-Allow-mapping-of-controls-based-of-Genre-type.patch
fi
# Patchset dsdmo-fx-support
# |
# | This patchset fixes the following Wine bugs:
# | * [#52396] dsdmo: Add More FX interfaces.
# |
# | Modified files:
# | * dlls/dsdmo/dsdmo.idl, dlls/dsdmo/main.c
# |
if test "$enable_dsdmo_fx_support" -eq 1; then
patch_apply dsdmo-fx-support/0001-dsdmo-Add-Echo-FX-Support.patch
patch_apply dsdmo-fx-support/0002-dsdmo-Add-Compressor-FX-Support.patch
fi
# Patchset dsound-Fast_Mixer
# |
# | This patchset fixes the following Wine bugs:
@@ -3499,18 +3451,6 @@ if test "$enable_wined3d_WINED3DFMT_B8G8R8X8_UNORM" -eq 1; then
patch_apply wined3d-WINED3DFMT_B8G8R8X8_UNORM/0001-wined3d-Implement-WINED3DFMT_B8G8R8X8_UNORM-to-WINED.patch
fi
# Patchset wined3d-adapter_create_output
# |
# | This patchset fixes the following Wine bugs:
# | * [#53497] wined3d: Use wined3d_array_reserve() in wined3d_adapter_create_output()
# |
# | Modified files:
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_adapter_create_output" -eq 1; then
patch_apply wined3d-adapter_create_output/0001-wined3d-Use-wined3d_array_reserve-in-wined3d_adapter.patch
fi
# Patchset wined3d-bindless-texture
# |
# | This patchset fixes the following Wine bugs:

View File

@@ -1,43 +1,33 @@
From 72e9a5081e40600b857d357c8111e344e68aa22f Mon Sep 17 00:00:00 2001
From 9229c4fe3078946d7f5fd976b4e2c9f0a5a8ccb1 Mon Sep 17 00:00:00 2001
From: Derek Lesho <dlesho@codeweavers.com>
Date: Fri, 10 Jan 2020 15:34:45 -0600
Subject: [PATCH] user32: Implement QueryDisplayConfig
---
dlls/user32/sysparams.c | 89 ++++++++++++++++++++++++++++++++++-------
1 file changed, 74 insertions(+), 15 deletions(-)
dlls/user32/sysparams.c | 95 +++++++++++++++++++++++++++++++++--------
1 file changed, 77 insertions(+), 18 deletions(-)
diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
index a29d17d72ce..84aed3dedb4 100644
index 7ebe8099419..6d673c68e8c 100644
--- a/dlls/user32/sysparams.c
+++ b/dlls/user32/sysparams.c
@@ -4757,26 +4757,85 @@ LONG WINAPI QueryDisplayConfig(UINT32 flags, UINT32 *numpathelements, DISPLAYCON
@@ -1184,26 +1184,85 @@ LONG WINAPI QueryDisplayConfig(UINT32 flags, UINT32 *numpathelements, DISPLAYCON
LUID gpu_luid;
WCHAR device_name[CCHDEVICENAME];
DEVMODEW devmode;
+ POINT origin;
+ HMONITOR monitor;
+ MONITORINFOEXW monitor_info;
+ DISPLAYCONFIG_SOURCE_MODE *source_mode = &modeinfo[0].DUMMYUNIONNAME.sourceMode;
+ DISPLAYCONFIG_TARGET_MODE *target_mode = &modeinfo[1].DUMMYUNIONNAME.targetMode;
+ DISPLAYCONFIG_SOURCE_MODE *source_mode = &modeinfo[0].sourceMode;
+ DISPLAYCONFIG_TARGET_MODE *target_mode = &modeinfo[1].targetMode;
+ DISPLAYCONFIG_PATH_SOURCE_INFO *source_info = &pathinfo[0].sourceInfo;
+ DISPLAYCONFIG_PATH_TARGET_INFO *target_info = &pathinfo[0].targetInfo;
- FIXME("(%08x %p %p %p %p %p): semi-stub\n", flags, numpathelements, pathinfo, numinfoelements, modeinfo, topologyid);
+
+ TRACE("(%08x %p %p %p %p %p)\n", flags, numpathelements, pathinfo, numinfoelements, modeinfo, topologyid);
- if (!numpathelements || !numinfoelements)
- return ERROR_INVALID_PARAMETER;
+
+ if (*numpathelements < 1 || *numinfoelements < 2)
+ return ERROR_INSUFFICIENT_BUFFER;
- if (!*numpathelements || !*numinfoelements)
- return ERROR_INVALID_PARAMETER;
-
- if (flags != QDC_ALL_PATHS &&
- flags != QDC_ONLY_ACTIVE_PATHS &&
- flags != QDC_DATABASE_CURRENT)
- return ERROR_INVALID_PARAMETER;
+
+ origin.x = 0;
+ origin.y = 0;
+ monitor = MonitorFromPoint(origin, MONITOR_DEFAULTTOPRIMARY);
@@ -51,6 +41,19 @@ index a29d17d72ce..84aed3dedb4 100644
+ return ERROR_GEN_FAILURE;
+ }
- FIXME("(%08x %p %p %p %p %p): semi-stub\n", flags, numpathelements, pathinfo, numinfoelements, modeinfo, topologyid);
-
- if (!numpathelements || !numinfoelements)
- return ERROR_INVALID_PARAMETER;
-
- if (!*numpathelements || !*numinfoelements)
- return ERROR_INVALID_PARAMETER;
-
- if (flags != QDC_ALL_PATHS &&
- flags != QDC_ONLY_ACTIVE_PATHS &&
- flags != QDC_DATABASE_CURRENT)
- return ERROR_INVALID_PARAMETER;
-
- if (((flags == QDC_DATABASE_CURRENT) && !topologyid) ||
- ((flags != QDC_DATABASE_CURRENT) && topologyid))
- return ERROR_INVALID_PARAMETER;
@@ -72,7 +75,7 @@ index a29d17d72ce..84aed3dedb4 100644
+ target_mode->targetVideoSignalInfo.activeSize.cy = devmode.dmPelsHeight;
+ target_mode->targetVideoSignalInfo.totalSize.cx = devmode.dmPelsWidth;
+ target_mode->targetVideoSignalInfo.totalSize.cy = devmode.dmPelsHeight;
+ target_mode->targetVideoSignalInfo.DUMMYUNIONNAME.videoStandard = D3DKMDT_VSS_NTSC_M;
+ target_mode->targetVideoSignalInfo.videoStandard = D3DKMDT_VSS_NTSC_M;
+ target_mode->targetVideoSignalInfo.scanLineOrdering = DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED;
+
+ modeinfo[0].infoType = DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE;
@@ -84,13 +87,13 @@ index a29d17d72ce..84aed3dedb4 100644
+
+ source_info->adapterId = gpu_luid;
+ source_info->id = 0;
+ source_info->DUMMYUNIONNAME.modeInfoIdx = 0;
+ source_info->modeInfoIdx = 0;
+ source_info->statusFlags = DISPLAYCONFIG_SOURCE_IN_USE;
+
+ target_info->adapterId = gpu_luid;
+ target_info->id = 0;
+
+ target_info->DUMMYUNIONNAME.modeInfoIdx = 1;
+ target_info->modeInfoIdx = 1;
+ target_info->outputTechnology = DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI;
+ target_info->rotation = DISPLAYCONFIG_ROTATION_IDENTITY;
+ target_info->scaling = DISPLAYCONFIG_SCALING_IDENTITY;
@@ -113,5 +116,5 @@ index a29d17d72ce..84aed3dedb4 100644
if (topologyid)
{
--
2.27.0
2.35.1

View File

@@ -1,4 +1,4 @@
From bdef98a34241f02651374715cc03f90faef96bc0 Mon Sep 17 00:00:00 2001
From 757ca470261e45e8c3133ee0bb64e76198f6c02f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= <gabrielopcode@gmail.com>
Date: Mon, 22 Jul 2019 15:29:25 +0300
Subject: [PATCH] user32/focus: Prevent a recursive loop with the activation
@@ -34,7 +34,7 @@ index 63388e2250e..6ddac9cc7d3 100644
if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE)
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index a478a549fb2..ac0b51dfd73 100644
index a2d1af57f78..8b1cae060e2 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -1569,7 +1569,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
@@ -53,7 +53,7 @@ index a478a549fb2..ac0b51dfd73 100644
- /* call CBT hook chain */
- cbt.fMouse = mouse;
- cbt.hWndActive = previous;
- if (call_hooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt, TRUE )) return FALSE;
- if (call_hooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt, sizeof(cbt) )) return FALSE;
-
- if (is_window( previous ))
+ /* Prevent a recursive activation loop with the activation messages */
@@ -68,7 +68,7 @@ index a478a549fb2..ac0b51dfd73 100644
+ /* call CBT hook chain */
+ cbt.fMouse = mouse;
+ cbt.hWndActive = previous;
+ if (call_hooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt, TRUE ))
+ if (call_hooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt, sizeof(cbt) ))
+ goto clear_flags;
+
+ if (is_window(previous))
@@ -83,7 +83,7 @@ index a478a549fb2..ac0b51dfd73 100644
@@ -1607,7 +1615,11 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
if (send_message( hwnd, WM_QUERYNEWPALETTE, 0, 0 ))
send_message_timeout( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hwnd, 0,
SMTO_ABORTIFHUNG, 2000, NULL, FALSE );
SMTO_ABORTIFHUNG, 2000, FALSE );
- if (!is_window(hwnd)) return FALSE;
+ if (!is_window(hwnd))
+ {
@@ -120,10 +120,10 @@ index a478a549fb2..ac0b51dfd73 100644
/**********************************************************************
diff --git a/dlls/win32u/ntuser_private.h b/dlls/win32u/ntuser_private.h
index 3ecd7424f77..cc27526235d 100644
index 9f93feea407..db5ef584fd8 100644
--- a/dlls/win32u/ntuser_private.h
+++ b/dlls/win32u/ntuser_private.h
@@ -105,6 +105,7 @@ typedef struct tagWND
@@ -104,6 +104,7 @@ typedef struct tagWND
#define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0020 /* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */
#define WIN_CHILDREN_MOVED 0x0040 /* children may have moved, ignore stored positions */
#define WIN_HAS_IME_WIN 0x0080 /* the window has been registered with imm32 */

View File

@@ -1,58 +0,0 @@
From 58468f4759224dd9b71370a185c09ba9ee907d18 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 8 Aug 2022 17:27:47 +0000
Subject: [PATCH] wined3d: Use wined3d_array_reserve() in
wined3d_adapter_create_output().
This also has the effect of consistently zero-initializing the wined3d_output structure.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53497
---
dlls/wined3d/directx.c | 14 ++------------
dlls/wined3d/wined3d_private.h | 2 +-
2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 20be9817158..1b6c44d95a5 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -3410,21 +3410,11 @@ static struct wined3d_adapter *wined3d_adapter_no3d_create(unsigned int ordinal,
static BOOL wined3d_adapter_create_output(struct wined3d_adapter *adapter, const WCHAR *output_name)
{
- struct wined3d_output *outputs;
HRESULT hr;
- if (!adapter->outputs && !(adapter->outputs = heap_calloc(1, sizeof(*adapter->outputs))))
- {
+ if (!wined3d_array_reserve((void **)&adapter->outputs, &adapter->outputs_size,
+ adapter->output_count + 1, sizeof(*adapter->outputs)))
return FALSE;
- }
- else
- {
- if (!(outputs = heap_realloc(adapter->outputs,
- sizeof(*adapter->outputs) * (adapter->output_count + 1))))
- return FALSE;
-
- adapter->outputs = outputs;
- }
if (FAILED(hr = wined3d_output_init(&adapter->outputs[adapter->output_count],
adapter->output_count, adapter, output_name)))
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index c529cd8efa6..3256d0aa9a6 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -3537,7 +3537,7 @@ struct wined3d_adapter
struct wined3d_d3d_info d3d_info;
struct wined3d_driver_info driver_info;
struct wined3d_output *outputs;
- unsigned int output_count;
+ SIZE_T output_count, outputs_size;
D3DKMT_HANDLE kmt_adapter;
UINT64 vram_bytes_used;
GUID driver_uuid;
--
2.35.1

View File

@@ -1,3 +0,0 @@
Fixes: [53497] wined3d: Use wined3d_array_reserve() in wined3d_adapter_create_output()
# Fixes a regression for some applications failing to start
# Bug 52396 is an example.

View File

@@ -1 +1,4 @@
Fixes: [52572] Support PulseAudio channels aux0 and aux1.
# Appears in a report here.
# Reference: https://github.com/ValveSoftware/Proton/issues/6100

View File

@@ -1,2 +1,2 @@
Wine Staging 7.15
Wine Staging 7.16

View File

@@ -1 +1 @@
8e27f6c2ef327d6d643e29a271245e76aa6f4792
a4930f003f45ab82c4c05746cbd29cbd4af09735