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 | VBOXDISPWORKER WndWorker;
|
---|
46 | IDirect3D9Ex * pD3D9If;
|
---|
47 | D3DDDI_ADAPTERCALLBACKS RtCallbacks;
|
---|
48 | uint32_t cFormstOps;
|
---|
49 | FORMATOP *paFormstOps;
|
---|
50 | uint32_t cSurfDescs;
|
---|
51 | DDSURFACEDESC *paSurfDescs;
|
---|
52 | #ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
53 | uint32_t cHeads;
|
---|
54 | VBOXWDDMDISP_HEAD aHeads[1];
|
---|
55 | #endif
|
---|
56 | } VBOXWDDMDISP_ADAPTER, *PVBOXWDDMDISP_ADAPTER;
|
---|
57 |
|
---|
58 | typedef struct VBOXWDDMDISP_CONTEXT
|
---|
59 | {
|
---|
60 | struct VBOXWDDMDISP_DEVICE *pDevice;
|
---|
61 | D3DDDICB_CREATECONTEXT ContextInfo;
|
---|
62 | } VBOXWDDMDISP_CONTEXT, *PVBOXWDDMDISP_CONTEXT;
|
---|
63 |
|
---|
64 | typedef struct VBOXWDDMDISP_DEVICE
|
---|
65 | {
|
---|
66 | HANDLE hDevice;
|
---|
67 | PVBOXWDDMDISP_ADAPTER pAdapter;
|
---|
68 | UINT u32IfVersion;
|
---|
69 | UINT uRtVersion;
|
---|
70 | D3DDDI_DEVICECALLBACKS RtCallbacks;
|
---|
71 | VOID *pvCmdBuffer;
|
---|
72 | UINT cbCmdBuffer;
|
---|
73 | D3DDDI_CREATEDEVICEFLAGS fFlags;
|
---|
74 | HWND hWnd;
|
---|
75 | IDirect3DDevice9 *pDevice9If;
|
---|
76 | VBOXWDDMDISP_CONTEXT DefaultContext;
|
---|
77 | } VBOXWDDMDISP_DEVICE, *PVBOXWDDMDISP_DEVICE;
|
---|
78 |
|
---|
79 | typedef struct VBOXWDDMDISP_ALLOCATION
|
---|
80 | {
|
---|
81 | D3DKMT_HANDLE hAllocation;
|
---|
82 | VBOXWDDM_ALLOC_TYPE enmType;
|
---|
83 | CONST VOID* pvMem;
|
---|
84 | VBOXWDDM_SURFACE_DESC SurfDesc;
|
---|
85 | } VBOXWDDMDISP_ALLOCATION, *PVBOXWDDMDISP_ALLOCATION;
|
---|
86 |
|
---|
87 | typedef struct VBOXWDDMDISP_RESOURCE
|
---|
88 | {
|
---|
89 | HANDLE hResource;
|
---|
90 | D3DKMT_HANDLE hKMResource;
|
---|
91 | PVBOXWDDMDISP_DEVICE pDevice;
|
---|
92 | uint32_t fFlags;
|
---|
93 | VBOXWDDM_RC_DESC RcDesc;
|
---|
94 | UINT cAllocations;
|
---|
95 | VBOXWDDMDISP_ALLOCATION aAllocations[1];
|
---|
96 | } VBOXWDDMDISP_RESOURCE, *PVBOXWDDMDISP_RESOURCE;
|
---|
97 |
|
---|
98 | #define VBOXDISPMODE_IS_3D(_p) (!!((_p)->pD3D9If))
|
---|
99 |
|
---|
100 | #endif /* #ifndef ___VBoxDispD3D_h___ */
|
---|