1 | /** @file
|
---|
2 | *
|
---|
3 | * VBoxVideo Display D3D User mode dll
|
---|
4 | *
|
---|
5 | * Copyright (C) 2010 Oracle Corporation
|
---|
6 | *
|
---|
7 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
8 | * available from http://www.virtualbox.org. This file is free software;
|
---|
9 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
10 | * General Public License (GPL) as published by the Free Software
|
---|
11 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
12 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
13 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
14 | */
|
---|
15 | #ifndef ___VBoxDispD3D_h___
|
---|
16 | #define ___VBoxDispD3D_h___
|
---|
17 |
|
---|
18 | #include "VBoxDispD3DIf.h"
|
---|
19 | #include "../../Miniport/wddm/VBoxVideoIf.h"
|
---|
20 |
|
---|
21 | #include <iprt/cdefs.h>
|
---|
22 |
|
---|
23 | #ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
24 | typedef struct VBOXDISPVHWA_INFO
|
---|
25 | {
|
---|
26 | VBOXVHWA_INFO Settings;
|
---|
27 | }VBOXDISPVHWA_INFO;
|
---|
28 |
|
---|
29 | /* represents settings secific to
|
---|
30 | * display device (head) on the multiple-head graphics card
|
---|
31 | * currently used for 2D (overlay) only since in theory its settings
|
---|
32 | * can differ per each frontend's framebuffer. */
|
---|
33 | typedef struct VBOXWDDMDISP_HEAD
|
---|
34 | {
|
---|
35 | VBOXDISPVHWA_INFO Vhwa;
|
---|
36 | } VBOXWDDMDISP_HEAD;
|
---|
37 | #endif
|
---|
38 |
|
---|
39 | typedef struct VBOXWDDMDISP_ADAPTER
|
---|
40 | {
|
---|
41 | HANDLE hAdapter;
|
---|
42 | UINT uIfVersion;
|
---|
43 | UINT uRtVersion;
|
---|
44 | VBOXDISPD3D D3D;
|
---|
45 | IDirect3D9Ex * pD3D9If;
|
---|
46 | D3DDDI_ADAPTERCALLBACKS RtCallbacks;
|
---|
47 | uint32_t cFormstOps;
|
---|
48 | FORMATOP *paFormstOps;
|
---|
49 | uint32_t cSurfDescs;
|
---|
50 | DDSURFACEDESC *paSurfDescs;
|
---|
51 | #ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
52 | uint32_t cHeads;
|
---|
53 | VBOXWDDMDISP_HEAD aHeads[1];
|
---|
54 | #endif
|
---|
55 | } VBOXWDDMDISP_ADAPTER, *PVBOXWDDMDISP_ADAPTER;
|
---|
56 |
|
---|
57 | typedef struct VBOXWDDMDISP_DEVICE
|
---|
58 | {
|
---|
59 | HANDLE hDevice;
|
---|
60 | PVBOXWDDMDISP_ADAPTER pAdapter;
|
---|
61 | UINT u32IfVersion;
|
---|
62 | UINT uRtVersion;
|
---|
63 | D3DDDI_DEVICECALLBACKS RtCallbacks;
|
---|
64 | VOID *pvCmdBuffer;
|
---|
65 | UINT cbCmdBuffer;
|
---|
66 | D3DDDI_CREATEDEVICEFLAGS fFlags;
|
---|
67 | } VBOXWDDMDISP_DEVICE, *PVBOXWDDMDISP_DEVICE;
|
---|
68 |
|
---|
69 | DECLINLINE(bool) vboxDispD3DIs3DEnabled(VBOXWDDMDISP_ADAPTER * pAdapter)
|
---|
70 | {
|
---|
71 | return !!(pAdapter->pD3D9If);
|
---|
72 | }
|
---|
73 |
|
---|
74 | #endif /* #ifndef ___VBoxDispD3D_h___ */
|
---|