VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.h@ 30138

Last change on this file since 30138 was 30138, checked in by vboxsync, 15 years ago

wddm/3d: more impl

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
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
24typedef 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. */
33typedef struct VBOXWDDMDISP_HEAD
34{
35 VBOXDISPVHWA_INFO Vhwa;
36} VBOXWDDMDISP_HEAD;
37#endif
38
39typedef 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
58typedef struct VBOXWDDMDISP_CONTEXT
59{
60 struct VBOXWDDMDISP_DEVICE *pDevice;
61 D3DDDICB_CREATECONTEXT ContextInfo;
62} VBOXWDDMDISP_CONTEXT, *PVBOXWDDMDISP_CONTEXT;
63
64typedef struct VBOXWDDMDISP_STREAMSOURCEUM
65{
66 CONST VOID* pvBuffer;
67 UINT cbStride;
68} VBOXWDDMDISP_STREAMSOURCEUM, *PVBOXWDDMDISP_STREAMSOURCEUM;
69
70typedef struct VBOXWDDMDISP_DEVICE
71{
72 HANDLE hDevice;
73 PVBOXWDDMDISP_ADAPTER pAdapter;
74 UINT u32IfVersion;
75 UINT uRtVersion;
76 D3DDDI_DEVICECALLBACKS RtCallbacks;
77 VOID *pvCmdBuffer;
78 UINT cbCmdBuffer;
79 D3DDDI_CREATEDEVICEFLAGS fFlags;
80 HWND hWnd;
81 /* number of StreamSources set */
82 UINT cStreamSources;
83 VBOXWDDMDISP_STREAMSOURCEUM aStreamSourceUm[16];
84 IDirect3DDevice9 *pDevice9If;
85 /* need to cache the ViewPort data because IDirect3DDevice9::SetViewport
86 * is split into two calls : SetViewport & SetZRange */
87 D3DVIEWPORT9 ViewPort;
88 VBOXWDDMDISP_CONTEXT DefaultContext;
89} VBOXWDDMDISP_DEVICE, *PVBOXWDDMDISP_DEVICE;
90
91typedef struct VBOXWDDMDISP_LOCKINFO
92{
93 uint32_t cLocks;
94 union {
95 D3DDDIRANGE Range;
96 RECT Area;
97 D3DDDIBOX Box;
98 };
99 D3DDDI_LOCKFLAGS fFlags;
100 D3DLOCKED_RECT LockedRect;
101} VBOXWDDMDISP_LOCKINFO;
102
103typedef struct VBOXWDDMDISP_ALLOCATION
104{
105 D3DKMT_HANDLE hAllocation;
106 VBOXWDDM_ALLOC_TYPE enmType;
107 void* pvMem;
108 /* object type depends on resource type */
109 IUnknown *pD3DIf;
110 VBOXWDDMDISP_LOCKINFO LockInfo;
111 VBOXWDDM_SURFACE_DESC SurfDesc;
112} VBOXWDDMDISP_ALLOCATION, *PVBOXWDDMDISP_ALLOCATION;
113
114typedef struct VBOXWDDMDISP_RESOURCE
115{
116 HANDLE hResource;
117 D3DKMT_HANDLE hKMResource;
118 PVBOXWDDMDISP_DEVICE pDevice;
119 uint32_t fFlags;
120 VBOXWDDM_RC_DESC RcDesc;
121 UINT cAllocations;
122 VBOXWDDMDISP_ALLOCATION aAllocations[1];
123} VBOXWDDMDISP_RESOURCE, *PVBOXWDDMDISP_RESOURCE;
124
125#define VBOXDISPMODE_IS_3D(_p) (!!((_p)->pD3D9If))
126
127#endif /* #ifndef ___VBoxDispD3D_h___ */
Note: See TracBrowser for help on using the repository browser.

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