ReactOS 0.4.17-dev-934-g091855f
dxgi_private.h
Go to the documentation of this file.
1/*
2 * Copyright 2008 Henri Verbeet for CodeWeavers
3 *
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.
8 *
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.
13 *
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
17 */
18
19#ifndef __WINE_DXGI_PRIVATE_H
20#define __WINE_DXGI_PRIVATE_H
21
22#include "wine/debug.h"
23
24#include <assert.h>
25
26#define COBJMACROS
27#include "winbase.h"
28#include "wingdi.h"
29#include "winuser.h"
30#include "objbase.h"
31#include "winnls.h"
32
33#include "dxgi1_6.h"
34#include "d3d10_1.h"
35#include "d3d12.h"
36#ifdef DXGI_INIT_GUID
37#include "initguid.h"
38#endif
39#include "wine/wined3d.h"
40#include "wine/winedxgi.h"
41
43{
45};
46
47/* Layered device */
49{
55};
56
58{
68};
69
71{
76 void *device_object, REFIID riid, void **device_layer);
77};
78
79/* TRACE helper functions */
81const char *debug_dxgi_mode(const DXGI_MODE_DESC *desc);
82const char *debug_dxgi_mode1(const DXGI_MODE_DESC1 *desc);
83void dump_feature_levels(const D3D_FEATURE_LEVEL *feature_levels, unsigned int level_count);
84
88 enum wined3d_multisample_type wined3d_type, unsigned int wined3d_quality);
90 unsigned int *wined3d_quality, const DXGI_SAMPLE_DESC *dxgi_desc);
92 const DXGI_MODE_DESC *mode);
94 const DXGI_MODE_DESC1 *mode);
95DXGI_USAGE dxgi_usage_from_wined3d_bind_flags(unsigned int wined3d_bind_flags);
97unsigned int dxgi_swapchain_flags_from_wined3d(unsigned int wined3d_flags);
99 ;
101 IDXGIOutput *dxgi_containing_output, HWND window, const DXGI_SWAP_CHAIN_DESC1 *dxgi_desc,
102 const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *dxgi_fullscreen_desc);
103
105 REFGUID guid, UINT *data_size, void *data);
107 REFGUID guid, UINT data_size, const void *data);
109 REFGUID guid, const IUnknown *object);
110
111/* IDXGIFactory */
113{
120};
121
125
126/* IDXGIDevice */
128{
137};
138
141 const D3D_FEATURE_LEVEL *feature_levels, unsigned int level_count);
142
143/* IDXGIOutput */
145{
151};
152
153HRESULT dxgi_output_create(struct dxgi_adapter *adapter, unsigned int output_idx,
154 struct dxgi_output **output);
156
157/* IDXGIAdapter */
159{
166};
167
169 struct dxgi_adapter **adapter);
171
172/* IDXGISwapChain */
174{
182
186};
187
190
192 const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc,
193 IDXGISwapChain1 **swapchain);
194
196
197/* IDXGISurface/IDXGIResource */
199{
206 IDXGIDevice *device;
209};
210
212 IUnknown *outer, BOOL needs_surface, struct wined3d_resource *wined3d_resource);
213
214#endif /* __WINE_DXGI_PRIVATE_H */
dxgi_device_layer_id
D3D_FEATURE_LEVEL
Definition: d3dcommon.idl:102
GUID guid
Definition: version.c:147
UINT DXGI_USAGE
Definition: dxgi.idl:42
struct dxgi_factory * unsafe_impl_from_IDXGIFactory(IDXGIFactory *iface)
Definition: factory.c:546
const char * debug_dxgi_format(DXGI_FORMAT format)
Definition: utils.c:46
enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format)
Definition: utils.c:323
HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *queue, HWND window, const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, IDXGISwapChain1 **swapchain)
Definition: swapchain.c:3399
HRESULT wined3d_swapchain_desc_from_dxgi(struct wined3d_swapchain_desc *wined3d_desc, IDXGIOutput *dxgi_containing_output, HWND window, const DXGI_SWAP_CHAIN_DESC1 *dxgi_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *dxgi_fullscreen_desc)
Definition: utils.c:571
HRESULT dxgi_get_output_from_window(IWineDXGIFactory *factory, HWND window, IDXGIOutput **dxgi_output)
Definition: swapchain.c:103
dxgi_device_layer_id
Definition: dxgi_private.h:49
@ DXGI_DEVICE_LAYER_THREAD_SAFE
Definition: dxgi_private.h:51
@ DXGI_DEVICE_LAYER_D3D10_DEVICE
Definition: dxgi_private.h:54
@ DXGI_DEVICE_LAYER_DEBUG1
Definition: dxgi_private.h:50
@ DXGI_DEVICE_LAYER_SWITCH_TO_REF
Definition: dxgi_private.h:53
@ DXGI_DEVICE_LAYER_DEBUG2
Definition: dxgi_private.h:52
HRESULT dxgi_get_private_data(struct wined3d_private_store *store, REFGUID guid, UINT *data_size, void *data)
Definition: utils.c:624
unsigned int dxgi_swapchain_flags_from_wined3d(unsigned int wined3d_flags)
Definition: utils.c:525
void dxgi_sample_desc_from_wined3d(DXGI_SAMPLE_DESC *desc, enum wined3d_multisample_type wined3d_type, unsigned int wined3d_quality)
Definition: utils.c:447
void dump_feature_levels(const D3D_FEATURE_LEVEL *feature_levels, unsigned int level_count)
Definition: utils.c:410
void wined3d_sample_desc_from_dxgi(enum wined3d_multisample_type *wined3d_type, unsigned int *wined3d_quality, const DXGI_SAMPLE_DESC *dxgi_desc)
Definition: utils.c:454
HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended)
Definition: factory.c:585
HRESULT dxgi_output_create(struct dxgi_adapter *adapter, unsigned int output_idx, struct dxgi_output **output)
Definition: output.c:725
unsigned int wined3d_bind_flags_from_dxgi_usage(DXGI_USAGE usage)
Definition: utils.c:504
DXGI_USAGE dxgi_usage_from_wined3d_bind_flags(unsigned int wined3d_bind_flags)
Definition: utils.c:490
HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *layer, IDXGIFactory *factory, IDXGIAdapter *adapter, const D3D_FEATURE_LEVEL *feature_levels, unsigned int level_count)
Definition: device.c:486
BOOL dxgi_validate_swapchain_desc(const DXGI_SWAP_CHAIN_DESC1 *desc)
Definition: swapchain.c:63
dxgi_frame_latency
Definition: dxgi_private.h:43
@ DXGI_FRAME_LATENCY_MAX
Definition: dxgi_private.h:44
HRESULT dxgi_set_private_data(struct wined3d_private_store *store, REFGUID guid, UINT data_size, const void *data)
Definition: utils.c:666
void wined3d_display_mode_from_dxgi(struct wined3d_display_mode *wined3d_mode, const DXGI_MODE_DESC *mode)
Definition: utils.c:469
HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_device *device, struct wined3d_swapchain_desc *desc)
Definition: swapchain.c:991
struct dxgi_adapter * unsafe_impl_from_IDXGIAdapter(IDXGIAdapter *iface)
Definition: adapter.c:418
HRESULT dxgi_set_private_data_interface(struct wined3d_private_store *store, REFGUID guid, const IUnknown *object)
Definition: utils.c:694
HRESULT dxgi_adapter_create(struct dxgi_factory *factory, UINT ordinal, struct dxgi_adapter **adapter)
Definition: adapter.c:448
struct dxgi_output * unsafe_impl_from_IDXGIOutput(IDXGIOutput *iface)
Definition: output.c:706
void wined3d_display_mode_from_dxgi1(struct wined3d_display_mode *wined3d_mode, const DXGI_MODE_DESC1 *mode)
Definition: utils.c:479
HWND dxgi_factory_get_device_window(struct dxgi_factory *factory)
Definition: factory.c:607
HRESULT dxgi_resource_init(struct dxgi_resource *resource, IDXGIDevice *device, IUnknown *outer, BOOL needs_surface, struct wined3d_resource *wined3d_resource)
Definition: resource.c:426
const char * debug_dxgi_mode(const DXGI_MODE_DESC *desc)
Definition: utils.c:388
DXGI_FORMAT dxgi_format_from_wined3dformat(enum wined3d_format_id format)
Definition: utils.c:210
const char * debug_dxgi_mode1(const DXGI_MODE_DESC1 *desc)
Definition: utils.c:399
DXGI_FORMAT
Definition: dxgiformat.idl:22
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
return adapter
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum mode
Definition: glext.h:6217
GLenum GLuint GLint GLint layer
Definition: glext.h:7007
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
unsigned int UINT
Definition: sysinfo.c:13
static D3D_DRIVER_TYPE HMODULE UINT const D3D_FEATURE_LEVEL * feature_levels
Definition: hlsl_d3d11.c:28
REFIID riid
Definition: atlbase.h:39
static HDC
Definition: imagelist.c:88
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
static IHTMLWindow2 * window
Definition: events.c:77
static const struct access_res create[16]
Definition: package.c:7546
static IUnknown * outer
Definition: compobj.c:82
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
Definition: scsiwmi.h:51
IWineDXGIDevice * device
Definition: dxgi_private.h:180
struct wined3d_private_store private_store
Definition: dxgi_private.h:177
struct wined3d_swapchain_state_parent state_parent
Definition: dxgi_private.h:179
IDXGISwapChain4 IDXGISwapChain4_iface
Definition: dxgi_private.h:175
LONG in_set_fullscreen_state
Definition: dxgi_private.h:185
struct wined3d_swapchain * wined3d_swapchain
Definition: dxgi_private.h:178
IDXGIOutput * target
Definition: dxgi_private.h:183
IWineDXGIFactory * factory
Definition: dxgi_private.h:181
Definition: devices.h:37
struct wined3d_adapter * wined3d_adapter
Definition: dxgi_private.h:162
struct dxgi_factory * factory
Definition: dxgi_private.h:165
struct wined3d_private_store private_store
Definition: dxgi_private.h:163
IWineDXGIAdapter IWineDXGIAdapter_iface
Definition: dxgi_private.h:160
HRESULT(WINAPI *create)(enum dxgi_device_layer_id id
struct layer_get_size_args DWORD unknown0
UINT(WINAPI *get_size)(enum dxgi_device_layer_id id
DWORD DWORD * values
void DWORD void REFIID void ** device_layer
HRESULT(WINAPI *init)(enum dxgi_device_layer_id id
struct layer_get_size_args * args
void DWORD void REFIID riid
enum dxgi_device_layer_id id
void DWORD void * device_object
struct wined3d_private_store private_store
Definition: dxgi_private.h:133
IWineDXGIDevice IWineDXGIDevice_iface
Definition: dxgi_private.h:129
IWineDXGISwapChainFactory IWineDXGISwapChainFactory_iface
Definition: dxgi_private.h:130
IUnknown * child_layer
Definition: dxgi_private.h:131
struct wined3d_device * wined3d_device
Definition: dxgi_private.h:134
IWineDXGIAdapter * adapter
Definition: dxgi_private.h:136
struct wined3d_swapchain * implicit_swapchain
Definition: dxgi_private.h:135
HWND device_window
Definition: dxgi_private.h:119
struct wined3d * wined3d
Definition: dxgi_private.h:117
struct wined3d_private_store private_store
Definition: dxgi_private.h:116
IWineDXGIFactory IWineDXGIFactory_iface
Definition: dxgi_private.h:114
IDXGIOutput6 IDXGIOutput6_iface
Definition: dxgi_private.h:146
struct wined3d_private_store private_store
Definition: dxgi_private.h:149
struct dxgi_adapter * adapter
Definition: dxgi_private.h:150
struct wined3d_output * wined3d_output
Definition: dxgi_private.h:148
IDXGISurface1 IDXGISurface1_iface
Definition: dxgi_private.h:200
struct wined3d_private_store private_store
Definition: dxgi_private.h:205
IUnknown IUnknown_iface
Definition: dxgi_private.h:202
IDXGIDevice * device
Definition: dxgi_private.h:206
IUnknown * outer_unknown
Definition: dxgi_private.h:203
struct wined3d_resource * wined3d_resource
Definition: dxgi_private.h:207
IDXGIResource IDXGIResource_iface
Definition: dxgi_private.h:201
Definition: main.c:439
IDXGIAdapter * adapter
Definition: queue.c:179
#define WINAPI
Definition: msvc.h:6
wined3d_multisample_type
Definition: wined3d.h:572
wined3d_format_id
Definition: wined3d.h:126
static int init
Definition: wintirpc.c:33