VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/xpdm/VBoxDispVHWA.h@ 39870

Last change on this file since 39870 was 36867, checked in by vboxsync, 14 years ago

Additions/Video: display/miniport drivers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.2 KB
Line 
1/* $Id: VBoxDispVHWA.h 36867 2011-04-28 07:27:03Z vboxsync $ */
2
3/** @file
4 * VBox XPDM Display driver, helper functions which interacts with our miniport driver
5 */
6
7/*
8 * Copyright (C) 2011 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 VBOXDISPVHWA_H
20#define VBOXDISPVHWA_H
21
22#include "VBoxDisp.h"
23
24#ifdef VBOX_WITH_VIDEOHWACCEL
25typedef struct _VBOXDISPVHWAINFO
26{
27 uint32_t caps;
28 uint32_t caps2;
29 uint32_t colorKeyCaps;
30 uint32_t stretchCaps;
31 uint32_t surfaceCaps;
32 uint32_t numOverlays;
33 uint32_t numFourCC;
34 HGSMIOFFSET FourCC;
35 ULONG_PTR offVramBase;
36 BOOLEAN bEnabled;
37} VBOXDISPVHWAINFO;
38#endif
39
40typedef struct _VBOXVHWAREGION
41{
42 RECTL Rect;
43 bool bValid;
44}VBOXVHWAREGION, *PVBOXVHWAREGION;
45
46typedef struct _VBOXVHWASURFDESC
47{
48 VBOXVHWA_SURFHANDLE hHostHandle;
49 volatile uint32_t cPendingBltsSrc;
50 volatile uint32_t cPendingBltsDst;
51 volatile uint32_t cPendingFlipsCurr;
52 volatile uint32_t cPendingFlipsTarg;
53#ifdef DEBUG
54 volatile uint32_t cFlipsCurr;
55 volatile uint32_t cFlipsTarg;
56#endif
57 bool bVisible;
58 VBOXVHWAREGION UpdatedMemRegion;
59 VBOXVHWAREGION NonupdatedMemRegion;
60}VBOXVHWASURFDESC, *PVBOXVHWASURFDESC;
61
62typedef DECLCALLBACK(void) FNVBOXVHWACMDCOMPLETION(PVBOXDISPDEV pDev, VBOXVHWACMD * pCmd, void * pContext);
63typedef FNVBOXVHWACMDCOMPLETION *PFNVBOXVHWACMDCOMPLETION;
64
65void VBoxDispVHWAInit(PVBOXDISPDEV pDev);
66int VBoxDispVHWAEnable(PVBOXDISPDEV pDev);
67int VBoxDispVHWADisable(PVBOXDISPDEV pDev);
68int VBoxDispVHWAInitHostInfo1(PVBOXDISPDEV pDev);
69int VBoxDispVHWAInitHostInfo2(PVBOXDISPDEV pDev, DWORD *pFourCC);
70
71VBOXVHWACMD* VBoxDispVHWACommandCreate(PVBOXDISPDEV pDev, VBOXVHWACMD_TYPE enmCmd, VBOXVHWACMD_LENGTH cbCmd);
72void VBoxDispVHWACommandRelease(PVBOXDISPDEV pDev, VBOXVHWACMD* pCmd);
73BOOL VBoxDispVHWACommandSubmit(PVBOXDISPDEV pDev, VBOXVHWACMD* pCmd);
74void VBoxDispVHWACommandSubmitAsynch (PVBOXDISPDEV pDev, VBOXVHWACMD* pCmd, PFNVBOXVHWACMDCOMPLETION pfnCompletion, void * pContext);
75void VBoxDispVHWACommandSubmitAsynchAndComplete (PVBOXDISPDEV pDev, VBOXVHWACMD* pCmd);
76void VBoxDispVHWACommandCheckHostCmds(PVBOXDISPDEV pDev);
77
78PVBOXVHWASURFDESC VBoxDispVHWASurfDescAlloc();
79void VBoxDispVHWASurfDescFree(PVBOXVHWASURFDESC pDesc);
80
81uint64_t VBoxDispVHWAVramOffsetFromPDEV(PVBOXDISPDEV pDev, ULONG_PTR offPdev);
82
83void VBoxDispVHWARectUnited(RECTL * pDst, RECTL * pRect1, RECTL * pRect2);
84bool VBoxDispVHWARectIsEmpty(RECTL * pRect);
85bool VBoxDispVHWARectIntersect(RECTL * pRect1, RECTL * pRect2);
86bool VBoxDispVHWARectInclude(RECTL * pRect1, RECTL * pRect2);
87bool VBoxDispVHWARegionIntersects(PVBOXVHWAREGION pReg, RECTL * pRect);
88bool VBoxDispVHWARegionIncludes(PVBOXVHWAREGION pReg, RECTL * pRect);
89bool VBoxDispVHWARegionIncluded(PVBOXVHWAREGION pReg, RECTL * pRect);
90void VBoxDispVHWARegionSet(PVBOXVHWAREGION pReg, RECTL * pRect);
91void VBoxDispVHWARegionAdd(PVBOXVHWAREGION pReg, RECTL * pRect);
92void VBoxDispVHWARegionInit(PVBOXVHWAREGION pReg);
93void VBoxDispVHWARegionClear(PVBOXVHWAREGION pReg);
94bool VBoxDispVHWARegionValid(PVBOXVHWAREGION pReg);
95void VBoxDispVHWARegionTrySubstitute(PVBOXVHWAREGION pReg, const RECTL *pRect);
96
97uint32_t VBoxDispVHWAFromDDCAPS(uint32_t caps);
98uint32_t VBoxDispVHWAToDDCAPS(uint32_t caps);
99uint32_t VBoxDispVHWAFromDDSCAPS(uint32_t caps);
100uint32_t VBoxDispVHWAToDDSCAPS(uint32_t caps);
101uint32_t VBoxDispVHWAFromDDPFS(uint32_t caps);
102uint32_t VBoxDispVHWAToDDPFS(uint32_t caps);
103uint32_t VBoxDispVHWAFromDDCKEYCAPS(uint32_t caps);
104uint32_t VBoxDispVHWAToDDCKEYCAPS(uint32_t caps);
105uint32_t VBoxDispVHWAToDDBLTs(uint32_t caps);
106uint32_t VBoxDispVHWAFromDDBLTs(uint32_t caps);
107uint32_t VBoxDispVHWAFromDDCAPS2(uint32_t caps);
108uint32_t VBoxDispVHWAToDDCAPS2(uint32_t caps);
109uint32_t VBoxDispVHWAFromDDOVERs(uint32_t caps);
110uint32_t VBoxDispVHWAToDDOVERs(uint32_t caps);
111uint32_t VBoxDispVHWAFromDDCKEYs(uint32_t caps);
112uint32_t VBoxDispVHWAToDDCKEYs(uint32_t caps);
113
114int VBoxDispVHWAFromDDSURFACEDESC(VBOXVHWA_SURFACEDESC *pVHWADesc, DDSURFACEDESC *pDdDesc);
115int VBoxDispVHWAFromDDPIXELFORMAT(VBOXVHWA_PIXELFORMAT *pVHWAFormat, DDPIXELFORMAT *pDdFormat);
116void VBoxDispVHWAFromDDOVERLAYFX(VBOXVHWA_OVERLAYFX *pVHWAOverlay, DDOVERLAYFX *pDdOverlay);
117void VBoxDispVHWAFromDDCOLORKEY(VBOXVHWA_COLORKEY *pVHWACKey, DDCOLORKEY *pDdCKey);
118void VBoxDispVHWAFromDDBLTFX(VBOXVHWA_BLTFX *pVHWABlt, DDBLTFX *pDdBlt);
119void VBoxDispVHWAFromRECTL(VBOXVHWA_RECTL *pDst, RECTL *pSrc);
120
121uint32_t VBoxDispVHWAUnsupportedDDCAPS(uint32_t caps);
122uint32_t VBoxDispVHWAUnsupportedDDSCAPS(uint32_t caps);
123uint32_t VBoxDispVHWAUnsupportedDDPFS(uint32_t caps);
124uint32_t VBoxDispVHWAUnsupportedDDCEYCAPS(uint32_t caps);
125uint32_t VBoxDispVHWASupportedDDCAPS(uint32_t caps);
126uint32_t VBoxDispVHWASupportedDDSCAPS(uint32_t caps);
127uint32_t VBoxDispVHWASupportedDDPFS(uint32_t caps);
128uint32_t VBoxDispVHWASupportedDDCEYCAPS(uint32_t caps);
129
130#endif /*VBOXDISPVHWA_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