[PATCH 4/7] d3d11: Partially implement D3D11CoreCreateDevice.
Józef Kucia
jkucia at codeweavers.com
Wed Aug 19 18:47:57 CDT 2015
I haven't tested exact parameters of this function.
---
configure | 2 +-
configure.ac | 2 +-
dlls/d3d11/Makefile.in | 14 +++++++++++++-
dlls/d3d11/d3d11.spec | 2 +-
dlls/d3d11/d3d11_main.c | 32 +++++++++++++++++++++++++++-----
5 files changed, 43 insertions(+), 9 deletions(-)
diff --git a/configure b/configure
index a66731b..bb3bbec 100755
--- a/configure
+++ b/configure
@@ -17235,7 +17235,7 @@ wine_fn_config_test dlls/d3d10/tests d3d10_test
wine_fn_config_dll d3d10_1 enable_d3d10_1 implib
wine_fn_config_dll d3d10core enable_d3d10core implib
wine_fn_config_test dlls/d3d10core/tests d3d10core_test
-wine_fn_config_dll d3d11 enable_d3d11
+wine_fn_config_dll d3d11 enable_d3d11 implib
wine_fn_config_dll d3d8 enable_d3d8 implib
wine_fn_config_test dlls/d3d8/tests d3d8_test
wine_fn_config_dll d3d9 enable_d3d9 implib
diff --git a/configure.ac b/configure.ac
index 1329786..2b0b405 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2836,7 +2836,7 @@ WINE_CONFIG_TEST(dlls/d3d10/tests)
WINE_CONFIG_DLL(d3d10_1,,[implib])
WINE_CONFIG_DLL(d3d10core,,[implib])
WINE_CONFIG_TEST(dlls/d3d10core/tests)
-WINE_CONFIG_DLL(d3d11)
+WINE_CONFIG_DLL(d3d11,,[implib])
WINE_CONFIG_DLL(d3d8,,[implib])
WINE_CONFIG_TEST(dlls/d3d8/tests)
WINE_CONFIG_DLL(d3d9,,[implib])
diff --git a/dlls/d3d11/Makefile.in b/dlls/d3d11/Makefile.in
index fce34cd..3c8f6ab 100644
--- a/dlls/d3d11/Makefile.in
+++ b/dlls/d3d11/Makefile.in
@@ -1,6 +1,18 @@
MODULE = d3d11.dll
+IMPORTLIB = d3d11
+IMPORTS = dxguid uuid dxgi wined3d
C_SRCS = \
- d3d11_main.c
+ async.c \
+ buffer.c \
+ d3d11_main.c \
+ device.c \
+ inputlayout.c \
+ layer.c \
+ shader.c \
+ state.c \
+ texture.c \
+ utils.c \
+ view.c
RC_SRCS = version.rc
diff --git a/dlls/d3d11/d3d11.spec b/dlls/d3d11/d3d11.spec
index 2d6c877..90136e8 100644
--- a/dlls/d3d11/d3d11.spec
+++ b/dlls/d3d11/d3d11.spec
@@ -1,4 +1,4 @@
-@ stub D3D11CoreCreateDevice
+@ stdcall D3D11CoreCreateDevice(ptr ptr long ptr long ptr)
@ stub D3D11CoreCreateLayeredDevice
@ stub D3D11CoreGetLayeredDeviceSize
@ stub D3D11CoreRegisterLayers
diff --git a/dlls/d3d11/d3d11_main.c b/dlls/d3d11/d3d11_main.c
index 8d8e20a..b731cc2 100644
--- a/dlls/d3d11/d3d11_main.c
+++ b/dlls/d3d11/d3d11_main.c
@@ -19,12 +19,9 @@
*
*/
-#include <stdarg.h>
+#include "config.h"
-#include "windef.h"
-#include "winbase.h"
-#include "d3d11.h"
-#include "wine/debug.h"
+#include "d3d11_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d11);
@@ -45,6 +42,31 @@ static const char *debug_d3d_driver_type(D3D_DRIVER_TYPE driver_type)
}
}
+HRESULT WINAPI D3D11CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter, UINT flags,
+ const D3D_FEATURE_LEVEL *feature_levels, UINT levels, ID3D11Device **device)
+{
+ ID3D10Device *device10;
+ HRESULT hr;
+
+ TRACE("factory %p, adapter %p, flags %#x, feature_levels %p, levels %u, device %p.\n",
+ factory, adapter, flags, feature_levels, levels, device);
+
+ FIXME("Ignoring feature levels.\n");
+
+ if (FAILED(hr = d3d10_core_create_device(factory, adapter, flags, 0, &device10)))
+ return hr;
+
+ hr = ID3D10Device_QueryInterface(device10, &IID_ID3D11Device, (void **)device);
+ ID3D10Device_Release(device10);
+ if (FAILED(hr))
+ {
+ ERR("ID3D10Device should implement ID3D11Device, returning E_FAIL.\n");
+ return E_FAIL;
+ }
+
+ return S_OK;
+}
+
HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags,
const D3D_FEATURE_LEVEL *feature_levels, UINT levels, UINT sdk_version, ID3D11Device **device,
D3D_FEATURE_LEVEL *feature_level, ID3D11DeviceContext **context)
--
2.4.6
More information about the wine-patches
mailing list