diff --git a/patches/ddraw-Device_Caps/0002-ddraw-Set-dwZBufferBitDepth-in-ddraw7_GetCaps.patch b/patches/ddraw-Device_Caps/0002-ddraw-Set-dwZBufferBitDepth-in-ddraw7_GetCaps.patch index 520c139f..98b2068a 100644 --- a/patches/ddraw-Device_Caps/0002-ddraw-Set-dwZBufferBitDepth-in-ddraw7_GetCaps.patch +++ b/patches/ddraw-Device_Caps/0002-ddraw-Set-dwZBufferBitDepth-in-ddraw7_GetCaps.patch @@ -1,17 +1,17 @@ -From 64f08bf065be9b766dce1c52a0be260dc1e26679 Mon Sep 17 00:00:00 2001 +From 826f68ed53563b81d225b49131bbd3595c6d885b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 6 Sep 2015 20:21:42 +0200 -Subject: ddraw: Set dwZBufferBitDepth in ddraw7_GetCaps. +Subject: [PATCH] ddraw: Set dwZBufferBitDepth in ddraw7_GetCaps. --- dlls/ddraw/ddraw.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c -index c94bfee..77a1bea 100644 +index 8d608656143..cc8adccf049 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c -@@ -1420,6 +1420,28 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps) +@@ -1434,6 +1434,28 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps) return DD_OK; } @@ -40,15 +40,15 @@ index c94bfee..77a1bea 100644 /***************************************************************************** * IDirectDraw7::GetCaps * -@@ -1500,6 +1522,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD +@@ -1514,6 +1536,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD caps.dwCaps |= DDCAPS_ALIGNSTRIDE; caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT; + IDirect3D7_EnumZBufferFormats(&ddraw->IDirect3D7_iface, &IID_IDirect3DHALDevice, enum_zbuffer, &caps); + + caps.ddsOldCaps.dwCaps = caps.ddsCaps.dwCaps; + if(DriverCaps) - { - DD_STRUCT_COPY_BYSIZE(DriverCaps, &caps); -- -2.5.1 +2.20.1 diff --git a/patches/ddraw-Device_Caps/0003-ddraw-Set-ddsOldCaps-correctly-in-ddraw7_GetCaps.patch b/patches/ddraw-Device_Caps/0003-ddraw-Set-ddsOldCaps-correctly-in-ddraw7_GetCaps.patch deleted file mode 100644 index 647ab396..00000000 --- a/patches/ddraw-Device_Caps/0003-ddraw-Set-ddsOldCaps-correctly-in-ddraw7_GetCaps.patch +++ /dev/null @@ -1,205 +0,0 @@ -From 1b741a4b555ad98a769fdb9fa659134b83293a4e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Fri, 4 Mar 2016 22:22:42 +0100 -Subject: [PATCH] ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps. - ---- - dlls/ddraw/ddraw.c | 2 ++ - dlls/ddraw/tests/ddraw1.c | 26 ++++++++++++++++++++++++++ - dlls/ddraw/tests/ddraw2.c | 26 ++++++++++++++++++++++++++ - dlls/ddraw/tests/ddraw4.c | 26 ++++++++++++++++++++++++++ - dlls/ddraw/tests/ddraw7.c | 26 ++++++++++++++++++++++++++ - 5 files changed, 106 insertions(+) - -diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c -index fad185e..ebf91b3 100644 ---- a/dlls/ddraw/ddraw.c -+++ b/dlls/ddraw/ddraw.c -@@ -1543,6 +1543,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD - caps.dwCaps |= DDCAPS_ALIGNSTRIDE; - caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT; - -+ caps.ddsOldCaps.dwCaps = caps.ddsCaps.dwCaps; -+ - IDirect3D7_EnumZBufferFormats(&ddraw->IDirect3D7_iface, &IID_IDirect3DHALDevice, enum_zbuffer, &caps); - - if(DriverCaps) -diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c -index 59d07b7..5d81abb 100644 ---- a/dlls/ddraw/tests/ddraw1.c -+++ b/dlls/ddraw/tests/ddraw1.c -@@ -11581,6 +11581,31 @@ static void test_execute_data(void) - DestroyWindow(window); - } - -+static void test_caps(void) -+{ -+ IDirectDraw *ddraw; -+ DDCAPS caps, caps2; -+ HRESULT hr; -+ -+ ddraw = create_ddraw(); -+ ok(!!ddraw, "Failed to create a ddraw object.\n"); -+ -+ caps.dwSize = sizeof(caps); -+ caps2.dwSize = sizeof(caps2); -+ hr = IDirectDraw_GetCaps(ddraw, &caps, &caps2); -+ ok(SUCCEEDED(hr), "Failed to query for caps, hr %#x.\n", hr); -+ -+ ok(caps.ddsOldCaps.dwCaps == caps.ddsCaps.dwCaps, -+ "Expected hal ddsOldCaps and ddsCaps to be identical (%x vs %x).\n", -+ caps.ddsOldCaps.dwCaps, caps.ddsCaps.dwCaps); -+ -+ ok(caps2.ddsOldCaps.dwCaps == caps2.ddsCaps.dwCaps, -+ "Expected hel ddsOldCaps and ddsCaps to be identical (%x vs %x).\n", -+ caps2.ddsOldCaps.dwCaps, caps2.ddsCaps.dwCaps); -+ -+ IDirectDraw_Release(ddraw); -+} -+ - static void test_viewport(void) - { - static struct -@@ -12068,6 +12093,7 @@ START_TEST(ddraw1) - test_depth_readback(); - test_clear(); - test_enum_surfaces(); -+ test_caps(); - test_execute_data(); - test_viewport(); - test_find_device(); -diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c -index 8b9b249..b9b964d 100644 ---- a/dlls/ddraw/tests/ddraw2.c -+++ b/dlls/ddraw/tests/ddraw2.c -@@ -12862,6 +12862,31 @@ static void test_enum_surfaces(void) - IDirectDraw2_Release(ddraw); - } - -+static void test_caps(void) -+{ -+ IDirectDraw2 *ddraw; -+ DDCAPS caps, caps2; -+ HRESULT hr; -+ -+ ddraw = create_ddraw(); -+ ok(!!ddraw, "Failed to create a ddraw object.\n"); -+ -+ caps.dwSize = sizeof(caps); -+ caps2.dwSize = sizeof(caps2); -+ hr = IDirectDraw2_GetCaps(ddraw, &caps, &caps2); -+ ok(SUCCEEDED(hr), "Failed to query for caps, hr %#x.\n", hr); -+ -+ ok(caps.ddsOldCaps.dwCaps == caps.ddsCaps.dwCaps, -+ "Expected hal ddsOldCaps and ddsCaps to be identical (%x vs %x).\n", -+ caps.ddsOldCaps.dwCaps, caps.ddsCaps.dwCaps); -+ -+ ok(caps2.ddsOldCaps.dwCaps == caps2.ddsCaps.dwCaps, -+ "Expected hel ddsOldCaps and ddsCaps to be identical (%x vs %x).\n", -+ caps2.ddsOldCaps.dwCaps, caps2.ddsCaps.dwCaps); -+ -+ IDirectDraw2_Release(ddraw); -+} -+ - static void test_viewport(void) - { - static struct -@@ -13378,6 +13403,7 @@ START_TEST(ddraw2) - test_depth_readback(); - test_clear(); - test_enum_surfaces(); -+ test_caps(); - test_viewport(); - test_find_device(); - test_killfocus(); -diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c -index 1c48418..306f233 100644 ---- a/dlls/ddraw/tests/ddraw4.c -+++ b/dlls/ddraw/tests/ddraw4.c -@@ -15472,6 +15472,31 @@ static void test_sysmem_draw(void) - DestroyWindow(window); - } - -+static void test_caps(void) -+{ -+ IDirectDraw4 *ddraw; -+ DDCAPS caps, caps2; -+ HRESULT hr; -+ -+ ddraw = create_ddraw(); -+ ok(!!ddraw, "Failed to create a ddraw object.\n"); -+ -+ caps.dwSize = sizeof(caps); -+ caps2.dwSize = sizeof(caps2); -+ hr = IDirectDraw4_GetCaps(ddraw, &caps, &caps2); -+ ok(SUCCEEDED(hr), "Failed to query for caps, hr %#x.\n", hr); -+ -+ ok(caps.ddsOldCaps.dwCaps == caps.ddsCaps.dwCaps, -+ "Expected hal ddsOldCaps and ddsCaps to be identical (%x vs %x).\n", -+ caps.ddsOldCaps.dwCaps, caps.ddsCaps.dwCaps); -+ -+ ok(caps2.ddsOldCaps.dwCaps == caps2.ddsCaps.dwCaps, -+ "Expected hel ddsOldCaps and ddsCaps to be identical (%x vs %x).\n", -+ caps2.ddsOldCaps.dwCaps, caps2.ddsCaps.dwCaps); -+ -+ IDirectDraw4_Release(ddraw); -+} -+ - START_TEST(ddraw4) - { - DDDEVICEIDENTIFIER identifier; -@@ -15597,6 +15622,7 @@ START_TEST(ddraw4) - test_depth_readback(); - test_clear(); - test_enum_surfaces(); -+ test_caps(); - test_viewport(); - test_find_device(); - test_killfocus(); -diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c -index a125200..da777d8 100644 ---- a/dlls/ddraw/tests/ddraw7.c -+++ b/dlls/ddraw/tests/ddraw7.c -@@ -15198,6 +15198,31 @@ static void test_sysmem_draw(void) - DestroyWindow(window); - } - -+static void test_caps(void) -+{ -+ IDirectDraw7 *ddraw; -+ DDCAPS caps, caps2; -+ HRESULT hr; -+ -+ ddraw = create_ddraw(); -+ ok(!!ddraw, "Failed to create a ddraw object.\n"); -+ -+ caps.dwSize = sizeof(caps); -+ caps2.dwSize = sizeof(caps2); -+ hr = IDirectDraw7_GetCaps(ddraw, &caps, &caps2); -+ ok(SUCCEEDED(hr), "Failed to query for caps, hr %#x.\n", hr); -+ -+ ok(caps.ddsOldCaps.dwCaps == caps.ddsCaps.dwCaps, -+ "Expected hal ddsOldCaps and ddsCaps to be identical (%x vs %x).\n", -+ caps.ddsOldCaps.dwCaps, caps.ddsCaps.dwCaps); -+ -+ ok(caps2.ddsOldCaps.dwCaps == caps2.ddsCaps.dwCaps, -+ "Expected hel ddsOldCaps and ddsCaps to be identical (%x vs %x).\n", -+ caps2.ddsOldCaps.dwCaps, caps2.ddsCaps.dwCaps); -+ -+ IDirectDraw7_Release(ddraw); -+} -+ - START_TEST(ddraw7) - { - DDDEVICEIDENTIFIER2 identifier; -@@ -15335,6 +15360,7 @@ START_TEST(ddraw7) - test_enum_surfaces(); - test_viewport(); - test_device_load(); -+ test_caps(); - test_color_vertex(); - test_killfocus(); - test_sysmem_draw(); --- -1.9.1 - diff --git a/patches/ddraw-Texture_Wrong_Caps/0001-ddraw-Allow-setting-texture-without-DDSCAPS_TEXTURE-.patch b/patches/ddraw-Texture_Wrong_Caps/0001-ddraw-Allow-setting-texture-without-DDSCAPS_TEXTURE-.patch index 8b4c6715..7d8c102f 100644 --- a/patches/ddraw-Texture_Wrong_Caps/0001-ddraw-Allow-setting-texture-without-DDSCAPS_TEXTURE-.patch +++ b/patches/ddraw-Texture_Wrong_Caps/0001-ddraw-Allow-setting-texture-without-DDSCAPS_TEXTURE-.patch @@ -1,4 +1,4 @@ -From 1b4c479e85db593612a550cac2f3f9b562a3ac6c Mon Sep 17 00:00:00 2001 +From 8ed9e258d5232b7c207a5d05bce72985a6f0677c Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Thu, 4 Apr 2019 02:25:00 +0300 Subject: [PATCH] ddraw: Allow setting texture without DDSCAPS_TEXTURE for @@ -11,10 +11,10 @@ Signed-off-by: Paul Gofman 2 files changed, 141 insertions(+), 9 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c -index 9c2de58cac..c0bb93794d 100644 +index 1d2cb4dce11..fb14719a853 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c -@@ -2946,10 +2946,8 @@ static HRESULT WINAPI d3d_device3_SetLightState(IDirect3DDevice3 *iface, +@@ -2950,10 +2950,8 @@ static HRESULT WINAPI d3d_device3_SetLightState(IDirect3DDevice3 *iface, wined3d_mutex_unlock(); return DDERR_INVALIDPARAMS; } @@ -25,7 +25,7 @@ index 9c2de58cac..c0bb93794d 100644 device->material = value; } else if (state == D3DLIGHTSTATE_COLORMODEL) -@@ -4820,7 +4818,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface, +@@ -4834,7 +4832,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface, struct ddraw_surface *surf = unsafe_impl_from_IDirectDrawSurface7(texture); struct wined3d_texture *wined3d_texture = NULL; @@ -35,7 +35,7 @@ index 9c2de58cac..c0bb93794d 100644 if (surf && (surf->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE)) wined3d_texture = surf->wined3d_texture; -@@ -4856,8 +4855,8 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface, +@@ -4870,8 +4869,8 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface, { struct d3d_device *device = impl_from_IDirect3DDevice3(iface); struct ddraw_surface *tex = unsafe_impl_from_IDirect3DTexture2(texture); @@ -45,7 +45,7 @@ index 9c2de58cac..c0bb93794d 100644 TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture); -@@ -4866,7 +4865,18 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface, +@@ -4880,7 +4879,18 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface, if (device->legacyTextureBlending) IDirect3DDevice3_GetRenderState(iface, D3DRENDERSTATE_TEXTUREMAPBLEND, &texmapblend); @@ -65,7 +65,7 @@ index 9c2de58cac..c0bb93794d 100644 if (device->legacyTextureBlending && texmapblend == D3DTBLEND_MODULATE) { -@@ -4898,7 +4908,7 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface, +@@ -4912,7 +4922,7 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface, wined3d_mutex_unlock(); @@ -75,10 +75,10 @@ index 9c2de58cac..c0bb93794d 100644 static const struct tss_lookup diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c -index abf745aecb..26a021b429 100644 +index 77ae359a9ca..93f3c589373 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c -@@ -329,7 +329,7 @@ static IDirectDraw4 *create_ddraw(void) +@@ -330,7 +330,7 @@ static IDirectDraw4 *create_ddraw(void) return ddraw4; } @@ -87,7 +87,7 @@ index abf745aecb..26a021b429 100644 { IDirectDrawSurface4 *surface, *ds; IDirect3DDevice3 *device = NULL; -@@ -349,6 +349,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) +@@ -350,6 +350,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; @@ -96,7 +96,7 @@ index abf745aecb..26a021b429 100644 surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; -@@ -377,7 +379,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) +@@ -378,7 +380,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) } memset(&z_fmt, 0, sizeof(z_fmt)); @@ -106,7 +106,7 @@ index abf745aecb..26a021b429 100644 if (FAILED(hr) || !z_fmt.dwSize) { IDirect3D3_Release(d3d3); -@@ -389,6 +392,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) +@@ -390,6 +393,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; @@ -115,7 +115,7 @@ index abf745aecb..26a021b429 100644 U4(surface_desc).ddpfPixelFormat = z_fmt; surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; -@@ -411,7 +416,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) +@@ -412,7 +417,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) return NULL; } @@ -125,7 +125,7 @@ index abf745aecb..26a021b429 100644 IDirect3D3_Release(d3d3); IDirectDrawSurface4_Release(surface); if (FAILED(hr)) -@@ -420,6 +426,11 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) +@@ -421,6 +427,11 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level) return device; } @@ -137,7 +137,7 @@ index abf745aecb..26a021b429 100644 static IDirect3DViewport3 *create_viewport(IDirect3DDevice3 *device, UINT x, UINT y, UINT w, UINT h) { IDirect3DViewport3 *viewport; -@@ -16023,6 +16034,116 @@ static void test_caps(void) +@@ -16215,6 +16226,116 @@ static void test_caps(void) IDirectDraw4_Release(ddraw); } @@ -254,10 +254,10 @@ index abf745aecb..26a021b429 100644 START_TEST(ddraw4) { DDDEVICEIDENTIFIER identifier; -@@ -16156,4 +16277,5 @@ START_TEST(ddraw4) - test_gdi_surface(); +@@ -16348,4 +16469,5 @@ START_TEST(ddraw4) test_alphatest(); test_clipper_refcount(); + test_caps(); + test_texture_wrong_caps(); } -- diff --git a/patches/ddraw-version-check/0001-ddraw-Return-correct-devices-based-off-requested-Dir.patch b/patches/ddraw-version-check/0001-ddraw-Return-correct-devices-based-off-requested-Dir.patch index 4abc533c..a02889e7 100644 --- a/patches/ddraw-version-check/0001-ddraw-Return-correct-devices-based-off-requested-Dir.patch +++ b/patches/ddraw-version-check/0001-ddraw-Return-correct-devices-based-off-requested-Dir.patch @@ -1,15 +1,15 @@ -From 1171e61b81f598728dd5f242494a37dc74fb2870 Mon Sep 17 00:00:00 2001 +From 16d001f5562c37ac293fa547feef19887e635363 Mon Sep 17 00:00:00 2001 From: Andrew D'Addesio Date: Fri, 8 Feb 2019 18:48:33 -1000 Subject: [PATCH] ddraw: Return correct devices based off requested DirectX version. --- - dlls/ddraw/ddraw.c | 233 +++++++++++++++++++++++++-------------------- - 1 file changed, 132 insertions(+), 101 deletions(-) + dlls/ddraw/ddraw.c | 231 +++++++++++++++++++++++++-------------------- + 1 file changed, 130 insertions(+), 101 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c -index 8a1d0a4f487..691ea7a6ef9 100644 +index 83eeb33589e..324a149a425 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -47,37 +47,80 @@ static const DDDEVICEIDENTIFIER2 deviceidentifier = @@ -47,7 +47,8 @@ index 8a1d0a4f487..691ea7a6ef9 100644 - /* HAL device */ + /* RGB Emulation (D3D 1-7) */ -+ { + { +- "WINE Direct3D7 Hardware acceleration using WineD3D", + D3D_VERSION(1)|D3D_VERSION(2)|D3D_VERSION(3)|D3D_VERSION(7), + "WineD3D RGB Software Emulation", + "RGB Emulation", @@ -56,8 +57,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644 + }, + + /* Direct3D HAL (D3D 1-7) */ - { -- "WINE Direct3D7 Hardware acceleration using WineD3D", ++ { + D3D_VERSION(1)|D3D_VERSION(2)|D3D_VERSION(3)|D3D_VERSION(7), + "WineD3D Hardware Acceleration", "Direct3D HAL", @@ -77,7 +77,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644 + "MMX Emulation", + &IID_IDirect3DMMXDevice, + 0, - }, ++ }, + + /* Direct3D T&L HAL (D3D7 only) */ + { @@ -86,7 +86,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644 + "Direct3D T&L HAL", + &IID_IDirect3DTnLHalDevice, + 0, -+ }, + }, + + /* In the future, we may wish to add the "Reference Rasterizer" and + * "Null device", which are only available in DX6-8 and must be explicitly @@ -106,7 +106,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644 }; static void STDMETHODCALLTYPE ddraw_null_wined3d_object_destroyed(void *parent) {} -@@ -1396,15 +1439,6 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps) +@@ -1389,15 +1432,6 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps) D3DPTADDRESSCAPS_WRAP | D3DPTADDRESSCAPS_MIRROR | D3DPTADDRESSCAPS_CLAMP | D3DPTADDRESSCAPS_BORDER | D3DPTADDRESSCAPS_INDEPENDENTUV); @@ -122,16 +122,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644 /* Fill the missing members, and do some fixup */ caps->dpcLineCaps.dwSize = sizeof(caps->dpcLineCaps); caps->dpcLineCaps.dwTextureBlendCaps = D3DPTBLENDCAPS_ADD -@@ -1547,6 +1581,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD - - IDirect3D7_EnumZBufferFormats(&ddraw->IDirect3D7_iface, &IID_IDirect3DHALDevice, enum_zbuffer, &caps); - -+ caps.ddsOldCaps.dwCaps = caps.ddsCaps.dwCaps; -+ - if(DriverCaps) - { - DD_STRUCT_COPY_BYSIZE(DriverCaps, &caps); -@@ -3669,8 +3705,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur +@@ -3713,8 +3747,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur /***************************************************************************** * IDirect3D7::EnumDevices * @@ -141,7 +132,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644 * * Params: * callback: Function to call for each enumerated device -@@ -3703,14 +3738,17 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA +@@ -3747,14 +3780,17 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA dev_caps = device_desc7.dwDevCaps; @@ -154,16 +145,16 @@ index 8a1d0a4f487..691ea7a6ef9 100644 - device_desc7.dwDevCaps = dev_caps & ~device_list7[i].remove_caps; + if (!(device_list[i].version_mask & D3D_VERSION(ddraw->d3dversion))) + continue; - -- ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context); ++ + device_desc7.deviceGUID = *device_list[i].device_guid; + device_desc7.dwDevCaps = dev_caps & ~device_list[i].remove_caps; -+ + +- ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context); + ret = callback(device_list[i].device_name, device_list[i].device_name, &device_desc7, context); if (ret != DDENUMRET_OK) { TRACE("Application cancelled the enumeration.\n"); -@@ -3726,11 +3764,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA +@@ -3770,11 +3806,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA return D3D_OK; } @@ -187,7 +178,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644 * * Versions 1, 2 and 3 * -@@ -3745,18 +3793,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA +@@ -3789,18 +3835,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA *****************************************************************************/ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context) { @@ -215,7 +206,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644 TRACE("iface %p, callback %p, context %p.\n", iface, callback, context); -@@ -3765,52 +3813,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA +@@ -3809,52 +3855,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA wined3d_mutex_lock(); @@ -313,7 +304,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644 { TRACE("Application cancelled the enumeration.\n"); wined3d_mutex_unlock(); -@@ -3818,29 +3872,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA +@@ -3862,29 +3914,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA } } diff --git a/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch b/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch index 7673c598..3b96fb01 100644 --- a/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch +++ b/patches/eventfd_synchronization/0003-ntdll-Create-eventfd-based-objects-for-semaphores.patch @@ -1,10 +1,9 @@ -From 4df197cdb567f731bec385786ccda35499d656b4 Mon Sep 17 00:00:00 2001 +From 43baedbee4f25d88f8af30c216b888f5161e62df Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 7 Jun 2018 20:29:21 -0500 -Subject: [PATCH 03/83] ntdll: Create eventfd-based objects for semaphores. +Subject: [PATCH] ntdll: Create eventfd-based objects for semaphores. This patch break things, of course. That is fine. Its purpose is to prevent a Massive Patch Munge. - --- dlls/ntdll/Makefile.in | 1 + dlls/ntdll/esync.c | 141 ++++++++++++++++++++++++++++++++++++++++ @@ -17,7 +16,7 @@ This patch break things, of course. That is fine. Its purpose is to prevent a Ma create mode 100644 dlls/ntdll/esync.h diff --git a/dlls/ntdll/Makefile.in b/dlls/ntdll/Makefile.in -index ed4bb94e4..b75e8308a 100644 +index ed4bb94e4dc..b75e8308ac7 100644 --- a/dlls/ntdll/Makefile.in +++ b/dlls/ntdll/Makefile.in @@ -15,6 +15,7 @@ C_SRCS = \ @@ -30,7 +29,7 @@ index ed4bb94e4..b75e8308a 100644 handletable.c \ diff --git a/dlls/ntdll/esync.c b/dlls/ntdll/esync.c new file mode 100644 -index 000000000..da35bdf85 +index 00000000000..da35bdf854a --- /dev/null +++ b/dlls/ntdll/esync.c @@ -0,0 +1,141 @@ @@ -177,7 +176,7 @@ index 000000000..da35bdf85 +} diff --git a/dlls/ntdll/esync.h b/dlls/ntdll/esync.h new file mode 100644 -index 000000000..1a88170cf +index 00000000000..1a88170cfc4 --- /dev/null +++ b/dlls/ntdll/esync.h @@ -0,0 +1,32 @@ @@ -214,10 +213,10 @@ index 000000000..1a88170cf + * "server_fd_section" or something similar. */ +extern RTL_CRITICAL_SECTION fd_cache_section; diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h -index 17d87cd52..dad0996c4 100644 +index 11463146da0..a370256245c 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h -@@ -107,6 +107,7 @@ extern unsigned int server_queue_process_apc( HANDLE process, const apc_call_t * +@@ -106,6 +106,7 @@ extern unsigned int server_queue_process_apc( HANDLE process, const apc_call_t * extern int server_remove_fd_from_cache( HANDLE handle ) DECLSPEC_HIDDEN; extern int server_get_unix_fd( HANDLE handle, unsigned int access, int *unix_fd, int *needs_close, enum server_fd_type *type, unsigned int *options ) DECLSPEC_HIDDEN; @@ -226,7 +225,7 @@ index 17d87cd52..dad0996c4 100644 extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret, data_size_t *ret_len ) DECLSPEC_HIDDEN; diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c -index d2d238968..dcb355a65 100644 +index 43dfe9303bb..46f1cae3f1f 100644 --- a/dlls/ntdll/server.c +++ b/dlls/ntdll/server.c @@ -81,6 +81,7 @@ @@ -254,7 +253,7 @@ index d2d238968..dcb355a65 100644 /* atomically exchange a 64-bit value */ static inline LONG64 interlocked_xchg64( LONG64 *dest, LONG64 val ) -@@ -773,7 +774,7 @@ void CDECL wine_server_send_fd( int fd ) +@@ -764,7 +765,7 @@ void CDECL wine_server_send_fd( int fd ) * * Receive a file descriptor passed from the server. */ @@ -264,7 +263,7 @@ index d2d238968..dcb355a65 100644 struct iovec vec; struct msghdr msghdr; diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c -index b74bebf08..c259267fb 100644 +index 8974c7ed907..3939ce1ba78 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -59,7 +59,9 @@ @@ -275,9 +274,9 @@ index b74bebf08..c259267fb 100644 #include "ntdll_misc.h" +#include "esync.h" - WINE_DEFAULT_DEBUG_CHANNEL(ntdll); + WINE_DEFAULT_DEBUG_CHANNEL(sync); -@@ -248,6 +250,9 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT PHANDLE SemaphoreHandle, +@@ -249,6 +251,9 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT PHANDLE SemaphoreHandle, if (MaximumCount <= 0 || InitialCount < 0 || InitialCount > MaximumCount) return STATUS_INVALID_PARAMETER; diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index a0399992..d2e5dd63 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,13 +52,13 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "78f74446b9806f63a27c2d643b8e29156b5bdcbe" + echo "83ca9a95de80083d906a2aeb5d1e5ca2ed611199" } # Show version information version() { - echo "Wine Staging 4.9" + echo "Wine Staging 4.10" echo "Copyright (C) 2014-2019 the Wine Staging project authors." echo "Copyright (C) 2018-2019 Alistair Leslie-Hughes" echo "" @@ -2839,17 +2839,14 @@ fi # | * [#27002] Properly initialize caps->dwZBufferBitDepths in ddraw7_GetCaps # | # | Modified files: -# | * dlls/ddraw/ddraw.c, dlls/ddraw/tests/ddraw1.c, dlls/ddraw/tests/ddraw2.c, dlls/ddraw/tests/ddraw4.c, -# | dlls/ddraw/tests/ddraw7.c +# | * dlls/ddraw/ddraw.c, dlls/ddraw/tests/ddraw7.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 - patch_apply ddraw-Device_Caps/0003-ddraw-Set-ddsOldCaps-correctly-in-ddraw7_GetCaps.patch ( printf '%s\n' '+ { "Michael Müller", "ddraw: Don'\''t set HWTRANSFORMANDLIGHT flag on d3d7 RGB device.", 1 },'; printf '%s\n' '+ { "Michael Müller", "ddraw: Set dwZBufferBitDepth in ddraw7_GetCaps.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.", 1 },'; ) >> "$patchlist" fi