VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3DIf.h@ 46966

Last change on this file since 46966 was 46966, checked in by vboxsync, 11 years ago

wddm/crOpenGL: some bugfixes, more TexPresent fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1/* $Id: VBoxDispD3DIf.h 46966 2013-07-04 06:08:11Z vboxsync $ */
2
3/** @file
4 * VBoxVideo Display D3D User mode dll
5 */
6
7/*
8 * Copyright (C) 2011-2012 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef ___VBoxDispD3DIf_h___
20#define ___VBoxDispD3DIf_h___
21
22/* D3D headers */
23#include <iprt/critsect.h>
24#include <iprt/semaphore.h>
25
26# define _InterlockedExchange _InterlockedExchange_StupidDDKVsCompilerCrap
27# define _InterlockedExchangeAdd _InterlockedExchangeAdd_StupidDDKVsCompilerCrap
28# define _InterlockedCompareExchange _InterlockedCompareExchange_StupidDDKVsCompilerCrap
29# define _InterlockedAddLargeStatistic _InterlockedAddLargeStatistic_StupidDDKVsCompilerCrap
30# define _interlockedbittestandset _interlockedbittestandset_StupidDDKVsCompilerCrap
31# define _interlockedbittestandreset _interlockedbittestandreset_StupidDDKVsCompilerCrap
32# define _interlockedbittestandset64 _interlockedbittestandset64_StupidDDKVsCompilerCrap
33# define _interlockedbittestandreset64 _interlockedbittestandreset64_StupidDDKVsCompilerCrap
34# pragma warning(disable : 4163)
35#include <D3D9.h>
36# pragma warning(default : 4163)
37# undef _InterlockedExchange
38# undef _InterlockedExchangeAdd
39# undef _InterlockedCompareExchange
40# undef _InterlockedAddLargeStatistic
41# undef _interlockedbittestandset
42# undef _interlockedbittestandreset
43# undef _interlockedbittestandset64
44# undef _interlockedbittestandreset64
45
46#ifdef VBOX_WITH_NEW_WINE
47#include "../../../Wine_new/vbox/VBoxWineEx.h"
48#else
49#include "../../../Wine/vbox/VBoxWineEx.h"
50#endif
51
52/* D3D functionality the VBOXDISPD3D provides */
53typedef HRESULT WINAPI FNVBOXDISPD3DCREATE9EX(UINT SDKVersion, IDirect3D9Ex **ppD3D);
54typedef FNVBOXDISPD3DCREATE9EX *PFNVBOXDISPD3DCREATE9EX;
55
56typedef struct VBOXDISPD3D
57{
58 /* D3D functionality the VBOXDISPD3D provides */
59 PFNVBOXDISPD3DCREATE9EX pfnDirect3DCreate9Ex;
60
61 PFNVBOXWINEEXD3DDEV9_CREATETEXTURE pfnVBoxWineExD3DDev9CreateTexture;
62
63 PFNVBOXWINEEXD3DDEV9_CREATECUBETEXTURE pfnVBoxWineExD3DDev9CreateCubeTexture;
64
65 PFNVBOXWINEEXD3DDEV9_CREATEVOLUMETEXTURE pfnVBoxWineExD3DDev9CreateVolumeTexture;
66
67 PFNVBOXWINEEXD3DDEV9_FLUSH pfnVBoxWineExD3DDev9Flush;
68
69 PFNVBOXWINEEXD3DDEV9_VOLBLT pfnVBoxWineExD3DDev9VolBlt;
70
71 PFNVBOXWINEEXD3DDEV9_VOLTEXBLT pfnVBoxWineExD3DDev9VolTexBlt;
72
73 PFNVBOXWINEEXD3DDEV9_TERM pfnVBoxWineExD3DDev9Term;
74
75 PFNVBOXWINEEXD3DSWAPCHAIN9_PRESENT pfnVBoxWineExD3DSwapchain9Present;
76
77 PFNVBOXWINEEXD3DDEV9_FLUSHTOHOST pfnVBoxWineExD3DDev9FlushToHost;
78
79 PFNVBOXWINEEXD3DDEV9_FINISH pfnVBoxWineExD3DDev9Finish;
80
81 PFNVBOXWINEEXD3DSURF9_GETHOSTID pfnVBoxWineExD3DSurf9GetHostId;
82
83 PFNVBOXWINEEXD3DSURF9_SYNCTOHOST pfnVBoxWineExD3DSurf9SyncToHost;
84
85 PFNVBOXWINEEXD3DSWAPCHAIN9_GETHOSTWINID pfnVBoxWineExD3DSwapchain9GetHostWinID;
86
87 PFNVBOXWINEEXD3DDEV9_GETHOSTID pfnVBoxWineExD3DDev9GetHostId;
88
89 /* module handle */
90 HMODULE hD3DLib;
91} VBOXDISPD3D;
92
93typedef struct VBOXWDDMDISP_FORMATS
94{
95 uint32_t cFormstOps;
96 const struct _FORMATOP* paFormstOps;
97 uint32_t cSurfDescs;
98 struct _DDSURFACEDESC *paSurfDescs;
99} VBOXWDDMDISP_FORMATS, *PVBOXWDDMDISP_FORMATS;
100
101typedef struct VBOXWDDMDISP_D3D
102{
103 VBOXDISPD3D D3D;
104 IDirect3D9Ex * pD3D9If;
105 D3DCAPS9 Caps;
106 UINT cMaxSimRTs;
107} VBOXWDDMDISP_D3D, *PVBOXWDDMDISP_D3D;
108
109void VBoxDispD3DGlobalInit();
110void VBoxDispD3DGlobalTerm();
111HRESULT VBoxDispD3DGlobalOpen(PVBOXWDDMDISP_D3D pD3D, PVBOXWDDMDISP_FORMATS pFormats);
112void VBoxDispD3DGlobalClose(PVBOXWDDMDISP_D3D pD3D, PVBOXWDDMDISP_FORMATS pFormats);
113
114HRESULT VBoxDispD3DOpen(VBOXDISPD3D *pD3D);
115void VBoxDispD3DClose(VBOXDISPD3D *pD3D);
116
117#ifdef VBOX_WITH_VIDEOHWACCEL
118HRESULT VBoxDispD3DGlobal2DFormatsInit(struct VBOXWDDMDISP_ADAPTER *pAdapter);
119void VBoxDispD3DGlobal2DFormatsTerm(struct VBOXWDDMDISP_ADAPTER *pAdapter);
120#endif
121
122#endif /* ifndef ___VBoxDispD3DIf_h___ */
Note: See TracBrowser for help on using the repository browser.

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