2 * Copyright 2008 Henri Verbeet for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_DXGI_PRIVATE_H
20 #define __WINE_DXGI_PRIVATE_H
22 #include "wine/debug.h"
34 #include "wine/wined3d.h"
35 #include "wine/winedxgi.h"
37 extern CRITICAL_SECTION dxgi_cs DECLSPEC_HIDDEN;
39 /* TRACE helper functions */
40 const char *debug_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
42 WINED3DFORMAT wined3dformat_from_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
45 extern const struct IWineDXGIFactoryVtbl dxgi_factory_vtbl DECLSPEC_HIDDEN;
48 const struct IWineDXGIFactoryVtbl *vtbl;
52 IDXGIAdapter **adapters;
56 extern const struct IWineDXGIDeviceVtbl dxgi_device_vtbl DECLSPEC_HIDDEN;
59 const struct IWineDXGIDeviceVtbl *vtbl;
60 IUnknown *child_layer;
62 IWineD3DDevice *wined3d_device;
63 IWineDXGIFactory *factory;
69 const struct IDXGIOutputVtbl *vtbl;
73 void dxgi_output_init(struct dxgi_output *output) DECLSPEC_HIDDEN;
78 const struct IWineDXGIAdapterVtbl *vtbl;
85 HRESULT dxgi_adapter_init(struct dxgi_adapter *adapter, IDXGIFactory *parent, UINT ordinal) DECLSPEC_HIDDEN;
88 extern const struct IDXGISwapChainVtbl dxgi_swapchain_vtbl DECLSPEC_HIDDEN;
91 const struct IDXGISwapChainVtbl *vtbl;
93 IWineD3DSwapChain *wined3d_swapchain;
97 extern const struct IDXGISurfaceVtbl dxgi_surface_vtbl DECLSPEC_HIDDEN;
98 extern const struct IUnknownVtbl dxgi_surface_inner_unknown_vtbl DECLSPEC_HIDDEN;
101 const struct IDXGISurfaceVtbl *vtbl;
102 const struct IUnknownVtbl *inner_unknown_vtbl;
103 IUnknown *outer_unknown;
108 enum dxgi_device_layer_id
110 DXGI_DEVICE_LAYER_DEBUG1 = 0x8,
111 DXGI_DEVICE_LAYER_THREAD_SAFE = 0x10,
112 DXGI_DEVICE_LAYER_DEBUG2 = 0x20,
113 DXGI_DEVICE_LAYER_SWITCH_TO_REF = 0x30,
114 DXGI_DEVICE_LAYER_D3D10_DEVICE = 0xffffffff,
117 struct layer_get_size_args
123 IDXGIAdapter *adapter;
124 WORD interface_major;
125 WORD interface_minor;
127 WORD version_revision;
130 struct dxgi_device_layer
132 enum dxgi_device_layer_id id;
133 HRESULT (WINAPI *init)(enum dxgi_device_layer_id id, DWORD *count, DWORD *values);
134 UINT (WINAPI *get_size)(enum dxgi_device_layer_id id, struct layer_get_size_args *args, DWORD unknown0);
135 HRESULT (WINAPI *create)(enum dxgi_device_layer_id id, void **layer_base, DWORD unknown0,
136 void *device_object, REFIID riid, void **device_layer);
139 #endif /* __WINE_DXGI_PRIVATE_H */