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 | * Sun 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, Sun 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 VBOXWDDM
|
---|
51 | #include "../vbox/VBoxWineEx.h"
|
---|
52 | #endif
|
---|
53 |
|
---|
54 | /* ===========================================================================
|
---|
55 | Internal use
|
---|
56 | =========================================================================== */
|
---|
57 | extern HRESULT vdecl_convert_fvf(DWORD FVF, D3DVERTEXELEMENT9 **ppVertexElements) DECLSPEC_HIDDEN;
|
---|
58 | D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format) DECLSPEC_HIDDEN;
|
---|
59 | WINED3DFORMAT 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 | */
|
---|
154 | extern const IDirect3D9ExVtbl Direct3D9_Vtbl DECLSPEC_HIDDEN;
|
---|
155 |
|
---|
156 | /*****************************************************************************
|
---|
157 | * IDirect3D implementation structure
|
---|
158 | */
|
---|
159 | typedef 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 |
|
---|
172 | void filter_caps(D3DCAPS9* pCaps) DECLSPEC_HIDDEN;
|
---|
173 |
|
---|
174 | /*****************************************************************************
|
---|
175 | * IDirect3DDevice9 implementation structure
|
---|
176 | */
|
---|
177 | typedef 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 |
|
---|
196 | HRESULT 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: */
|
---|
200 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(IDirect3DDevice9Ex *iface,
|
---|
201 | UINT iSwapChain, IDirect3DSwapChain9 **pSwapChain) DECLSPEC_HIDDEN;
|
---|
202 | extern UINT WINAPI IDirect3DDevice9Impl_GetNumberOfSwapChains(IDirect3DDevice9Ex *iface) DECLSPEC_HIDDEN;
|
---|
203 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(IDirect3DDevice9Ex *iface,
|
---|
204 | IDirect3DVertexDeclaration9 *pDecl) DECLSPEC_HIDDEN;
|
---|
205 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(IDirect3DDevice9Ex *iface,
|
---|
206 | IDirect3DVertexDeclaration9 **ppDecl) DECLSPEC_HIDDEN;
|
---|
207 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShader(IDirect3DDevice9Ex *iface,
|
---|
208 | IDirect3DVertexShader9 *pShader) DECLSPEC_HIDDEN;
|
---|
209 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(IDirect3DDevice9Ex *iface,
|
---|
210 | IDirect3DVertexShader9 **ppShader) DECLSPEC_HIDDEN;
|
---|
211 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(IDirect3DDevice9Ex *iface,
|
---|
212 | UINT StartRegister, const float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
|
---|
213 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(IDirect3DDevice9Ex *iface,
|
---|
214 | UINT StartRegister, float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
|
---|
215 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantI(IDirect3DDevice9Ex *iface,
|
---|
216 | UINT StartRegister, const int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
|
---|
217 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantI(IDirect3DDevice9Ex *iface,
|
---|
218 | UINT StartRegister, int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
|
---|
219 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantB(IDirect3DDevice9Ex *iface,
|
---|
220 | UINT StartRegister, const BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
|
---|
221 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantB(IDirect3DDevice9Ex *iface,
|
---|
222 | UINT StartRegister, BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
|
---|
223 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(IDirect3DDevice9Ex *iface,
|
---|
224 | IDirect3DPixelShader9 *pShader) DECLSPEC_HIDDEN;
|
---|
225 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(IDirect3DDevice9Ex *iface,
|
---|
226 | IDirect3DPixelShader9 **ppShader) DECLSPEC_HIDDEN;
|
---|
227 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantF(IDirect3DDevice9Ex *iface,
|
---|
228 | UINT StartRegister, const float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
|
---|
229 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(IDirect3DDevice9Ex *iface,
|
---|
230 | UINT StartRegister, float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
|
---|
231 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantI(IDirect3DDevice9Ex *iface,
|
---|
232 | UINT StartRegister, const int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
|
---|
233 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantI(IDirect3DDevice9Ex *iface,
|
---|
234 | UINT StartRegister, int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
|
---|
235 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantB(IDirect3DDevice9Ex *iface,
|
---|
236 | UINT StartRegister, const BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
|
---|
237 | extern 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 | */
|
---|
247 | typedef 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 |
|
---|
263 | HRESULT 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 | */
|
---|
273 | typedef 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 |
|
---|
289 | HRESULT 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 | */
|
---|
299 | typedef 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 |
|
---|
320 | HRESULT 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 VBOXWDDM
|
---|
324 | , HANDLE *shared_handle
|
---|
325 | , void *pvClientMem
|
---|
326 | #endif
|
---|
327 | ) DECLSPEC_HIDDEN;
|
---|
328 |
|
---|
329 | /* ---------------------- */
|
---|
330 | /* IDirect3DVertexBuffer9 */
|
---|
331 | /* ---------------------- */
|
---|
332 |
|
---|
333 | /*****************************************************************************
|
---|
334 | * IDirect3DVertexBuffer9 implementation structure
|
---|
335 | */
|
---|
336 | typedef 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 |
|
---|
351 | HRESULT 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 | */
|
---|
361 | typedef 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 |
|
---|
375 | HRESULT 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 | */
|
---|
385 | typedef 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 | */
|
---|
402 | typedef 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 |
|
---|
415 | HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Impl *device,
|
---|
416 | UINT edge_length, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
|
---|
417 |
|
---|
418 | /* ----------------- */
|
---|
419 | /* IDirect3DTexture9 */
|
---|
420 | /* ----------------- */
|
---|
421 |
|
---|
422 | /*****************************************************************************
|
---|
423 | * IDirect3DTexture9 implementation structure
|
---|
424 | */
|
---|
425 | typedef struct IDirect3DTexture9Impl
|
---|
426 | {
|
---|
427 | /* IUnknown fields */
|
---|
428 | const IDirect3DTexture9Vtbl *lpVtbl;
|
---|
429 | LONG ref;
|
---|
430 |
|
---|
431 | /* IDirect3DResource9 fields */
|
---|
432 | IWineD3DTexture *wineD3DTexture;
|
---|
433 |
|
---|
434 | /* Parent reference */
|
---|
435 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
436 | } IDirect3DTexture9Impl;
|
---|
437 |
|
---|
438 | HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *device,
|
---|
439 | UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool
|
---|
440 | #ifdef VBOXWDDM
|
---|
441 | , HANDLE *shared_handle
|
---|
442 | , void *pvClientMem
|
---|
443 | #endif
|
---|
444 | ) DECLSPEC_HIDDEN;
|
---|
445 |
|
---|
446 | /* ----------------------- */
|
---|
447 | /* IDirect3DVolumeTexture9 */
|
---|
448 | /* ----------------------- */
|
---|
449 |
|
---|
450 | /*****************************************************************************
|
---|
451 | * IDirect3DVolumeTexture9 implementation structure
|
---|
452 | */
|
---|
453 | typedef struct IDirect3DVolumeTexture9Impl
|
---|
454 | {
|
---|
455 | /* IUnknown fields */
|
---|
456 | const IDirect3DVolumeTexture9Vtbl *lpVtbl;
|
---|
457 | LONG ref;
|
---|
458 |
|
---|
459 | /* IDirect3DResource9 fields */
|
---|
460 | IWineD3DVolumeTexture *wineD3DVolumeTexture;
|
---|
461 |
|
---|
462 | /* Parent reference */
|
---|
463 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
464 | } IDirect3DVolumeTexture9Impl;
|
---|
465 |
|
---|
466 | HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice9Impl *device,
|
---|
467 | UINT width, UINT height, UINT depth, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
|
---|
468 |
|
---|
469 | /* ----------------------- */
|
---|
470 | /* IDirect3DStateBlock9 */
|
---|
471 | /* ----------------------- */
|
---|
472 |
|
---|
473 | /*****************************************************************************
|
---|
474 | * IDirect3DStateBlock9 implementation structure
|
---|
475 | */
|
---|
476 | typedef struct IDirect3DStateBlock9Impl {
|
---|
477 | /* IUnknown fields */
|
---|
478 | const IDirect3DStateBlock9Vtbl *lpVtbl;
|
---|
479 | LONG ref;
|
---|
480 |
|
---|
481 | /* IDirect3DStateBlock9 fields */
|
---|
482 | IWineD3DStateBlock *wineD3DStateBlock;
|
---|
483 |
|
---|
484 | /* Parent reference */
|
---|
485 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
486 | } IDirect3DStateBlock9Impl;
|
---|
487 |
|
---|
488 | HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Impl *device,
|
---|
489 | D3DSTATEBLOCKTYPE type, IWineD3DStateBlock *wined3d_stateblock) DECLSPEC_HIDDEN;
|
---|
490 |
|
---|
491 | /* --------------------------- */
|
---|
492 | /* IDirect3DVertexDeclaration9 */
|
---|
493 | /* --------------------------- */
|
---|
494 |
|
---|
495 | /*****************************************************************************
|
---|
496 | * IDirect3DVertexDeclaration implementation structure
|
---|
497 | */
|
---|
498 | typedef struct IDirect3DVertexDeclaration9Impl {
|
---|
499 | /* IUnknown fields */
|
---|
500 | const IDirect3DVertexDeclaration9Vtbl *lpVtbl;
|
---|
501 | LONG ref;
|
---|
502 |
|
---|
503 | D3DVERTEXELEMENT9 *elements;
|
---|
504 | UINT element_count;
|
---|
505 |
|
---|
506 | /* IDirect3DVertexDeclaration9 fields */
|
---|
507 | IWineD3DVertexDeclaration *wineD3DVertexDeclaration;
|
---|
508 | DWORD convFVF;
|
---|
509 |
|
---|
510 | /* Parent reference */
|
---|
511 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
512 | } IDirect3DVertexDeclaration9Impl;
|
---|
513 |
|
---|
514 | void IDirect3DVertexDeclaration9Impl_Destroy(LPDIRECT3DVERTEXDECLARATION9 iface) DECLSPEC_HIDDEN;
|
---|
515 | HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration,
|
---|
516 | IDirect3DDevice9Impl *device, const D3DVERTEXELEMENT9 *elements) DECLSPEC_HIDDEN;
|
---|
517 |
|
---|
518 | /* ---------------------- */
|
---|
519 | /* IDirect3DVertexShader9 */
|
---|
520 | /* ---------------------- */
|
---|
521 |
|
---|
522 | /*****************************************************************************
|
---|
523 | * IDirect3DVertexShader implementation structure
|
---|
524 | */
|
---|
525 | typedef struct IDirect3DVertexShader9Impl {
|
---|
526 | /* IUnknown fields */
|
---|
527 | const IDirect3DVertexShader9Vtbl *lpVtbl;
|
---|
528 | LONG ref;
|
---|
529 |
|
---|
530 | /* IDirect3DVertexShader9 fields */
|
---|
531 | IWineD3DVertexShader *wineD3DVertexShader;
|
---|
532 |
|
---|
533 | /* Parent reference */
|
---|
534 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
535 | } IDirect3DVertexShader9Impl;
|
---|
536 |
|
---|
537 | HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader,
|
---|
538 | IDirect3DDevice9Impl *device, const DWORD *byte_code) DECLSPEC_HIDDEN;
|
---|
539 |
|
---|
540 | #define D3D9_MAX_VERTEX_SHADER_CONSTANTF 256
|
---|
541 | #define D3D9_MAX_SIMULTANEOUS_RENDERTARGETS 4
|
---|
542 |
|
---|
543 | /* --------------------- */
|
---|
544 | /* IDirect3DPixelShader9 */
|
---|
545 | /* --------------------- */
|
---|
546 |
|
---|
547 | /*****************************************************************************
|
---|
548 | * IDirect3DPixelShader implementation structure
|
---|
549 | */
|
---|
550 | typedef struct IDirect3DPixelShader9Impl {
|
---|
551 | /* IUnknown fields */
|
---|
552 | const IDirect3DPixelShader9Vtbl *lpVtbl;
|
---|
553 | LONG ref;
|
---|
554 |
|
---|
555 | /* IDirect3DPixelShader9 fields */
|
---|
556 | IWineD3DPixelShader *wineD3DPixelShader;
|
---|
557 |
|
---|
558 | /* Parent reference */
|
---|
559 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
560 | } IDirect3DPixelShader9Impl;
|
---|
561 |
|
---|
562 | HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader,
|
---|
563 | IDirect3DDevice9Impl *device, const DWORD *byte_code) DECLSPEC_HIDDEN;
|
---|
564 |
|
---|
565 | /* --------------- */
|
---|
566 | /* IDirect3DQuery9 */
|
---|
567 | /* --------------- */
|
---|
568 |
|
---|
569 | /*****************************************************************************
|
---|
570 | * IDirect3DPixelShader implementation structure
|
---|
571 | */
|
---|
572 | typedef struct IDirect3DQuery9Impl {
|
---|
573 | /* IUnknown fields */
|
---|
574 | const IDirect3DQuery9Vtbl *lpVtbl;
|
---|
575 | LONG ref;
|
---|
576 |
|
---|
577 | /* IDirect3DQuery9 fields */
|
---|
578 | IWineD3DQuery *wineD3DQuery;
|
---|
579 |
|
---|
580 | /* Parent reference */
|
---|
581 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
582 | } IDirect3DQuery9Impl;
|
---|
583 |
|
---|
584 | HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device,
|
---|
585 | D3DQUERYTYPE type) DECLSPEC_HIDDEN;
|
---|
586 |
|
---|
587 | #endif /* __WINE_D3D9_PRIVATE_H */
|
---|