VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9_private.h@ 39605

最後變更 在這個檔案從39605是 35650,由 vboxsync 提交於 14 年 前

wddm/3d: cube texture support fixes + some cleanup & refactoring

  • 屬性 svn:eol-style 設為 native
檔案大小: 24.5 KB
 
1/*
2 * Direct3D 9 private include file
3 *
4 * Copyright 2002-2003 Jason Edmeades
5 * Copyright 2002-2003 Raphael Junqueira
6 * Copyright 2005 Oliver Stieber
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/*
24 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
25 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
26 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
27 * a choice of LGPL license versions is made available with the language indicating
28 * that LGPLv2 or any later version may be used, or where a choice of which version
29 * of the LGPL is applied is otherwise unspecified.
30 */
31
32#ifndef __WINE_D3D9_PRIVATE_H
33#define __WINE_D3D9_PRIVATE_H
34
35#include <stdarg.h>
36
37#define NONAMELESSUNION
38#define NONAMELESSSTRUCT
39#define COBJMACROS
40#include "windef.h"
41#include "winbase.h"
42#include "wingdi.h"
43#include "winuser.h"
44#include "wine/debug.h"
45#include "wine/unicode.h"
46
47#include "d3d9.h"
48#include "wine/wined3d.h"
49
50#ifdef VBOX_WITH_WDDM
51#include "../vbox/VBoxWineEx.h"
52#endif
53
54/* ===========================================================================
55 Internal use
56 =========================================================================== */
57extern HRESULT vdecl_convert_fvf(DWORD FVF, D3DVERTEXELEMENT9 **ppVertexElements) DECLSPEC_HIDDEN;
58D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format) DECLSPEC_HIDDEN;
59WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN;
60
61/* ===========================================================================
62 Macros
63 =========================================================================== */
64/* Not nice, but it lets wined3d support different versions of directx */
65#define WINECAPSTOD3D9CAPS(_pD3D9Caps, _pWineCaps) \
66 _pD3D9Caps->DeviceType = (D3DDEVTYPE) _pWineCaps->DeviceType; \
67 _pD3D9Caps->AdapterOrdinal = _pWineCaps->AdapterOrdinal; \
68 _pD3D9Caps->Caps = _pWineCaps->Caps; \
69 _pD3D9Caps->Caps2 = _pWineCaps->Caps2; \
70 _pD3D9Caps->Caps3 = _pWineCaps->Caps3; \
71 _pD3D9Caps->PresentationIntervals = _pWineCaps->PresentationIntervals; \
72 _pD3D9Caps->CursorCaps = _pWineCaps->CursorCaps; \
73 _pD3D9Caps->DevCaps = _pWineCaps->DevCaps; \
74 _pD3D9Caps->PrimitiveMiscCaps = _pWineCaps->PrimitiveMiscCaps; \
75 _pD3D9Caps->RasterCaps = _pWineCaps->RasterCaps; \
76 _pD3D9Caps->ZCmpCaps = _pWineCaps->ZCmpCaps; \
77 _pD3D9Caps->SrcBlendCaps = _pWineCaps->SrcBlendCaps; \
78 _pD3D9Caps->DestBlendCaps = _pWineCaps->DestBlendCaps; \
79 _pD3D9Caps->AlphaCmpCaps = _pWineCaps->AlphaCmpCaps; \
80 _pD3D9Caps->ShadeCaps = _pWineCaps->ShadeCaps; \
81 _pD3D9Caps->TextureCaps = _pWineCaps->TextureCaps; \
82 _pD3D9Caps->TextureFilterCaps = _pWineCaps->TextureFilterCaps; \
83 _pD3D9Caps->CubeTextureFilterCaps = _pWineCaps->CubeTextureFilterCaps; \
84 _pD3D9Caps->VolumeTextureFilterCaps = _pWineCaps->VolumeTextureFilterCaps; \
85 _pD3D9Caps->TextureAddressCaps = _pWineCaps->TextureAddressCaps; \
86 _pD3D9Caps->VolumeTextureAddressCaps = _pWineCaps->VolumeTextureAddressCaps; \
87 _pD3D9Caps->LineCaps = _pWineCaps->LineCaps; \
88 _pD3D9Caps->MaxTextureWidth = _pWineCaps->MaxTextureWidth; \
89 _pD3D9Caps->MaxTextureHeight = _pWineCaps->MaxTextureHeight; \
90 _pD3D9Caps->MaxVolumeExtent = _pWineCaps->MaxVolumeExtent; \
91 _pD3D9Caps->MaxTextureRepeat = _pWineCaps->MaxTextureRepeat; \
92 _pD3D9Caps->MaxTextureAspectRatio = _pWineCaps->MaxTextureAspectRatio; \
93 _pD3D9Caps->MaxAnisotropy = _pWineCaps->MaxAnisotropy; \
94 _pD3D9Caps->MaxVertexW = _pWineCaps->MaxVertexW; \
95 _pD3D9Caps->GuardBandLeft = _pWineCaps->GuardBandLeft; \
96 _pD3D9Caps->GuardBandTop = _pWineCaps->GuardBandTop; \
97 _pD3D9Caps->GuardBandRight = _pWineCaps->GuardBandRight; \
98 _pD3D9Caps->GuardBandBottom = _pWineCaps->GuardBandBottom; \
99 _pD3D9Caps->ExtentsAdjust = _pWineCaps->ExtentsAdjust; \
100 _pD3D9Caps->StencilCaps = _pWineCaps->StencilCaps; \
101 _pD3D9Caps->FVFCaps = _pWineCaps->FVFCaps; \
102 _pD3D9Caps->TextureOpCaps = _pWineCaps->TextureOpCaps; \
103 _pD3D9Caps->MaxTextureBlendStages = _pWineCaps->MaxTextureBlendStages; \
104 _pD3D9Caps->MaxSimultaneousTextures = _pWineCaps->MaxSimultaneousTextures; \
105 _pD3D9Caps->VertexProcessingCaps = _pWineCaps->VertexProcessingCaps; \
106 _pD3D9Caps->MaxActiveLights = _pWineCaps->MaxActiveLights; \
107 _pD3D9Caps->MaxUserClipPlanes = _pWineCaps->MaxUserClipPlanes; \
108 _pD3D9Caps->MaxVertexBlendMatrices = _pWineCaps->MaxVertexBlendMatrices; \
109 _pD3D9Caps->MaxVertexBlendMatrixIndex = _pWineCaps->MaxVertexBlendMatrixIndex; \
110 _pD3D9Caps->MaxPointSize = _pWineCaps->MaxPointSize; \
111 _pD3D9Caps->MaxPrimitiveCount = _pWineCaps->MaxPrimitiveCount; \
112 _pD3D9Caps->MaxVertexIndex = _pWineCaps->MaxVertexIndex; \
113 _pD3D9Caps->MaxStreams = _pWineCaps->MaxStreams; \
114 _pD3D9Caps->MaxStreamStride = _pWineCaps->MaxStreamStride; \
115 _pD3D9Caps->VertexShaderVersion = _pWineCaps->VertexShaderVersion; \
116 _pD3D9Caps->MaxVertexShaderConst = _pWineCaps->MaxVertexShaderConst; \
117 _pD3D9Caps->PixelShaderVersion = _pWineCaps->PixelShaderVersion; \
118 _pD3D9Caps->PixelShader1xMaxValue = _pWineCaps->PixelShader1xMaxValue; \
119 _pD3D9Caps->DevCaps2 = _pWineCaps->DevCaps2; \
120 _pD3D9Caps->MaxNpatchTessellationLevel = _pWineCaps->MaxNpatchTessellationLevel; \
121 _pD3D9Caps->MasterAdapterOrdinal = _pWineCaps->MasterAdapterOrdinal; \
122 _pD3D9Caps->AdapterOrdinalInGroup = _pWineCaps->AdapterOrdinalInGroup; \
123 _pD3D9Caps->NumberOfAdaptersInGroup = _pWineCaps->NumberOfAdaptersInGroup; \
124 _pD3D9Caps->DeclTypes = _pWineCaps->DeclTypes; \
125 _pD3D9Caps->NumSimultaneousRTs = _pWineCaps->NumSimultaneousRTs; \
126 _pD3D9Caps->StretchRectFilterCaps = _pWineCaps->StretchRectFilterCaps; \
127 _pD3D9Caps->VS20Caps.Caps = _pWineCaps->VS20Caps.Caps; \
128 _pD3D9Caps->VS20Caps.DynamicFlowControlDepth = _pWineCaps->VS20Caps.DynamicFlowControlDepth; \
129 _pD3D9Caps->VS20Caps.NumTemps = _pWineCaps->VS20Caps.NumTemps; \
130 _pD3D9Caps->VS20Caps.NumTemps = _pWineCaps->VS20Caps.NumTemps; \
131 _pD3D9Caps->VS20Caps.StaticFlowControlDepth = _pWineCaps->VS20Caps.StaticFlowControlDepth; \
132 _pD3D9Caps->PS20Caps.Caps = _pWineCaps->PS20Caps.Caps; \
133 _pD3D9Caps->PS20Caps.DynamicFlowControlDepth = _pWineCaps->PS20Caps.DynamicFlowControlDepth; \
134 _pD3D9Caps->PS20Caps.NumTemps = _pWineCaps->PS20Caps.NumTemps; \
135 _pD3D9Caps->PS20Caps.StaticFlowControlDepth = _pWineCaps->PS20Caps.StaticFlowControlDepth; \
136 _pD3D9Caps->PS20Caps.NumInstructionSlots = _pWineCaps->PS20Caps.NumInstructionSlots; \
137 _pD3D9Caps->VertexTextureFilterCaps = _pWineCaps->VertexTextureFilterCaps; \
138 _pD3D9Caps->MaxVShaderInstructionsExecuted = _pWineCaps->MaxVShaderInstructionsExecuted; \
139 _pD3D9Caps->MaxPShaderInstructionsExecuted = _pWineCaps->MaxPShaderInstructionsExecuted; \
140 _pD3D9Caps->MaxVertexShader30InstructionSlots = _pWineCaps->MaxVertexShader30InstructionSlots; \
141 _pD3D9Caps->MaxPixelShader30InstructionSlots = _pWineCaps->MaxPixelShader30InstructionSlots;
142
143/* ===========================================================================
144 D3D9 interfaces
145 =========================================================================== */
146
147/* ---------- */
148/* IDirect3D9 */
149/* ---------- */
150
151/*****************************************************************************
152 * Predeclare the interface implementation structures
153 */
154extern const IDirect3D9ExVtbl Direct3D9_Vtbl DECLSPEC_HIDDEN;
155
156/*****************************************************************************
157 * IDirect3D implementation structure
158 */
159typedef struct IDirect3D9Impl
160{
161 /* IUnknown fields */
162 const IDirect3D9ExVtbl *lpVtbl;
163 LONG ref;
164
165 /* The WineD3D device */
166 IWineD3D *WineD3D;
167
168 /* Created via Direct3DCreate9Ex? Can QI extended interfaces */
169 BOOL extended;
170} IDirect3D9Impl;
171
172void filter_caps(D3DCAPS9* pCaps) DECLSPEC_HIDDEN;
173
174/*****************************************************************************
175 * IDirect3DDevice9 implementation structure
176 */
177typedef struct IDirect3DDevice9Impl
178{
179 /* IUnknown fields */
180 const IDirect3DDevice9ExVtbl *lpVtbl;
181 const IWineD3DDeviceParentVtbl *device_parent_vtbl;
182 LONG ref;
183
184 /* IDirect3DDevice9 fields */
185 IWineD3DDevice *WineD3DDevice;
186
187 /* Avoids recursion with nested ReleaseRef to 0 */
188 BOOL inDestruction;
189
190 IDirect3DVertexDeclaration9 **convertedDecls;
191 unsigned int numConvertedDecls, declArraySize;
192
193 BOOL notreset;
194} IDirect3DDevice9Impl;
195
196HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapter, D3DDEVTYPE device_type,
197 HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters) DECLSPEC_HIDDEN;
198
199/* IDirect3DDevice9: */
200extern HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(IDirect3DDevice9Ex *iface,
201 UINT iSwapChain, IDirect3DSwapChain9 **pSwapChain) DECLSPEC_HIDDEN;
202extern UINT WINAPI IDirect3DDevice9Impl_GetNumberOfSwapChains(IDirect3DDevice9Ex *iface) DECLSPEC_HIDDEN;
203extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(IDirect3DDevice9Ex *iface,
204 IDirect3DVertexDeclaration9 *pDecl) DECLSPEC_HIDDEN;
205extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(IDirect3DDevice9Ex *iface,
206 IDirect3DVertexDeclaration9 **ppDecl) DECLSPEC_HIDDEN;
207extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShader(IDirect3DDevice9Ex *iface,
208 IDirect3DVertexShader9 *pShader) DECLSPEC_HIDDEN;
209extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(IDirect3DDevice9Ex *iface,
210 IDirect3DVertexShader9 **ppShader) DECLSPEC_HIDDEN;
211extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(IDirect3DDevice9Ex *iface,
212 UINT StartRegister, const float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
213extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(IDirect3DDevice9Ex *iface,
214 UINT StartRegister, float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
215extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantI(IDirect3DDevice9Ex *iface,
216 UINT StartRegister, const int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
217extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantI(IDirect3DDevice9Ex *iface,
218 UINT StartRegister, int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
219extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantB(IDirect3DDevice9Ex *iface,
220 UINT StartRegister, const BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
221extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantB(IDirect3DDevice9Ex *iface,
222 UINT StartRegister, BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
223extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(IDirect3DDevice9Ex *iface,
224 IDirect3DPixelShader9 *pShader) DECLSPEC_HIDDEN;
225extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(IDirect3DDevice9Ex *iface,
226 IDirect3DPixelShader9 **ppShader) DECLSPEC_HIDDEN;
227extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantF(IDirect3DDevice9Ex *iface,
228 UINT StartRegister, const float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
229extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(IDirect3DDevice9Ex *iface,
230 UINT StartRegister, float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
231extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantI(IDirect3DDevice9Ex *iface,
232 UINT StartRegister, const int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
233extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantI(IDirect3DDevice9Ex *iface,
234 UINT StartRegister, int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
235extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantB(IDirect3DDevice9Ex *iface,
236 UINT StartRegister, const BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
237extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantB(IDirect3DDevice9Ex *iface,
238 UINT StartRegister, BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
239
240/* ---------------- */
241/* IDirect3DVolume9 */
242/* ---------------- */
243
244/*****************************************************************************
245 * IDirect3DVolume9 implementation structure
246 */
247typedef struct IDirect3DVolume9Impl
248{
249 /* IUnknown fields */
250 const IDirect3DVolume9Vtbl *lpVtbl;
251 LONG ref;
252
253 /* IDirect3DVolume9 fields */
254 IWineD3DVolume *wineD3DVolume;
255
256 /* The volume container */
257 IUnknown *container;
258
259 /* If set forward refcounting to this object */
260 IUnknown *forwardReference;
261} IDirect3DVolume9Impl;
262
263HRESULT volume_init(IDirect3DVolume9Impl *volume, IDirect3DDevice9Impl *device, UINT width, UINT height,
264 UINT depth, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool) DECLSPEC_HIDDEN;
265
266/* ------------------- */
267/* IDirect3DSwapChain9 */
268/* ------------------- */
269
270/*****************************************************************************
271 * IDirect3DSwapChain9 implementation structure
272 */
273typedef struct IDirect3DSwapChain9Impl
274{
275 /* IUnknown fields */
276 const IDirect3DSwapChain9Vtbl *lpVtbl;
277 LONG ref;
278
279 /* IDirect3DSwapChain9 fields */
280 IWineD3DSwapChain *wineD3DSwapChain;
281
282 /* Parent reference */
283 LPDIRECT3DDEVICE9EX parentDevice;
284
285 /* Flags an implicit swap chain */
286 BOOL isImplicit;
287} IDirect3DSwapChain9Impl;
288
289HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl *device,
290 D3DPRESENT_PARAMETERS *present_parameters) DECLSPEC_HIDDEN;
291
292/* ----------------- */
293/* IDirect3DSurface9 */
294/* ----------------- */
295
296/*****************************************************************************
297 * IDirect3DSurface9 implementation structure
298 */
299typedef struct IDirect3DSurface9Impl
300{
301 /* IUnknown fields */
302 const IDirect3DSurface9Vtbl *lpVtbl;
303 LONG ref;
304
305 /* IDirect3DResource9 fields */
306 IWineD3DSurface *wineD3DSurface;
307
308 /* Parent reference */
309 LPDIRECT3DDEVICE9EX parentDevice;
310
311 /* The surface container */
312 IUnknown *container;
313
314 /* If set forward refcounting to this object */
315 IUnknown *forwardReference;
316
317 BOOL getdc_supported;
318} IDirect3DSurface9Impl;
319
320HRESULT surface_init(IDirect3DSurface9Impl *surface, IDirect3DDevice9Impl *device,
321 UINT width, UINT height, D3DFORMAT format, BOOL lockable, BOOL discard, UINT level,
322 DWORD usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality
323#ifdef VBOX_WITH_WDDM
324 , HANDLE *shared_handle
325 , void *pvClientMem
326#endif
327 ) DECLSPEC_HIDDEN;
328
329/* ---------------------- */
330/* IDirect3DVertexBuffer9 */
331/* ---------------------- */
332
333/*****************************************************************************
334 * IDirect3DVertexBuffer9 implementation structure
335 */
336typedef struct IDirect3DVertexBuffer9Impl
337{
338 /* IUnknown fields */
339 const IDirect3DVertexBuffer9Vtbl *lpVtbl;
340 LONG ref;
341
342 /* IDirect3DResource9 fields */
343 IWineD3DBuffer *wineD3DVertexBuffer;
344
345 /* Parent reference */
346 LPDIRECT3DDEVICE9EX parentDevice;
347
348 DWORD fvf;
349} IDirect3DVertexBuffer9Impl;
350
351HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Impl *device,
352 UINT size, UINT usage, DWORD fvf, D3DPOOL pool) DECLSPEC_HIDDEN;
353
354/* --------------------- */
355/* IDirect3DIndexBuffer9 */
356/* --------------------- */
357
358/*****************************************************************************
359 * IDirect3DIndexBuffer9 implementation structure
360 */
361typedef struct IDirect3DIndexBuffer9Impl
362{
363 /* IUnknown fields */
364 const IDirect3DIndexBuffer9Vtbl *lpVtbl;
365 LONG ref;
366
367 /* IDirect3DResource9 fields */
368 IWineD3DBuffer *wineD3DIndexBuffer;
369
370 /* Parent reference */
371 LPDIRECT3DDEVICE9EX parentDevice;
372 WINED3DFORMAT format;
373} IDirect3DIndexBuffer9Impl;
374
375HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl *device,
376 UINT size, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
377
378/* --------------------- */
379/* IDirect3DBaseTexture9 */
380/* --------------------- */
381
382/*****************************************************************************
383 * IDirect3DBaseTexture9 implementation structure
384 */
385typedef struct IDirect3DBaseTexture9Impl
386{
387 /* IUnknown fields */
388 const IDirect3DBaseTexture9Vtbl *lpVtbl;
389 LONG ref;
390
391 /* IDirect3DResource9 fields */
392 IWineD3DBaseTexture *wineD3DBaseTexture;
393} IDirect3DBaseTexture9Impl;
394
395/* --------------------- */
396/* IDirect3DCubeTexture9 */
397/* --------------------- */
398
399/*****************************************************************************
400 * IDirect3DCubeTexture9 implementation structure
401 */
402typedef struct IDirect3DCubeTexture9Impl
403{
404 /* IUnknown fields */
405 const IDirect3DCubeTexture9Vtbl *lpVtbl;
406 LONG ref;
407
408 /* IDirect3DResource9 fields */
409 IWineD3DCubeTexture *wineD3DCubeTexture;
410
411 /* Parent reference */
412 LPDIRECT3DDEVICE9EX parentDevice;
413} IDirect3DCubeTexture9Impl;
414
415HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Impl *device,
416 UINT edge_length, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool
417#ifdef VBOX_WITH_WDDM
418 , HANDLE *shared_handle
419 , void **pavClientMem
420#endif
421 ) DECLSPEC_HIDDEN;
422
423/* ----------------- */
424/* IDirect3DTexture9 */
425/* ----------------- */
426
427/*****************************************************************************
428 * IDirect3DTexture9 implementation structure
429 */
430typedef struct IDirect3DTexture9Impl
431{
432 /* IUnknown fields */
433 const IDirect3DTexture9Vtbl *lpVtbl;
434 LONG ref;
435
436 /* IDirect3DResource9 fields */
437 IWineD3DTexture *wineD3DTexture;
438
439 /* Parent reference */
440 LPDIRECT3DDEVICE9EX parentDevice;
441} IDirect3DTexture9Impl;
442
443HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *device,
444 UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool
445#ifdef VBOX_WITH_WDDM
446 , HANDLE *shared_handle
447 , void **pavClientMem
448#endif
449 ) DECLSPEC_HIDDEN;
450
451/* ----------------------- */
452/* IDirect3DVolumeTexture9 */
453/* ----------------------- */
454
455/*****************************************************************************
456 * IDirect3DVolumeTexture9 implementation structure
457 */
458typedef struct IDirect3DVolumeTexture9Impl
459{
460 /* IUnknown fields */
461 const IDirect3DVolumeTexture9Vtbl *lpVtbl;
462 LONG ref;
463
464 /* IDirect3DResource9 fields */
465 IWineD3DVolumeTexture *wineD3DVolumeTexture;
466
467 /* Parent reference */
468 LPDIRECT3DDEVICE9EX parentDevice;
469} IDirect3DVolumeTexture9Impl;
470
471HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice9Impl *device,
472 UINT width, UINT height, UINT depth, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
473
474/* ----------------------- */
475/* IDirect3DStateBlock9 */
476/* ----------------------- */
477
478/*****************************************************************************
479 * IDirect3DStateBlock9 implementation structure
480 */
481typedef struct IDirect3DStateBlock9Impl {
482 /* IUnknown fields */
483 const IDirect3DStateBlock9Vtbl *lpVtbl;
484 LONG ref;
485
486 /* IDirect3DStateBlock9 fields */
487 IWineD3DStateBlock *wineD3DStateBlock;
488
489 /* Parent reference */
490 LPDIRECT3DDEVICE9EX parentDevice;
491} IDirect3DStateBlock9Impl;
492
493HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Impl *device,
494 D3DSTATEBLOCKTYPE type, IWineD3DStateBlock *wined3d_stateblock) DECLSPEC_HIDDEN;
495
496/* --------------------------- */
497/* IDirect3DVertexDeclaration9 */
498/* --------------------------- */
499
500/*****************************************************************************
501 * IDirect3DVertexDeclaration implementation structure
502 */
503typedef struct IDirect3DVertexDeclaration9Impl {
504 /* IUnknown fields */
505 const IDirect3DVertexDeclaration9Vtbl *lpVtbl;
506 LONG ref;
507
508 D3DVERTEXELEMENT9 *elements;
509 UINT element_count;
510
511 /* IDirect3DVertexDeclaration9 fields */
512 IWineD3DVertexDeclaration *wineD3DVertexDeclaration;
513 DWORD convFVF;
514
515 /* Parent reference */
516 LPDIRECT3DDEVICE9EX parentDevice;
517} IDirect3DVertexDeclaration9Impl;
518
519void IDirect3DVertexDeclaration9Impl_Destroy(LPDIRECT3DVERTEXDECLARATION9 iface) DECLSPEC_HIDDEN;
520HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration,
521 IDirect3DDevice9Impl *device, const D3DVERTEXELEMENT9 *elements) DECLSPEC_HIDDEN;
522
523/* ---------------------- */
524/* IDirect3DVertexShader9 */
525/* ---------------------- */
526
527/*****************************************************************************
528 * IDirect3DVertexShader implementation structure
529 */
530typedef struct IDirect3DVertexShader9Impl {
531 /* IUnknown fields */
532 const IDirect3DVertexShader9Vtbl *lpVtbl;
533 LONG ref;
534
535 /* IDirect3DVertexShader9 fields */
536 IWineD3DVertexShader *wineD3DVertexShader;
537
538 /* Parent reference */
539 LPDIRECT3DDEVICE9EX parentDevice;
540} IDirect3DVertexShader9Impl;
541
542HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader,
543 IDirect3DDevice9Impl *device, const DWORD *byte_code) DECLSPEC_HIDDEN;
544
545#define D3D9_MAX_VERTEX_SHADER_CONSTANTF 256
546#define D3D9_MAX_SIMULTANEOUS_RENDERTARGETS 4
547
548/* --------------------- */
549/* IDirect3DPixelShader9 */
550/* --------------------- */
551
552/*****************************************************************************
553 * IDirect3DPixelShader implementation structure
554 */
555typedef struct IDirect3DPixelShader9Impl {
556 /* IUnknown fields */
557 const IDirect3DPixelShader9Vtbl *lpVtbl;
558 LONG ref;
559
560 /* IDirect3DPixelShader9 fields */
561 IWineD3DPixelShader *wineD3DPixelShader;
562
563 /* Parent reference */
564 LPDIRECT3DDEVICE9EX parentDevice;
565} IDirect3DPixelShader9Impl;
566
567HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader,
568 IDirect3DDevice9Impl *device, const DWORD *byte_code) DECLSPEC_HIDDEN;
569
570/* --------------- */
571/* IDirect3DQuery9 */
572/* --------------- */
573
574/*****************************************************************************
575 * IDirect3DPixelShader implementation structure
576 */
577typedef struct IDirect3DQuery9Impl {
578 /* IUnknown fields */
579 const IDirect3DQuery9Vtbl *lpVtbl;
580 LONG ref;
581
582 /* IDirect3DQuery9 fields */
583 IWineD3DQuery *wineD3DQuery;
584
585 /* Parent reference */
586 LPDIRECT3DDEVICE9EX parentDevice;
587} IDirect3DQuery9Impl;
588
589HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device,
590 D3DQUERYTYPE type) DECLSPEC_HIDDEN;
591
592#endif /* __WINE_D3D9_PRIVATE_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette