ReactOS  0.4.15-dev-345-g5d88487
directx.c
Go to the documentation of this file.
1 /*
2  * IDirect3D8 implementation
3  *
4  * Copyright 2002-2004 Jason Edmeades
5  * Copyright 2003-2004 Raphael Junqueira
6  * Copyright 2004 Christian Costa
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21  */
22 
23 #include "config.h"
24 
25 #include <stdarg.h>
26 
27 #include "windef.h"
28 #include "winbase.h"
29 #include "wingdi.h"
30 #include "winuser.h"
31 #include "wine/debug.h"
32 #include "wine/unicode.h"
33 
34 #include "d3d8_private.h"
35 
37 
38 static inline struct d3d8 *impl_from_IDirect3D8(IDirect3D8 *iface)
39 {
40  return CONTAINING_RECORD(iface, struct d3d8, IDirect3D8_iface);
41 }
42 
43 static HRESULT WINAPI d3d8_QueryInterface(IDirect3D8 *iface, REFIID riid, void **out)
44 {
45  TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
46 
47  if (IsEqualGUID(riid, &IID_IDirect3D8)
49  {
50  IDirect3D8_AddRef(iface);
51  *out = iface;
52  return S_OK;
53  }
54 
55  WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
56 
57  *out = NULL;
58  return E_NOINTERFACE;
59 }
60 
61 static ULONG WINAPI d3d8_AddRef(IDirect3D8 *iface)
62 {
63  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
65 
66  TRACE("%p increasing refcount to %u.\n", iface, refcount);
67 
68  return refcount;
69 }
70 
71 static ULONG WINAPI d3d8_Release(IDirect3D8 *iface)
72 {
73  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
75 
76  TRACE("%p decreasing refcount to %u.\n", iface, refcount);
77 
78  if (!refcount)
79  {
83 
84  heap_free(d3d8);
85  }
86 
87  return refcount;
88 }
89 
90 static HRESULT WINAPI d3d8_RegisterSoftwareDevice(IDirect3D8 *iface, void *init_function)
91 {
92  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
93  HRESULT hr;
94 
95  TRACE("iface %p, init_function %p.\n", iface, init_function);
96 
100 
101  return hr;
102 }
103 
104 static UINT WINAPI d3d8_GetAdapterCount(IDirect3D8 *iface)
105 {
106  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
107  HRESULT hr;
108 
109  TRACE("iface %p.\n", iface);
110 
114 
115  return hr;
116 }
117 
118 static HRESULT WINAPI d3d8_GetAdapterIdentifier(IDirect3D8 *iface, UINT adapter,
119  DWORD flags, D3DADAPTER_IDENTIFIER8 *identifier)
120 {
121  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
122  struct wined3d_adapter_identifier adapter_id;
123  HRESULT hr;
124 
125  TRACE("iface %p, adapter %u, flags %#x, identifier %p.\n",
126  iface, adapter, flags, identifier);
127 
128  adapter_id.driver = identifier->Driver;
129  adapter_id.driver_size = sizeof(identifier->Driver);
130  adapter_id.description = identifier->Description;
131  adapter_id.description_size = sizeof(identifier->Description);
132  adapter_id.device_name = NULL; /* d3d9 only */
133  adapter_id.device_name_size = 0; /* d3d9 only */
134 
136  hr = wined3d_get_adapter_identifier(d3d8->wined3d, adapter, flags, &adapter_id);
138 
139  identifier->DriverVersion = adapter_id.driver_version;
140  identifier->VendorId = adapter_id.vendor_id;
141  identifier->DeviceId = adapter_id.device_id;
142  identifier->SubSysId = adapter_id.subsystem_id;
143  identifier->Revision = adapter_id.revision;
144  memcpy(&identifier->DeviceIdentifier, &adapter_id.device_identifier, sizeof(identifier->DeviceIdentifier));
145  identifier->WHQLLevel = adapter_id.whql_level;
146 
147  return hr;
148 }
149 
150 static UINT WINAPI d3d8_GetAdapterModeCount(IDirect3D8 *iface, UINT adapter)
151 {
152  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
153  HRESULT hr;
154 
155  TRACE("iface %p, adapter %u.\n", iface, adapter);
156 
161 
162  return hr;
163 }
164 
165 static HRESULT WINAPI d3d8_EnumAdapterModes(IDirect3D8 *iface, UINT adapter, UINT mode_idx, D3DDISPLAYMODE *mode)
166 {
167  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
168  struct wined3d_display_mode wined3d_mode;
169  HRESULT hr;
170 
171  TRACE("iface %p, adapter %u, mode_idx %u, mode %p.\n",
172  iface, adapter, mode_idx, mode);
173 
176  WINED3D_SCANLINE_ORDERING_UNKNOWN, mode_idx, &wined3d_mode);
178 
179  if (SUCCEEDED(hr))
180  {
181  mode->Width = wined3d_mode.width;
182  mode->Height = wined3d_mode.height;
183  mode->RefreshRate = wined3d_mode.refresh_rate;
184  mode->Format = d3dformat_from_wined3dformat(wined3d_mode.format_id);
185  }
186 
187  return hr;
188 }
189 
190 static HRESULT WINAPI d3d8_GetAdapterDisplayMode(IDirect3D8 *iface, UINT adapter, D3DDISPLAYMODE *mode)
191 {
192  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
193  struct wined3d_display_mode wined3d_mode;
194  HRESULT hr;
195 
196  TRACE("iface %p, adapter %u, mode %p.\n",
197  iface, adapter, mode);
198 
200  hr = wined3d_get_adapter_display_mode(d3d8->wined3d, adapter, &wined3d_mode, NULL);
202 
203  if (SUCCEEDED(hr))
204  {
205  mode->Width = wined3d_mode.width;
206  mode->Height = wined3d_mode.height;
207  mode->RefreshRate = wined3d_mode.refresh_rate;
208  mode->Format = d3dformat_from_wined3dformat(wined3d_mode.format_id);
209  }
210 
211  return hr;
212 }
213 
214 static HRESULT WINAPI d3d8_CheckDeviceType(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type,
215  D3DFORMAT display_format, D3DFORMAT backbuffer_format, BOOL windowed)
216 {
217  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
218  HRESULT hr;
219 
220  TRACE("iface %p, adapter %u, device_type %#x, display_format %#x, backbuffer_format %#x, windowed %#x.\n",
221  iface, adapter, device_type, display_format, backbuffer_format, windowed);
222 
223  if (!windowed && display_format != D3DFMT_X8R8G8B8 && display_format != D3DFMT_R5G6B5)
225 
228  wined3dformat_from_d3dformat(backbuffer_format), windowed);
230 
231  return hr;
232 }
233 
234 static HRESULT WINAPI d3d8_CheckDeviceFormat(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type,
235  D3DFORMAT adapter_format, DWORD usage, D3DRESOURCETYPE resource_type, D3DFORMAT format)
236 {
237  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
238  enum wined3d_resource_type wined3d_rtype;
239  HRESULT hr;
240 
241  TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.\n",
242  iface, adapter, device_type, adapter_format, usage, resource_type, format);
243 
244  if (!adapter_format)
245  {
246  WARN("Invalid adapter format.\n");
247  return D3DERR_INVALIDCALL;
248  }
249 
251  switch (resource_type)
252  {
255  case D3DRTYPE_TEXTURE:
257  case D3DRTYPE_SURFACE:
258  wined3d_rtype = WINED3D_RTYPE_TEXTURE_2D;
259  break;
260 
262  case D3DRTYPE_VOLUME:
264  wined3d_rtype = WINED3D_RTYPE_TEXTURE_3D;
265  break;
266 
269  wined3d_rtype = WINED3D_RTYPE_BUFFER;
270  break;
271 
272  default:
273  FIXME("Unhandled resource type %#x.\n", resource_type);
274  return WINED3DERR_INVALIDCALL;
275  }
276 
279  usage, wined3d_rtype, wined3dformat_from_d3dformat(format));
281 
282  return hr;
283 }
284 
286  D3DFORMAT format, BOOL windowed, D3DMULTISAMPLE_TYPE multisample_type)
287 {
288  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
289  HRESULT hr;
290 
291  TRACE("iface %p, adapter %u, device_type %#x, format %#x, windowed %#x, multisample_type %#x.\n",
292  iface, adapter, device_type, format, windowed, multisample_type);
293 
294  if (multisample_type > D3DMULTISAMPLE_16_SAMPLES)
295  return D3DERR_INVALIDCALL;
296 
300  (enum wined3d_multisample_type)multisample_type, NULL);
302 
303  return hr;
304 }
305 
307  D3DFORMAT adapter_format, D3DFORMAT rt_format, D3DFORMAT ds_format)
308 {
309  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
310  HRESULT hr;
311 
312  TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, rt_format %#x, ds_format %#x.\n",
313  iface, adapter, device_type, adapter_format, rt_format, ds_format);
314 
318  wined3dformat_from_d3dformat(ds_format));
320 
321  return hr;
322 }
323 
324 static HRESULT WINAPI d3d8_GetDeviceCaps(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DCAPS8 *caps)
325 {
326  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
327  WINED3DCAPS wined3d_caps;
328  HRESULT hr;
329 
330  TRACE("iface %p, adapter %u, device_type %#x, caps %p.\n", iface, adapter, device_type, caps);
331 
332  if (!caps)
333  return D3DERR_INVALIDCALL;
334 
336  hr = wined3d_get_device_caps(d3d8->wined3d, adapter, device_type, &wined3d_caps);
338 
339  d3dcaps_from_wined3dcaps(caps, &wined3d_caps);
340 
341  return hr;
342 }
343 
344 static HMONITOR WINAPI d3d8_GetAdapterMonitor(IDirect3D8 *iface, UINT adapter)
345 {
346  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
347  struct wined3d_output_desc desc;
348  HRESULT hr;
349 
350  TRACE("iface %p, adapter %u.\n", iface, adapter);
351 
353  hr = wined3d_get_output_desc(d3d8->wined3d, adapter, &desc);
355 
356  if (FAILED(hr))
357  {
358  WARN("Failed to get output desc, hr %#x.\n", hr);
359  return NULL;
360  }
361 
362  return desc.monitor;
363 }
364 
365 static HRESULT WINAPI d3d8_CreateDevice(IDirect3D8 *iface, UINT adapter,
366  D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters,
367  IDirect3DDevice8 **device)
368 {
369  struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
370  struct d3d8_device *object;
371  HRESULT hr;
372 
373  TRACE("iface %p, adapter %u, device_type %#x, focus_window %p, flags %#x, parameters %p, device %p.\n",
374  iface, adapter, device_type, focus_window, flags, parameters, device);
375 
376  if (!(object = heap_alloc_zero(sizeof(*object))))
377  return E_OUTOFMEMORY;
378 
379  hr = device_init(object, d3d8, d3d8->wined3d, adapter, device_type, focus_window, flags, parameters);
380  if (FAILED(hr))
381  {
382  WARN("Failed to initialize device, hr %#x.\n", hr);
383  heap_free(object);
384  return hr;
385  }
386 
387  TRACE("Created device %p.\n", object);
388  *device = &object->IDirect3DDevice8_iface;
389 
390  return D3D_OK;
391 }
392 
393 static const struct IDirect3D8Vtbl d3d8_vtbl =
394 {
395  /* IUnknown */
397  d3d8_AddRef,
398  d3d8_Release,
399  /* IDirect3D8 */
413 };
414 
416 {
421 
422  d3d8->IDirect3D8_iface.lpVtbl = &d3d8_vtbl;
423  d3d8->refcount = 1;
424 
428  if (!d3d8->wined3d)
429  return FALSE;
430 
431  return TRUE;
432 }
#define WINED3DERR_INVALIDCALL
Definition: wined3d.h:48
static HRESULT WINAPI d3d8_GetAdapterIdentifier(IDirect3D8 *iface, UINT adapter, DWORD flags, D3DADAPTER_IDENTIFIER8 *identifier)
Definition: directx.c:118
wined3d_resource_type
Definition: wined3d.h:695
static UINT WINAPI d3d8_GetAdapterCount(IDirect3D8 *iface)
Definition: directx.c:104
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
static HRESULT WINAPI d3d8_CheckDeviceType(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DFORMAT display_format, D3DFORMAT backbuffer_format, BOOL windowed)
Definition: directx.c:214
#define E_NOINTERFACE
Definition: winerror.h:2364
static HRESULT WINAPI d3d8_RegisterSoftwareDevice(IDirect3D8 *iface, void *init_function)
Definition: directx.c:90
HRESULT CDECL wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UINT adapter_idx, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
Definition: directx.c:4767
HRESULT hr
Definition: shlfolder.c:183
BOOL d3d8_init(struct d3d8 *d3d8)
Definition: directx.c:415
enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN
Definition: device.c:94
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:112
device_type
static HRESULT WINAPI d3d8_GetAdapterDisplayMode(IDirect3D8 *iface, UINT adapter, D3DDISPLAYMODE *mode)
Definition: directx.c:190
#define WINED3D_LEGACY_DEPTH_BIAS
Definition: wined3d.h:1315
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
LONG refcount
Definition: d3d8_private.h:50
#define WINED3D_HANDLE_RESTORE
Definition: wined3d.h:1321
#define D3DERR_INVALIDCALL
HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, DWORD usage, enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id)
Definition: directx.c:5334
HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, WINED3DCAPS *caps)
Definition: directx.c:5659
HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wined3d *wined3d, UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters) DECLSPEC_HIDDEN
Definition: device.c:3279
char Description[MAX_DEVICE_IDENTIFIER_STRING]
Definition: d3d8types.h:997
static HRESULT WINAPI d3d8_CreateDevice(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, IDirect3DDevice8 **device)
Definition: directx.c:365
#define WINED3DUSAGE_MASK
Definition: wined3d.h:913
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
static struct d3d8 * impl_from_IDirect3D8(IDirect3D8 *iface)
Definition: directx.c:38
struct wined3d * wined3d
Definition: d3d8_private.h:51
UINT CDECL wined3d_get_adapter_count(const struct wined3d *wined3d)
Definition: directx.c:4484
struct wined3d *CDECL wined3d_create(DWORD flags)
Definition: wined3d_main.c:97
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
Definition: wined3d.h:1325
HRESULT CDECL wined3d_register_software_device(struct wined3d *wined3d, void *init_function)
Definition: directx.c:4492
unsigned int BOOL
Definition: ntddk_ex.h:94
Definition: devices.h:37
static const WCHAR desc[]
Definition: protectdata.c:36
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, enum wined3d_format_id display_format, enum wined3d_format_id backbuffer_format, BOOL windowed)
Definition: directx.c:5546
enum _D3DFORMAT D3DFORMAT
#define debugstr_guid
Definition: kernel32.h:35
#define WINED3DUSAGE_LEGACY_CUBEMAP
Definition: wined3d.h:917
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
HRESULT CDECL wined3d_get_adapter_identifier(const struct wined3d *wined3d, UINT adapter_idx, DWORD flags, struct wined3d_adapter_identifier *identifier)
Definition: directx.c:4939
LARGE_INTEGER driver_version
Definition: wined3d.h:1719
HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, enum wined3d_format_id surface_format_id, BOOL windowed, enum wined3d_multisample_type multisample_type, DWORD *quality_levels)
Definition: directx.c:5145
#define WINED3D_PIXEL_CENTER_INTEGER
Definition: wined3d.h:1322
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI d3d8_CheckDeviceMultiSampleType(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DFORMAT format, BOOL windowed, D3DMULTISAMPLE_TYPE multisample_type)
Definition: directx.c:285
HRESULT CDECL wined3d_check_depth_stencil_match(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, enum wined3d_format_id render_target_format_id, enum wined3d_format_id depth_stencil_format_id)
Definition: directx.c:5091
ULONG CDECL wined3d_decref(struct wined3d *wined3d)
Definition: directx.c:465
LONG HRESULT
Definition: typedefs.h:78
const GUID IID_IUnknown
void d3dcaps_from_wined3dcaps(D3DCAPS8 *caps, const WINED3DCAPS *wined3d_caps) DECLSPEC_HIDDEN
Definition: device.c:290
static HRESULT WINAPI d3d8_CheckDeviceFormat(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DFORMAT adapter_format, DWORD usage, D3DRESOURCETYPE resource_type, D3DFORMAT format)
Definition: directx.c:234
#define WINAPI
Definition: msvc.h:6
static ULONG WINAPI d3d8_Release(IDirect3D8 *iface)
Definition: directx.c:71
enum _D3DDEVTYPE D3DDEVTYPE
static FILE * out
Definition: regtests2xml.c:44
static HRESULT WINAPI d3d8_GetDeviceCaps(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DCAPS8 *caps)
Definition: directx.c:324
IDirect3D8 IDirect3D8_iface
Definition: d3d8_private.h:49
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WINED3D_LEGACY_CUBEMAP_FILTERING
Definition: wined3d.h:1327
GLbitfield flags
Definition: glext.h:7161
HRESULT CDECL wined3d_get_output_desc(const struct wined3d *wined3d, unsigned int adapter_idx, struct wined3d_output_desc *desc)
Definition: directx.c:4499
#define InterlockedDecrement
Definition: armddk.h:52
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum mode
Definition: glext.h:6217
wined3d_multisample_type
Definition: wined3d.h:552
#define WINED3DUSAGE_QUERY_MASK
Definition: wined3d.h:931
LARGE_INTEGER DriverVersion
Definition: d3d8types.h:999
char Driver[MAX_DEVICE_IDENTIFIER_STRING]
Definition: d3d8types.h:996
static HRESULT WINAPI d3d8_QueryInterface(IDirect3D8 *iface, REFIID riid, void **out)
Definition: directx.c:43
#define S_OK
Definition: intsafe.h:59
#define D3D_OK
Definition: d3d.h:106
#define InterlockedIncrement
Definition: armddk.h:53
enum _D3DMULTISAMPLE_TYPE D3DMULTISAMPLE_TYPE
static HRESULT WINAPI d3d8_CheckDepthStencilMatch(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DFORMAT adapter_format, D3DFORMAT rt_format, D3DFORMAT ds_format)
Definition: directx.c:306
D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN
Definition: device.c:44
static ULONG WINAPI d3d8_AddRef(IDirect3D8 *iface)
Definition: directx.c:61
#define WINED3DERR_NOTAVAILABLE
Definition: wined3d.h:46
#define WINED3DUSAGE_TEXTURE
Definition: wined3d.h:918
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define WINED3D_LIMIT_VIEWPORT
Definition: wined3d.h:1330
HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_format_id format_id, enum wined3d_scanline_ordering scanline_ordering, UINT mode_idx, struct wined3d_display_mode *mode)
Definition: directx.c:4589
UINT CDECL wined3d_get_adapter_mode_count(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_format_id format_id, enum wined3d_scanline_ordering scanline_ordering)
Definition: directx.c:4536
#define WINED3D_NO_PRIMITIVE_RESTART
Definition: wined3d.h:1326
unsigned int ULONG
Definition: retypes.h:1
static HMONITOR WINAPI d3d8_GetAdapterMonitor(IDirect3D8 *iface, UINT adapter)
Definition: directx.c:344
#define IDirect3D8_AddRef(p)
Definition: d3d8.h:160
WINE_DEFAULT_DEBUG_CHANNEL(d3d8)
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
enum wined3d_format_id format_id
Definition: wined3d.h:1584
enum _D3DRESOURCETYPE D3DRESOURCETYPE
void * object
Definition: jmemsys.h:48
#define WINED3D_VIDMEM_ACCOUNTING
Definition: wined3d.h:1317
static HRESULT WINAPI d3d8_EnumAdapterModes(IDirect3D8 *iface, UINT adapter, UINT mode_idx, D3DDISPLAYMODE *mode)
Definition: directx.c:165
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static UINT WINAPI d3d8_GetAdapterModeCount(IDirect3D8 *iface, UINT adapter)
Definition: directx.c:150
static const struct IDirect3D8Vtbl d3d8_vtbl
Definition: directx.c:393