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 #define WIN32_NO_STATUS
24 #define COM_NO_WINDOWS_H
26 #include "wine/debug.h"
39 #include "wine/wined3d.h"
40 #include <wine/winedxgi.h>
42 extern CRITICAL_SECTION dxgi_cs DECLSPEC_HIDDEN
;
45 enum dxgi_device_layer_id
47 DXGI_DEVICE_LAYER_DEBUG1
= 0x8,
48 DXGI_DEVICE_LAYER_THREAD_SAFE
= 0x10,
49 DXGI_DEVICE_LAYER_DEBUG2
= 0x20,
50 DXGI_DEVICE_LAYER_SWITCH_TO_REF
= 0x30,
51 DXGI_DEVICE_LAYER_D3D10_DEVICE
= 0xffffffff,
54 struct layer_get_size_args
60 IDXGIAdapter
*adapter
;
64 WORD version_revision
;
67 struct dxgi_device_layer
69 enum dxgi_device_layer_id id
;
70 HRESULT (WINAPI
*init
)(enum dxgi_device_layer_id id
, DWORD
*count
, DWORD
*values
);
71 UINT (WINAPI
*get_size
)(enum dxgi_device_layer_id id
, struct layer_get_size_args
*args
, DWORD unknown0
);
72 HRESULT (WINAPI
*create
)(enum dxgi_device_layer_id id
, void **layer_base
, DWORD unknown0
,
73 void *device_object
, REFIID riid
, void **device_layer
);
76 /* TRACE helper functions */
77 const char *debug_dxgi_format(DXGI_FORMAT format
) DECLSPEC_HIDDEN
;
79 DXGI_FORMAT
dxgi_format_from_wined3dformat(enum wined3d_format_id format
) DECLSPEC_HIDDEN
;
80 enum wined3d_format_id
wined3dformat_from_dxgi_format(DXGI_FORMAT format
) DECLSPEC_HIDDEN
;
85 IWineDXGIFactory IWineDXGIFactory_iface
;
87 struct wined3d
*wined3d
;
89 IDXGIAdapter
**adapters
;
92 HRESULT
dxgi_factory_init(struct dxgi_factory
*factory
) DECLSPEC_HIDDEN
;
97 IWineDXGIDevice IWineDXGIDevice_iface
;
98 IUnknown
*child_layer
;
100 struct wined3d_device
*wined3d_device
;
101 IWineDXGIFactory
*factory
;
104 HRESULT
dxgi_device_init(struct dxgi_device
*device
, struct dxgi_device_layer
*layer
,
105 IDXGIFactory
*factory
, IDXGIAdapter
*adapter
) DECLSPEC_HIDDEN
;
110 IDXGIOutput IDXGIOutput_iface
;
112 struct dxgi_adapter
*adapter
;
115 void dxgi_output_init(struct dxgi_output
*output
, struct dxgi_adapter
*adapter
) DECLSPEC_HIDDEN
;
120 IWineDXGIAdapter IWineDXGIAdapter_iface
;
121 IWineDXGIFactory
*parent
;
127 HRESULT
dxgi_adapter_init(struct dxgi_adapter
*adapter
, IWineDXGIFactory
*parent
, UINT ordinal
) DECLSPEC_HIDDEN
;
130 struct dxgi_swapchain
132 IDXGISwapChain IDXGISwapChain_iface
;
134 struct wined3d_swapchain
*wined3d_swapchain
;
137 HRESULT
dxgi_swapchain_init(struct dxgi_swapchain
*swapchain
, struct dxgi_device
*device
,
138 struct wined3d_swapchain_desc
*desc
) DECLSPEC_HIDDEN
;
143 IDXGISurface IDXGISurface_iface
;
144 IUnknown IUnknown_iface
;
145 IUnknown
*outer_unknown
;
150 HRESULT
dxgi_surface_init(struct dxgi_surface
*surface
, IDXGIDevice
*device
, IUnknown
*outer
) DECLSPEC_HIDDEN
;
152 #endif /* __WINE_DXGI_PRIVATE_H */