ReactOS 0.4.15-dev-7934-g1dc8d80
surface.c
Go to the documentation of this file.
1/*
2 * IDirect3DSurface9 implementation
3 *
4 * Copyright 2002-2005 Jason Edmeades
5 * Raphael Junqueira
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include "config.h"
23#include "d3d9_private.h"
24
26
27static inline struct d3d9_surface *impl_from_IDirect3DSurface9(IDirect3DSurface9 *iface)
28{
30}
31
32static HRESULT WINAPI d3d9_surface_QueryInterface(IDirect3DSurface9 *iface, REFIID riid, void **out)
33{
34 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
35
36 if (IsEqualGUID(riid, &IID_IDirect3DSurface9)
37 || IsEqualGUID(riid, &IID_IDirect3DResource9)
39 {
41 *out = iface;
42 return S_OK;
43 }
44
45 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
46
47 *out = NULL;
48 return E_NOINTERFACE;
49}
50
51static ULONG WINAPI d3d9_surface_AddRef(IDirect3DSurface9 *iface)
52{
53 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
54 ULONG refcount;
55
56 TRACE("iface %p.\n", iface);
57
58 if (surface->texture)
59 {
60 TRACE("Forwarding to %p.\n", surface->texture);
61 return IDirect3DBaseTexture9_AddRef(&surface->texture->IDirect3DBaseTexture9_iface);
62 }
63
64 refcount = InterlockedIncrement(&surface->resource.refcount);
65 TRACE("%p increasing refcount to %u.\n", iface, refcount);
66
67 if (refcount == 1)
68 {
69 if (surface->parent_device)
72 if (surface->wined3d_rtv)
76 }
77
78 return refcount;
79}
80
81static ULONG WINAPI d3d9_surface_Release(IDirect3DSurface9 *iface)
82{
83 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
84 ULONG refcount;
85
86 TRACE("iface %p.\n", iface);
87
88 if (surface->texture)
89 {
90 TRACE("Forwarding to %p.\n", surface->texture);
91 return IDirect3DBaseTexture9_Release(&surface->texture->IDirect3DBaseTexture9_iface);
92 }
93
94 if (!surface->resource.refcount)
95 {
96 WARN("Surface does not have any references.\n");
97 return 0;
98 }
99
100 refcount = InterlockedDecrement(&surface->resource.refcount);
101 TRACE("%p decreasing refcount to %u.\n", iface, refcount);
102
103 if (!refcount)
104 {
105 IDirect3DDevice9Ex *parent_device = surface->parent_device;
106
108 if (surface->wined3d_rtv)
112
113 /* Release the device last, as it may cause the device to be destroyed. */
114 if (parent_device)
116 }
117
118 return refcount;
119}
120
121static HRESULT WINAPI d3d9_surface_GetDevice(IDirect3DSurface9 *iface, IDirect3DDevice9 **device)
122{
123 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
124
125 TRACE("iface %p, device %p.\n", iface, device);
126
127 if (surface->texture)
128 return IDirect3DBaseTexture9_GetDevice(&surface->texture->IDirect3DBaseTexture9_iface, device);
129
130 *device = (IDirect3DDevice9 *)surface->parent_device;
132
133 TRACE("Returning device %p.\n", *device);
134
135 return D3D_OK;
136}
137
138static HRESULT WINAPI d3d9_surface_SetPrivateData(IDirect3DSurface9 *iface, REFGUID guid,
139 const void *data, DWORD data_size, DWORD flags)
140{
141 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
142 TRACE("iface %p, guid %s, data %p, data_size %u, flags %#x.\n",
143 iface, debugstr_guid(guid), data, data_size, flags);
144
145 return d3d9_resource_set_private_data(&surface->resource, guid, data, data_size, flags);
146}
147
148static HRESULT WINAPI d3d9_surface_GetPrivateData(IDirect3DSurface9 *iface, REFGUID guid,
149 void *data, DWORD *data_size)
150{
151 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
152 TRACE("iface %p, guid %s, data %p, data_size %p.\n",
153 iface, debugstr_guid(guid), data, data_size);
154
155 return d3d9_resource_get_private_data(&surface->resource, guid, data, data_size);
156}
157
158static HRESULT WINAPI d3d9_surface_FreePrivateData(IDirect3DSurface9 *iface, REFGUID guid)
159{
160 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
161 TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid));
162
164}
165
166static DWORD WINAPI d3d9_surface_SetPriority(IDirect3DSurface9 *iface, DWORD priority)
167{
168 TRACE("iface %p, priority %u. Ignored on surfaces.\n", iface, priority);
169 return 0;
170}
171
172static DWORD WINAPI d3d9_surface_GetPriority(IDirect3DSurface9 *iface)
173{
174 TRACE("iface %p. Ignored on surfaces.\n", iface);
175 return 0;
176}
177
178static void WINAPI d3d9_surface_PreLoad(IDirect3DSurface9 *iface)
179{
180 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
181
182 TRACE("iface %p.\n", iface);
183
187}
188
189static D3DRESOURCETYPE WINAPI d3d9_surface_GetType(IDirect3DSurface9 *iface)
190{
191 TRACE("iface %p.\n", iface);
192
193 return D3DRTYPE_SURFACE;
194}
195
196static HRESULT WINAPI d3d9_surface_GetContainer(IDirect3DSurface9 *iface, REFIID riid, void **container)
197{
198 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
199 HRESULT hr;
200
201 TRACE("iface %p, riid %s, container %p.\n", iface, debugstr_guid(riid), container);
202
203 if (!surface->container)
204 return E_NOINTERFACE;
205
206 hr = IUnknown_QueryInterface(surface->container, riid, container);
207
208 TRACE("Returning %p.\n", *container);
209
210 return hr;
211}
212
213static HRESULT WINAPI d3d9_surface_GetDesc(IDirect3DSurface9 *iface, D3DSURFACE_DESC *desc)
214{
215 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
216 struct wined3d_sub_resource_desc wined3d_desc;
217
218 TRACE("iface %p, desc %p.\n", iface, desc);
219
223
224 desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format);
225 desc->Type = D3DRTYPE_SURFACE;
226 desc->Usage = d3dusage_from_wined3dusage(wined3d_desc.usage);
227 desc->Pool = d3dpool_from_wined3daccess(wined3d_desc.access, wined3d_desc.usage);
228 desc->MultiSampleType = wined3d_desc.multisample_type;
229 desc->MultiSampleQuality = wined3d_desc.multisample_quality;
230 desc->Width = wined3d_desc.width;
231 desc->Height = wined3d_desc.height;
232
233 return D3D_OK;
234}
235
236static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface,
237 D3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags)
238{
239 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
240 struct wined3d_box box;
241 struct wined3d_map_desc map_desc;
242 HRESULT hr;
243
244 TRACE("iface %p, locked_rect %p, rect %s, flags %#x.\n",
245 iface, locked_rect, wine_dbgstr_rect(rect), flags);
246
247 if (rect)
248 wined3d_box_set(&box, rect->left, rect->top, rect->right, rect->bottom, 0, 1);
249
254
255 if (SUCCEEDED(hr))
256 {
257 locked_rect->Pitch = map_desc.row_pitch;
258 locked_rect->pBits = map_desc.data;
259 }
260
261 return hr;
262}
263
264static HRESULT WINAPI d3d9_surface_UnlockRect(IDirect3DSurface9 *iface)
265{
266 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
267 HRESULT hr;
268
269 TRACE("iface %p.\n", iface);
270
273 if (SUCCEEDED(hr) && surface->texture)
276
277 if (hr == WINEDDERR_NOTLOCKED)
278 {
280 if (surface->texture)
281 type = IDirect3DBaseTexture9_GetType(&surface->texture->IDirect3DBaseTexture9_iface);
282 else
285 }
286 return hr;
287}
288
289static HRESULT WINAPI d3d9_surface_GetDC(IDirect3DSurface9 *iface, HDC *dc)
290{
291 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
292 HRESULT hr;
293
294 TRACE("iface %p, dc %p.\n", iface, dc);
295
299
300 return hr;
301}
302
303static HRESULT WINAPI d3d9_surface_ReleaseDC(IDirect3DSurface9 *iface, HDC dc)
304{
305 struct d3d9_surface *surface = impl_from_IDirect3DSurface9(iface);
306 HRESULT hr;
307
308 TRACE("iface %p, dc %p.\n", iface, dc);
309
312 if (SUCCEEDED(hr) && surface->texture)
315
316 return hr;
317}
318
319static const struct IDirect3DSurface9Vtbl d3d9_surface_vtbl =
320{
321 /* IUnknown */
325 /* IDirect3DResource9 */
334 /* IDirect3DSurface9 */
341};
342
344{
345 struct d3d9_surface *surface = parent;
347 heap_free(surface);
348}
349
351{
353};
354
356 unsigned int sub_resource_idx, const struct wined3d_parent_ops **parent_ops)
357{
358 IDirect3DBaseTexture9 *texture;
359
361 d3d9_resource_init(&surface->resource);
362 surface->resource.refcount = 0;
363 list_init(&surface->rtv_entry);
366 surface->sub_resource_idx = sub_resource_idx;
367
368 if (surface->container && SUCCEEDED(IUnknown_QueryInterface(surface->container,
369 &IID_IDirect3DBaseTexture9, (void **)&texture)))
370 {
373 }
374
375 *parent_ops = &d3d9_surface_wined3d_parent_ops;
376}
377
379{
380 struct d3d9_surface *surface = parent;
381
382 /* If the surface reference count drops to zero, we release our reference
383 * to the view, but don't clear the pointer yet, in case e.g. a
384 * GetRenderTarget() call brings the surface back before the view is
385 * actually destroyed. When the view is destroyed, we need to clear the
386 * pointer, or a subsequent surface AddRef() would reference it again.
387 *
388 * This is safe because as long as the view still has a reference to the
389 * texture, the surface is also still alive, and we're called before the
390 * view releases that reference. */
391 surface->wined3d_rtv = NULL;
392 list_remove(&surface->rtv_entry);
393}
394
396{
398};
399
401{
402 IDirect3DDevice9Ex *device;
403 device = surface->texture ? surface->texture->parent_device : surface->parent_device;
405}
406
408{
409 HRESULT hr;
410
411 /* The surface reference count can be equal to 0 when this function is
412 * called. In order to properly manage the render target view reference
413 * count, we temporarily increment the surface reference count. */
415
416 if (surface->wined3d_rtv)
417 return surface->wined3d_rtv;
418
420 surface->sub_resource_idx, surface, &d3d9_view_wined3d_parent_ops, &surface->wined3d_rtv)))
421 {
422 ERR("Failed to create rendertarget view, hr %#x.\n", hr);
424 return NULL;
425 }
426
427 if (surface->texture)
428 list_add_head(&surface->texture->rtv_list, &surface->rtv_entry);
429
430 return surface->wined3d_rtv;
431}
432
434 struct wined3d_rendertarget_view *rtv)
435{
436 if (rtv)
438}
439
440struct d3d9_surface *unsafe_impl_from_IDirect3DSurface9(IDirect3DSurface9 *iface)
441{
442 if (!iface)
443 return NULL;
444 assert(iface->lpVtbl == &d3d9_surface_vtbl);
445
446 return impl_from_IDirect3DSurface9(iface);
447}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
static void list_init(struct list_entry *head)
Definition: list.h:51
const GUID IID_IUnknown
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
unsigned int wined3dmapflags_from_d3dmapflags(unsigned int flags) DECLSPEC_HIDDEN
Definition: device.c:144
D3DFORMAT d3dformat_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN
Definition: device.c:44
static DWORD d3dusage_from_wined3dusage(unsigned int usage)
Definition: d3d8_private.h:280
static D3DPOOL d3dpool_from_wined3daccess(unsigned int access, unsigned int usage)
Definition: d3d8_private.h:285
enum _D3DRESOURCETYPE D3DRESOURCETYPE
@ D3DRTYPE_TEXTURE
Definition: d3d8types.h:812
@ D3DRTYPE_SURFACE
Definition: d3d8types.h:810
#define IDirect3DDevice9Ex_Release(p)
Definition: d3d9.h:1917
#define IDirect3DBaseTexture9_GetDevice(p, a)
Definition: d3d9.h:837
#define IDirect3DSurface9_AddRef(p)
Definition: d3d9.h:621
#define IDirect3DDevice9Ex_AddRef(p)
Definition: d3d9.h:1916
#define IDirect3DBaseTexture9_Release(p)
Definition: d3d9.h:835
#define IDirect3DBaseTexture9_AddRef(p)
Definition: d3d9.h:834
#define IDirect3DDevice9_AddRef(p)
Definition: d3d9.h:1507
#define IDirect3DBaseTexture9_GetType(p)
Definition: d3d9.h:844
void d3d9_resource_init(struct d3d9_resource *resource)
Definition: d3d9_main.c:216
HRESULT d3d9_resource_free_private_data(struct d3d9_resource *resource, const GUID *guid)
Definition: d3d9_main.c:160
HRESULT d3d9_resource_set_private_data(struct d3d9_resource *resource, const GUID *guid, const void *data, DWORD data_size, DWORD flags)
Definition: d3d9_main.c:222
void d3d9_resource_cleanup(struct d3d9_resource *resource)
Definition: d3d9_main.c:155
HRESULT d3d9_resource_get_private_data(struct d3d9_resource *resource, const GUID *guid, void *data, DWORD *data_size)
Definition: d3d9_main.c:178
#define D3D_OK
Definition: d3d.h:106
#define D3DERR_INVALIDCALL
#define NULL
Definition: types.h:112
static void STDMETHODCALLTYPE surface_wined3d_object_destroyed(void *parent)
Definition: surface.c:305
static void STDMETHODCALLTYPE view_wined3d_object_destroyed(void *parent)
Definition: surface.c:340
void surface_init(struct d3d8_surface *surface, struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, const struct wined3d_parent_ops **parent_ops)
Definition: surface.c:317
void d3d9_surface_release_rendertarget_view(struct d3d9_surface *surface, struct wined3d_rendertarget_view *rtv)
Definition: surface.c:433
struct d3d9_device * d3d9_surface_get_device(const struct d3d9_surface *surface)
Definition: surface.c:400
static const struct IDirect3DSurface9Vtbl d3d9_surface_vtbl
Definition: surface.c:319
static D3DRESOURCETYPE WINAPI d3d9_surface_GetType(IDirect3DSurface9 *iface)
Definition: surface.c:189
static HRESULT WINAPI d3d9_surface_GetPrivateData(IDirect3DSurface9 *iface, REFGUID guid, void *data, DWORD *data_size)
Definition: surface.c:148
static HRESULT WINAPI d3d9_surface_GetDesc(IDirect3DSurface9 *iface, D3DSURFACE_DESC *desc)
Definition: surface.c:213
static HRESULT WINAPI d3d9_surface_GetDC(IDirect3DSurface9 *iface, HDC *dc)
Definition: surface.c:289
static HRESULT WINAPI d3d9_surface_QueryInterface(IDirect3DSurface9 *iface, REFIID riid, void **out)
Definition: surface.c:32
static HRESULT WINAPI d3d9_surface_GetDevice(IDirect3DSurface9 *iface, IDirect3DDevice9 **device)
Definition: surface.c:121
static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface, D3DLOCKED_RECT *locked_rect, const RECT *rect, DWORD flags)
Definition: surface.c:236
static const struct wined3d_parent_ops d3d9_view_wined3d_parent_ops
Definition: surface.c:395
static HRESULT WINAPI d3d9_surface_SetPrivateData(IDirect3DSurface9 *iface, REFGUID guid, const void *data, DWORD data_size, DWORD flags)
Definition: surface.c:138
struct wined3d_rendertarget_view * d3d9_surface_acquire_rendertarget_view(struct d3d9_surface *surface)
Definition: surface.c:407
static DWORD WINAPI d3d9_surface_SetPriority(IDirect3DSurface9 *iface, DWORD priority)
Definition: surface.c:166
struct d3d9_surface * unsafe_impl_from_IDirect3DSurface9(IDirect3DSurface9 *iface)
Definition: surface.c:440
static ULONG WINAPI d3d9_surface_AddRef(IDirect3DSurface9 *iface)
Definition: surface.c:51
static void WINAPI d3d9_surface_PreLoad(IDirect3DSurface9 *iface)
Definition: surface.c:178
static HRESULT WINAPI d3d9_surface_FreePrivateData(IDirect3DSurface9 *iface, REFGUID guid)
Definition: surface.c:158
static HRESULT WINAPI d3d9_surface_UnlockRect(IDirect3DSurface9 *iface)
Definition: surface.c:264
static HRESULT WINAPI d3d9_surface_GetContainer(IDirect3DSurface9 *iface, REFIID riid, void **container)
Definition: surface.c:196
static struct d3d9_surface * impl_from_IDirect3DSurface9(IDirect3DSurface9 *iface)
Definition: surface.c:27
static HRESULT WINAPI d3d9_surface_ReleaseDC(IDirect3DSurface9 *iface, HDC dc)
Definition: surface.c:303
static const struct wined3d_parent_ops d3d9_surface_wined3d_parent_ops
Definition: surface.c:350
static DWORD WINAPI d3d9_surface_GetPriority(IDirect3DSurface9 *iface)
Definition: surface.c:172
static ULONG WINAPI d3d9_surface_Release(IDirect3DSurface9 *iface)
Definition: surface.c:81
void CDECL wined3d_resource_preload(struct wined3d_resource *resource)
Definition: resource.c:482
HRESULT CDECL wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
Definition: resource.c:382
HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
Definition: resource.c:344
void *CDECL wined3d_texture_get_parent(const struct wined3d_texture *texture)
Definition: texture.c:1121
HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc)
Definition: texture.c:3623
HRESULT CDECL wined3d_texture_get_sub_resource_desc(const struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_sub_resource_desc *desc)
Definition: texture.c:3480
struct wined3d_resource *CDECL wined3d_texture_get_resource(struct wined3d_texture *texture)
Definition: texture.c:1052
ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
Definition: texture.c:1023
ULONG CDECL wined3d_texture_incref(struct wined3d_texture *texture)
Definition: texture.c:994
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
Definition: texture.c:3671
HRESULT CDECL wined3d_rendertarget_view_create_from_sub_resource(struct wined3d_texture *texture, unsigned int sub_resource_idx, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_rendertarget_view **view)
Definition: view.c:624
ULONG CDECL wined3d_rendertarget_view_incref(struct wined3d_rendertarget_view *view)
Definition: view.c:318
ULONG CDECL wined3d_rendertarget_view_decref(struct wined3d_rendertarget_view *view)
Definition: view.c:348
#define assert(x)
Definition: debug.h:53
r parent
Definition: btrfs.c:3010
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLenum GLuint texture
Definition: glext.h:6295
GLbitfield flags
Definition: glext.h:7161
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
static const WCHAR dc[]
const GUID * guid
static HDC
Definition: imagelist.c:92
static const WCHAR desc[]
Definition: protectdata.c:36
static int priority
Definition: timer.c:163
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
static FILE * out
Definition: regtests2xml.c:44
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
& rect
Definition: startmenu.cpp:1413
Definition: scsiwmi.h:51
Definition: palette.c:468
IUnknown * container
Definition: d3d9_private.h:166
IDirect3DDevice9Ex * parent_device
Definition: d3d9_private.h:165
struct wined3d_texture * wined3d_texture
Definition: d3d9_private.h:161
struct list rtv_entry
Definition: d3d9_private.h:163
IDirect3DSurface9 IDirect3DSurface9_iface
Definition: d3d9_private.h:159
struct d3d9_resource resource
Definition: d3d9_private.h:160
struct wined3d_rendertarget_view * wined3d_rtv
Definition: d3d9_private.h:164
struct d3d9_texture * texture
Definition: d3d9_private.h:167
unsigned int sub_resource_idx
Definition: d3d9_private.h:162
Definition: devices.h:37
enum wined3d_format_id format
Definition: wined3d.h:1766
unsigned int multisample_quality
Definition: wined3d.h:1768
enum wined3d_multisample_type multisample_type
Definition: wined3d.h:1767
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
static struct d3d9_device * impl_from_IDirect3DDevice9Ex(IDirect3DDevice9Ex *iface)
Definition: d3d9_private.h:289
struct d3d9_texture * unsafe_impl_from_IDirect3DBaseTexture9(IDirect3DBaseTexture9 *iface) DECLSPEC_HIDDEN
Definition: texture.c:1269
void d3d9_texture_flag_auto_gen_mipmap(struct d3d9_texture *texture) DECLSPEC_HIDDEN
Definition: texture.c:108
#define WINEDDERR_NOTLOCKED
Definition: wined3d.h:50
static void wined3d_box_set(struct wined3d_box *box, unsigned int left, unsigned int top, unsigned int right, unsigned int bottom, unsigned int front, unsigned int back)
Definition: wined3d.h:2789
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define E_NOINTERFACE
Definition: winerror.h:2364