ReactOS 0.4.15-dev-6680-g8c76870
directx.c File Reference
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "d3d8_private.h"
Include dependency graph for directx.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (d3d8)
 
static struct d3d8impl_from_IDirect3D8 (IDirect3D8 *iface)
 
static HRESULT WINAPI d3d8_QueryInterface (IDirect3D8 *iface, REFIID riid, void **out)
 
static ULONG WINAPI d3d8_AddRef (IDirect3D8 *iface)
 
static ULONG WINAPI d3d8_Release (IDirect3D8 *iface)
 
static HRESULT WINAPI d3d8_RegisterSoftwareDevice (IDirect3D8 *iface, void *init_function)
 
static UINT WINAPI d3d8_GetAdapterCount (IDirect3D8 *iface)
 
static HRESULT WINAPI d3d8_GetAdapterIdentifier (IDirect3D8 *iface, UINT adapter, DWORD flags, D3DADAPTER_IDENTIFIER8 *identifier)
 
static UINT WINAPI d3d8_GetAdapterModeCount (IDirect3D8 *iface, UINT adapter)
 
static HRESULT WINAPI d3d8_EnumAdapterModes (IDirect3D8 *iface, UINT adapter, UINT mode_idx, D3DDISPLAYMODE *mode)
 
static HRESULT WINAPI d3d8_GetAdapterDisplayMode (IDirect3D8 *iface, UINT adapter, D3DDISPLAYMODE *mode)
 
static HRESULT WINAPI d3d8_CheckDeviceType (IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DFORMAT display_format, D3DFORMAT backbuffer_format, BOOL windowed)
 
static HRESULT WINAPI d3d8_CheckDeviceFormat (IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DFORMAT adapter_format, DWORD usage, D3DRESOURCETYPE resource_type, D3DFORMAT format)
 
static HRESULT WINAPI d3d8_CheckDeviceMultiSampleType (IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DFORMAT format, BOOL windowed, D3DMULTISAMPLE_TYPE multisample_type)
 
static HRESULT WINAPI d3d8_CheckDepthStencilMatch (IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DFORMAT adapter_format, D3DFORMAT rt_format, D3DFORMAT ds_format)
 
static HRESULT WINAPI d3d8_GetDeviceCaps (IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DCAPS8 *caps)
 
static HMONITOR WINAPI d3d8_GetAdapterMonitor (IDirect3D8 *iface, UINT adapter)
 
static HRESULT WINAPI d3d8_CreateDevice (IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters, IDirect3DDevice8 **device)
 
BOOL d3d8_init (struct d3d8 *d3d8)
 

Variables

static const struct IDirect3D8Vtbl d3d8_vtbl
 

Function Documentation

◆ d3d8_AddRef()

static ULONG WINAPI d3d8_AddRef ( IDirect3D8 *  iface)
static

Definition at line 61 of file directx.c.

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}
#define InterlockedIncrement
Definition: armddk.h:53
static struct d3d8 * impl_from_IDirect3D8(IDirect3D8 *iface)
Definition: directx.c:38
#define TRACE(s)
Definition: solgame.cpp:4
LONG refcount
Definition: d3d8_private.h:50
uint32_t ULONG
Definition: typedefs.h:59

◆ d3d8_CheckDepthStencilMatch()

static HRESULT WINAPI d3d8_CheckDepthStencilMatch ( IDirect3D8 *  iface,
UINT  adapter,
D3DDEVTYPE  device_type,
D3DFORMAT  adapter_format,
D3DFORMAT  rt_format,
D3DFORMAT  ds_format 
)
static

Definition at line 306 of file directx.c.

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
320
321 return hr;
322}
enum wined3d_format_id wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN
Definition: device.c:94
device_type
return adapter
HRESULT hr
Definition: shlfolder.c:183
struct wined3d * wined3d
Definition: d3d8_private.h:51
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
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368

◆ d3d8_CheckDeviceFormat()

static HRESULT WINAPI d3d8_CheckDeviceFormat ( IDirect3D8 *  iface,
UINT  adapter,
D3DDEVTYPE  device_type,
D3DFORMAT  adapter_format,
DWORD  usage,
D3DRESOURCETYPE  resource_type,
D3DFORMAT  format 
)
static

Definition at line 234 of file directx.c.

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);
275 }
276
279 usage, wined3d_rtype, wined3dformat_from_d3dformat(format));
281
282 return hr;
283}
#define FIXME(fmt,...)
Definition: debug.h:111
#define WARN(fmt,...)
Definition: debug.h:112
@ D3DRTYPE_INDEXBUFFER
Definition: d3d8types.h:816
@ D3DRTYPE_TEXTURE
Definition: d3d8types.h:812
@ D3DRTYPE_VOLUMETEXTURE
Definition: d3d8types.h:813
@ D3DRTYPE_CUBETEXTURE
Definition: d3d8types.h:814
@ D3DRTYPE_VOLUME
Definition: d3d8types.h:811
@ D3DRTYPE_SURFACE
Definition: d3d8types.h:810
@ D3DRTYPE_VERTEXBUFFER
Definition: d3d8types.h:815
#define D3DERR_INVALIDCALL
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
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
#define WINED3DUSAGE_QUERY_MASK
Definition: wined3d.h:931
#define WINED3DUSAGE_LEGACY_CUBEMAP
Definition: wined3d.h:917
wined3d_resource_type
Definition: wined3d.h:696
@ WINED3D_RTYPE_TEXTURE_2D
Definition: wined3d.h:700
@ WINED3D_RTYPE_BUFFER
Definition: wined3d.h:698
@ WINED3D_RTYPE_TEXTURE_3D
Definition: wined3d.h:701
#define WINED3DUSAGE_MASK
Definition: wined3d.h:913
#define WINED3DERR_INVALIDCALL
Definition: wined3d.h:48
#define WINED3DUSAGE_TEXTURE
Definition: wined3d.h:918

◆ d3d8_CheckDeviceMultiSampleType()

static HRESULT WINAPI d3d8_CheckDeviceMultiSampleType ( IDirect3D8 *  iface,
UINT  adapter,
D3DDEVTYPE  device_type,
D3DFORMAT  format,
BOOL  windowed,
D3DMULTISAMPLE_TYPE  multisample_type 
)
static

Definition at line 285 of file directx.c.

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}
@ D3DMULTISAMPLE_16_SAMPLES
Definition: d3d8types.h:687
#define NULL
Definition: types.h:112
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
wined3d_multisample_type
Definition: wined3d.h:553

◆ d3d8_CheckDeviceType()

static HRESULT WINAPI d3d8_CheckDeviceType ( IDirect3D8 *  iface,
UINT  adapter,
D3DDEVTYPE  device_type,
D3DFORMAT  display_format,
D3DFORMAT  backbuffer_format,
BOOL  windowed 
)
static

Definition at line 214 of file directx.c.

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}
@ D3DFMT_R5G6B5
Definition: d3d8types.h:606
@ D3DFMT_X8R8G8B8
Definition: d3d8types.h:605
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
#define WINED3DERR_NOTAVAILABLE
Definition: wined3d.h:46

◆ d3d8_CreateDevice()

static HRESULT WINAPI d3d8_CreateDevice ( IDirect3D8 *  iface,
UINT  adapter,
D3DDEVTYPE  device_type,
HWND  focus_window,
DWORD  flags,
D3DPRESENT_PARAMETERS parameters,
IDirect3DDevice8 **  device 
)
static

Definition at line 365 of file directx.c.

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}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
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
#define D3D_OK
Definition: d3d.h:106
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
GLbitfield flags
Definition: glext.h:7161
#define FAILED(hr)
Definition: intsafe.h:51
Definition: devices.h:37

◆ d3d8_EnumAdapterModes()

static HRESULT WINAPI d3d8_EnumAdapterModes ( IDirect3D8 *  iface,
UINT  adapter,
UINT  mode_idx,
D3DDISPLAYMODE mode 
)
static

Definition at line 165 of file directx.c.

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}
D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN
Definition: device.c:44
GLenum mode
Definition: glext.h:6217
#define SUCCEEDED(hr)
Definition: intsafe.h:50
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
@ WINED3DFMT_UNKNOWN
Definition: wined3d.h:107
@ WINED3D_SCANLINE_ORDERING_UNKNOWN
Definition: wined3d.h:832

◆ d3d8_GetAdapterCount()

static UINT WINAPI d3d8_GetAdapterCount ( IDirect3D8 *  iface)
static

Definition at line 104 of file directx.c.

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}
UINT CDECL wined3d_get_adapter_count(const struct wined3d *wined3d)
Definition: directx.c:4484

◆ d3d8_GetAdapterDisplayMode()

static HRESULT WINAPI d3d8_GetAdapterDisplayMode ( IDirect3D8 *  iface,
UINT  adapter,
D3DDISPLAYMODE mode 
)
static

Definition at line 190 of file directx.c.

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
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}
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

◆ d3d8_GetAdapterIdentifier()

static HRESULT WINAPI d3d8_GetAdapterIdentifier ( IDirect3D8 *  iface,
UINT  adapter,
DWORD  flags,
D3DADAPTER_IDENTIFIER8 identifier 
)
static

Definition at line 118 of file directx.c.

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
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}
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
LARGE_INTEGER DriverVersion
Definition: d3d8types.h:999
char Driver[MAX_DEVICE_IDENTIFIER_STRING]
Definition: d3d8types.h:996
char Description[MAX_DEVICE_IDENTIFIER_STRING]
Definition: d3d8types.h:997
HRESULT CDECL wined3d_get_adapter_identifier(const struct wined3d *wined3d, UINT adapter_idx, DWORD flags, struct wined3d_adapter_identifier *identifier)
Definition: directx.c:4939

◆ d3d8_GetAdapterModeCount()

static UINT WINAPI d3d8_GetAdapterModeCount ( IDirect3D8 *  iface,
UINT  adapter 
)
static

Definition at line 150 of file directx.c.

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}
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

◆ d3d8_GetAdapterMonitor()

static HMONITOR WINAPI d3d8_GetAdapterMonitor ( IDirect3D8 *  iface,
UINT  adapter 
)
static

Definition at line 344 of file directx.c.

345{
346 struct d3d8 *d3d8 = impl_from_IDirect3D8(iface);
348 HRESULT hr;
349
350 TRACE("iface %p, adapter %u.\n", iface, adapter);
351
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}
static const WCHAR desc[]
Definition: protectdata.c:36
HRESULT CDECL wined3d_get_output_desc(const struct wined3d *wined3d, unsigned int adapter_idx, struct wined3d_output_desc *desc)
Definition: directx.c:4499

◆ d3d8_GetDeviceCaps()

static HRESULT WINAPI d3d8_GetDeviceCaps ( IDirect3D8 *  iface,
UINT  adapter,
D3DDEVTYPE  device_type,
D3DCAPS8 caps 
)
static

Definition at line 324 of file directx.c.

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
338
339 d3dcaps_from_wined3dcaps(caps, &wined3d_caps);
340
341 return hr;
342}
void d3dcaps_from_wined3dcaps(D3DCAPS8 *caps, const WINED3DCAPS *wined3d_caps) DECLSPEC_HIDDEN
Definition: device.c:290
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

◆ d3d8_init()

BOOL d3d8_init ( struct d3d8 d3d8)

Definition at line 415 of file directx.c.

416{
421
423 d3d8->refcount = 1;
424
428 if (!d3d8->wined3d)
429 return FALSE;
430
431 return TRUE;
432}
static const struct IDirect3D8Vtbl d3d8_vtbl
Definition: directx.c:393
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned long DWORD
Definition: ntddk_ex.h:95
IDirect3D8 IDirect3D8_iface
Definition: d3d8_private.h:49
#define WINED3D_LIMIT_VIEWPORT
Definition: wined3d.h:1330
#define WINED3D_VIDMEM_ACCOUNTING
Definition: wined3d.h:1317
#define WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
Definition: wined3d.h:1325
#define WINED3D_HANDLE_RESTORE
Definition: wined3d.h:1321
#define WINED3D_NO_PRIMITIVE_RESTART
Definition: wined3d.h:1326
#define WINED3D_LEGACY_DEPTH_BIAS
Definition: wined3d.h:1315
#define WINED3D_PIXEL_CENTER_INTEGER
Definition: wined3d.h:1322
#define WINED3D_LEGACY_CUBEMAP_FILTERING
Definition: wined3d.h:1327
struct wined3d *CDECL wined3d_create(DWORD flags)
Definition: wined3d_main.c:97

Referenced by Direct3DCreate8().

◆ d3d8_QueryInterface()

static HRESULT WINAPI d3d8_QueryInterface ( IDirect3D8 *  iface,
REFIID  riid,
void **  out 
)
static

Definition at line 43 of file directx.c.

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}
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
static FILE * out
Definition: regtests2xml.c:44
#define IDirect3D8_AddRef(p)
Definition: d3d8.h:160
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ d3d8_RegisterSoftwareDevice()

static HRESULT WINAPI d3d8_RegisterSoftwareDevice ( IDirect3D8 *  iface,
void init_function 
)
static

Definition at line 90 of file directx.c.

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}
HRESULT CDECL wined3d_register_software_device(struct wined3d *wined3d, void *init_function)
Definition: directx.c:4492

◆ d3d8_Release()

static ULONG WINAPI d3d8_Release ( IDirect3D8 *  iface)
static

Definition at line 71 of file directx.c.

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
85 }
86
87 return refcount;
88}
#define InterlockedDecrement
Definition: armddk.h:52
ULONG CDECL wined3d_decref(struct wined3d *wined3d)
Definition: directx.c:465

◆ impl_from_IDirect3D8()

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( d3d8  )

Variable Documentation

◆ d3d8_vtbl

const struct IDirect3D8Vtbl d3d8_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI d3d8_GetDeviceCaps(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DCAPS8 *caps)
Definition: directx.c:324
static ULONG WINAPI d3d8_Release(IDirect3D8 *iface)
Definition: directx.c:71
static UINT WINAPI d3d8_GetAdapterCount(IDirect3D8 *iface)
Definition: directx.c:104
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
static HRESULT WINAPI d3d8_EnumAdapterModes(IDirect3D8 *iface, UINT adapter, UINT mode_idx, D3DDISPLAYMODE *mode)
Definition: directx.c:165
static HRESULT WINAPI d3d8_CheckDeviceMultiSampleType(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DFORMAT format, BOOL windowed, D3DMULTISAMPLE_TYPE multisample_type)
Definition: directx.c:285
static HRESULT WINAPI d3d8_CheckDeviceType(IDirect3D8 *iface, UINT adapter, D3DDEVTYPE device_type, D3DFORMAT display_format, D3DFORMAT backbuffer_format, BOOL windowed)
Definition: directx.c:214
static HRESULT WINAPI d3d8_GetAdapterIdentifier(IDirect3D8 *iface, UINT adapter, DWORD flags, D3DADAPTER_IDENTIFIER8 *identifier)
Definition: directx.c:118
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
static ULONG WINAPI d3d8_AddRef(IDirect3D8 *iface)
Definition: directx.c:61
static HRESULT WINAPI d3d8_RegisterSoftwareDevice(IDirect3D8 *iface, void *init_function)
Definition: directx.c:90
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
static HMONITOR WINAPI d3d8_GetAdapterMonitor(IDirect3D8 *iface, UINT adapter)
Definition: directx.c:344
static HRESULT WINAPI d3d8_QueryInterface(IDirect3D8 *iface, REFIID riid, void **out)
Definition: directx.c:43
static HRESULT WINAPI d3d8_GetAdapterDisplayMode(IDirect3D8 *iface, UINT adapter, D3DDISPLAYMODE *mode)
Definition: directx.c:190
static UINT WINAPI d3d8_GetAdapterModeCount(IDirect3D8 *iface, UINT adapter)
Definition: directx.c:150

Definition at line 393 of file directx.c.

Referenced by d3d8_init().