Added dxgi-IDXGIDevice2 patchset

This commit is contained in:
Alistair Leslie-Hughes 2018-05-12 13:49:45 +10:00
parent fcff4a78ba
commit 054b0f6db6
3 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,82 @@
From d6446888cdfc8546f311e6c37e3b6e011acf4a75 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Sat, 28 Apr 2018 22:34:22 +0300
Subject: [PATCH] dxgi: Add IDXGIDevice2 stub.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
---
dlls/dxgi/device.c | 30 ++++++++++++++++++++++++++++++
include/wine/winedxgi.idl | 2 +-
2 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c
index 441bf14dd41..60690cfce8b 100644
--- a/dlls/dxgi/device.c
+++ b/dlls/dxgi/device.c
@@ -41,6 +41,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_QueryInterface(IWineDXGIDevice *ifa
|| IsEqualGUID(riid, &IID_IDXGIObject)
|| IsEqualGUID(riid, &IID_IDXGIDevice)
|| IsEqualGUID(riid, &IID_IDXGIDevice1)
+ || IsEqualGUID(riid, &IID_IDXGIDevice2)
|| IsEqualGUID(riid, &IID_IWineDXGIDevice))
{
IUnknown_AddRef(iface);
@@ -275,6 +276,31 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetMaximumFrameLatency(IWineDXGIDev
return E_NOTIMPL;
}
+static HRESULT STDMETHODCALLTYPE dxgi_device_OfferResources(IWineDXGIDevice *iface, UINT resource_count,
+ IDXGIResource * const *resources, DXGI_OFFER_RESOURCE_PRIORITY priority)
+{
+ FIXME("iface %p, resource_count %u, resources %p, priority %u stub!\n", iface, resource_count,
+ resources, priority);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE dxgi_device_ReclaimResources(IWineDXGIDevice *iface, UINT resource_count,
+ IDXGIResource * const *resources, BOOL *discarded)
+{
+ FIXME("iface %p, resource_count %u, resources %p, discarded %p stub!\n", iface, resource_count,
+ resources, discarded);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE dxgi_device_EnqueueSetEvent(IWineDXGIDevice *iface, HANDLE event)
+{
+ FIXME("iface %p, even %p stub!\n", iface, event);
+
+ return E_NOTIMPL;
+}
+
/* IWineDXGIDevice methods */
static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *iface,
@@ -355,6 +381,10 @@ static const struct IWineDXGIDeviceVtbl dxgi_device_vtbl =
/* IDXGIDevice1 methods */
dxgi_device_SetMaximumFrameLatency,
dxgi_device_GetMaximumFrameLatency,
+ /* IDXGIDevice2 methods */
+ dxgi_device_OfferResources,
+ dxgi_device_ReclaimResources,
+ dxgi_device_EnqueueSetEvent,
/* IWineDXGIDevice methods */
dxgi_device_create_surface,
dxgi_device_create_swapchain,
diff --git a/include/wine/winedxgi.idl b/include/wine/winedxgi.idl
index 2c5734280c6..3a1d6fa064f 100644
--- a/include/wine/winedxgi.idl
+++ b/include/wine/winedxgi.idl
@@ -25,7 +25,7 @@ import "dxgi1_5.idl";
local,
uuid(3e1ff30b-c951-48c3-b010-0fb49f3dca71)
]
-interface IWineDXGIDevice : IDXGIDevice1
+interface IWineDXGIDevice : IDXGIDevice2
{
HRESULT create_surface(
[in] struct wined3d_texture *wined3d_texture,
--
2.17.0

View File

@ -0,0 +1 @@
Fixes: [45080] - Add support for IDXGIDevice2 interface

View File

@ -149,6 +149,7 @@ patch_enable_all ()
enable_dxdiagn_Enumerate_DirectSound="$1"
enable_dxdiagn_GetChildContainer_Leaf_Nodes="$1"
enable_dxgi_GammaRamp="$1"
enable_dxgi_IDXGIDevice2="$1"
enable_dxgi_MakeWindowAssociation="$1"
enable_dxgi_SetMaximumFrameLatency="$1"
enable_dxva2_Video_Decoder="$1"
@ -633,6 +634,9 @@ patch_enable ()
dxgi-GammaRamp)
enable_dxgi_GammaRamp="$2"
;;
dxgi-IDXGIDevice2)
enable_dxgi_IDXGIDevice2="$2"
;;
dxgi-MakeWindowAssociation)
enable_dxgi_MakeWindowAssociation="$2"
;;
@ -3846,6 +3850,21 @@ if test "$enable_dxgi_GammaRamp" -eq 1; then
) >> "$patchlist"
fi
# Patchset dxgi-IDXGIDevice2
# |
# | This patchset fixes the following Wine bugs:
# | * [#45080] - Add support for IDXGIDevice2 interface
# |
# | Modified files:
# | * dlls/dxgi/device.c, include/wine/winedxgi.idl
# |
if test "$enable_dxgi_IDXGIDevice2" -eq 1; then
patch_apply dxgi-IDXGIDevice2/0001-dxgi-Add-IDXGIDevice2-stub.patch
(
printf '%s\n' '+ { "Nikolay Sivov", "dxgi: Add IDXGIDevice2 stub.", 1 },';
) >> "$patchlist"
fi
# Patchset dxgi-MakeWindowAssociation
# |
# | Modified files: