1 | /* $Id: VBoxDispD3DIf.h 63017 2016-08-04 23:02:57Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxVideo Display D3D User mode dll
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011-2016 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef ___VBoxDispD3DIf_h___
|
---|
19 | #define ___VBoxDispD3DIf_h___
|
---|
20 |
|
---|
21 | /* D3D headers */
|
---|
22 | #include <iprt/critsect.h>
|
---|
23 | #include <iprt/semaphore.h>
|
---|
24 | #include <iprt/win/d3d9.h>
|
---|
25 | #include "../../../Wine_new/vbox/VBoxWineEx.h"
|
---|
26 |
|
---|
27 | /* D3D functionality the VBOXDISPD3D provides */
|
---|
28 | typedef HRESULT WINAPI FNVBOXDISPD3DCREATE9EX(UINT SDKVersion, IDirect3D9Ex **ppD3D);
|
---|
29 | typedef FNVBOXDISPD3DCREATE9EX *PFNVBOXDISPD3DCREATE9EX;
|
---|
30 |
|
---|
31 | typedef struct VBOXDISPD3D
|
---|
32 | {
|
---|
33 | /* D3D functionality the VBOXDISPD3D provides */
|
---|
34 | PFNVBOXDISPD3DCREATE9EX pfnDirect3DCreate9Ex;
|
---|
35 |
|
---|
36 | PFNVBOXWINEEXD3DDEV9_CREATETEXTURE pfnVBoxWineExD3DDev9CreateTexture;
|
---|
37 |
|
---|
38 | PFNVBOXWINEEXD3DDEV9_CREATECUBETEXTURE pfnVBoxWineExD3DDev9CreateCubeTexture;
|
---|
39 |
|
---|
40 | PFNVBOXWINEEXD3DDEV9_CREATEVOLUMETEXTURE pfnVBoxWineExD3DDev9CreateVolumeTexture;
|
---|
41 |
|
---|
42 | PFNVBOXWINEEXD3DDEV9_FLUSH pfnVBoxWineExD3DDev9Flush;
|
---|
43 |
|
---|
44 | PFNVBOXWINEEXD3DDEV9_VOLBLT pfnVBoxWineExD3DDev9VolBlt;
|
---|
45 |
|
---|
46 | PFNVBOXWINEEXD3DDEV9_VOLTEXBLT pfnVBoxWineExD3DDev9VolTexBlt;
|
---|
47 |
|
---|
48 | PFNVBOXWINEEXD3DDEV9_TERM pfnVBoxWineExD3DDev9Term;
|
---|
49 |
|
---|
50 | PFNVBOXWINEEXD3DSWAPCHAIN9_PRESENT pfnVBoxWineExD3DSwapchain9Present;
|
---|
51 |
|
---|
52 | PFNVBOXWINEEXD3DDEV9_FLUSHTOHOST pfnVBoxWineExD3DDev9FlushToHost;
|
---|
53 |
|
---|
54 | PFNVBOXWINEEXD3DDEV9_FINISH pfnVBoxWineExD3DDev9Finish;
|
---|
55 |
|
---|
56 | PFNVBOXWINEEXD3DSURF9_GETHOSTID pfnVBoxWineExD3DSurf9GetHostId;
|
---|
57 |
|
---|
58 | PFNVBOXWINEEXD3DSURF9_SYNCTOHOST pfnVBoxWineExD3DSurf9SyncToHost;
|
---|
59 |
|
---|
60 | PFNVBOXWINEEXD3DSWAPCHAIN9_GETHOSTWINID pfnVBoxWineExD3DSwapchain9GetHostWinID;
|
---|
61 |
|
---|
62 | PFNVBOXWINEEXD3DDEV9_GETHOSTID pfnVBoxWineExD3DDev9GetHostId;
|
---|
63 |
|
---|
64 | /* module handle */
|
---|
65 | HMODULE hD3DLib;
|
---|
66 | } VBOXDISPD3D;
|
---|
67 |
|
---|
68 | typedef struct VBOXWDDMDISP_FORMATS
|
---|
69 | {
|
---|
70 | uint32_t cFormstOps;
|
---|
71 | const struct _FORMATOP* paFormstOps;
|
---|
72 | uint32_t cSurfDescs;
|
---|
73 | struct _DDSURFACEDESC *paSurfDescs;
|
---|
74 | } VBOXWDDMDISP_FORMATS, *PVBOXWDDMDISP_FORMATS;
|
---|
75 |
|
---|
76 | typedef struct VBOXWDDMDISP_D3D
|
---|
77 | {
|
---|
78 | VBOXDISPD3D D3D;
|
---|
79 | IDirect3D9Ex * pD3D9If;
|
---|
80 | D3DCAPS9 Caps;
|
---|
81 | UINT cMaxSimRTs;
|
---|
82 | } VBOXWDDMDISP_D3D, *PVBOXWDDMDISP_D3D;
|
---|
83 |
|
---|
84 | void VBoxDispD3DGlobalInit(void);
|
---|
85 | void VBoxDispD3DGlobalTerm(void);
|
---|
86 | HRESULT VBoxDispD3DGlobalOpen(PVBOXWDDMDISP_D3D pD3D, PVBOXWDDMDISP_FORMATS pFormats);
|
---|
87 | void VBoxDispD3DGlobalClose(PVBOXWDDMDISP_D3D pD3D, PVBOXWDDMDISP_FORMATS pFormats);
|
---|
88 |
|
---|
89 | HRESULT VBoxDispD3DOpen(VBOXDISPD3D *pD3D);
|
---|
90 | void VBoxDispD3DClose(VBOXDISPD3D *pD3D);
|
---|
91 |
|
---|
92 | #ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
93 | HRESULT VBoxDispD3DGlobal2DFormatsInit(struct VBOXWDDMDISP_ADAPTER *pAdapter);
|
---|
94 | void VBoxDispD3DGlobal2DFormatsTerm(struct VBOXWDDMDISP_ADAPTER *pAdapter);
|
---|
95 | #endif
|
---|
96 |
|
---|
97 | #endif /* ifndef ___VBoxDispD3DIf_h___ */
|
---|