Release 1.5.29.
[wine] / dlls / d3d11 / d3d11_main.c
1 /*
2  * Direct3D 11
3  *
4  * Copyright 2013 Austin English
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  *
20  */
21
22 #include <stdarg.h>
23
24 #include "windef.h"
25 #include "winbase.h"
26 #include "d3d11.h"
27 #include "wine/debug.h"
28
29 WINE_DEFAULT_DEBUG_CHANNEL(d3d11);
30
31 static const char *debug_d3d_driver_type(D3D_DRIVER_TYPE driver_type)
32 {
33     switch(driver_type)
34     {
35 #define D3D11_TO_STR(x) case x: return #x
36         D3D11_TO_STR(D3D_DRIVER_TYPE_UNKNOWN);
37         D3D11_TO_STR(D3D_DRIVER_TYPE_HARDWARE);
38         D3D11_TO_STR(D3D_DRIVER_TYPE_REFERENCE);
39         D3D11_TO_STR(D3D_DRIVER_TYPE_NULL);
40         D3D11_TO_STR(D3D_DRIVER_TYPE_SOFTWARE);
41         D3D11_TO_STR(D3D_DRIVER_TYPE_WARP);
42 #undef D3D11_TO_STR
43         default:
44             return wine_dbg_sprintf("Unrecognized D3D_DRIVER_TYPE %#x\n", driver_type);
45     }
46 }
47
48 HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type, HMODULE swrast, UINT flags,
49                                  const D3D_FEATURE_LEVEL feature_levels, UINT levels, UINT sdk_version,
50                                  ID3D11Device **device, D3D_FEATURE_LEVEL *feature_level, ID3D11DeviceContext **context)
51 {
52     FIXME("stub: adapter %p, driver_type %s, swrast %p, flags %#x, feature_levels %d, levels %#x, sdk_version %d, "
53           "device %p, feature_level %p, context %p\n", adapter, debug_d3d_driver_type(driver_type), swrast,
54           flags, feature_levels, levels, sdk_version, device, feature_level, context);
55     return E_OUTOFMEMORY;
56 }