VirtualBox

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

Last change on this file since 93115 was 93115, checked in by vboxsync, 3 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.9 KB
Line 
1/* $Id: VBoxDispVHWA.h 93115 2022-01-01 11:31:46Z vboxsync $ */
2/** @file
3 * VBox XPDM Display driver, helper functions which interacts with our miniport driver
4 */
5
6/*
7 * Copyright (C) 2011-2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef GA_INCLUDED_SRC_WINNT_Graphics_Video_disp_xpdm_VBoxDispVHWA_h
19#define GA_INCLUDED_SRC_WINNT_Graphics_Video_disp_xpdm_VBoxDispVHWA_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include "VBoxDisp.h"
25
26#ifdef VBOX_WITH_VIDEOHWACCEL
27typedef struct _VBOXDISPVHWAINFO
28{
29 uint32_t caps;
30 uint32_t caps2;
31 uint32_t colorKeyCaps;
32 uint32_t stretchCaps;
33 uint32_t surfaceCaps;
34 uint32_t numOverlays;
35 uint32_t numFourCC;
36 HGSMIOFFSET FourCC;
37 ULONG_PTR offVramBase;
38 BOOLEAN bEnabled;
39} VBOXDISPVHWAINFO;
40#endif
41
42typedef struct _VBOXVHWAREGION
43{
44 RECTL Rect;
45 bool bValid;
46}VBOXVHWAREGION, *PVBOXVHWAREGION;
47
48typedef struct _VBOXVHWASURFDESC
49{
50 VBOXVHWA_SURFHANDLE hHostHandle;
51 volatile uint32_t cPendingBltsSrc;
52 volatile uint32_t cPendingBltsDst;
53 volatile uint32_t cPendingFlipsCurr;
54 volatile uint32_t cPendingFlipsTarg;
55#ifdef DEBUG
56 volatile uint32_t cFlipsCurr;
57 volatile uint32_t cFlipsTarg;
58#endif
59 bool bVisible;
60 VBOXVHWAREGION UpdatedMemRegion;
61 VBOXVHWAREGION NonupdatedMemRegion;
62}VBOXVHWASURFDESC, *PVBOXVHWASURFDESC;
63
64typedef DECLCALLBACKTYPE(void, FNVBOXVHWACMDCOMPLETION,(PVBOXDISPDEV pDev, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST *pCmd,
65 void *pvContext));
66typedef FNVBOXVHWACMDCOMPLETION *PFNVBOXVHWACMDCOMPLETION;
67
68void VBoxDispVHWAInit(PVBOXDISPDEV pDev);
69int VBoxDispVHWAEnable(PVBOXDISPDEV pDev);
70int VBoxDispVHWADisable(PVBOXDISPDEV pDev);
71int VBoxDispVHWAInitHostInfo1(PVBOXDISPDEV pDev);
72int VBoxDispVHWAInitHostInfo2(PVBOXDISPDEV pDev, DWORD *pFourCC);
73
74VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST *VBoxDispVHWACommandCreate(PVBOXDISPDEV pDev, VBOXVHWACMD_TYPE enmCmd, VBOXVHWACMD_LENGTH cbCmd);
75void VBoxDispVHWACommandRelease(PVBOXDISPDEV pDev, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST *pCmd);
76BOOL VBoxDispVHWACommandSubmit(PVBOXDISPDEV pDev, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST*pCmd);
77void VBoxDispVHWACommandSubmitAsynch(PVBOXDISPDEV pDev, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST *pCmd,
78 PFNVBOXVHWACMDCOMPLETION pfnCompletion, void * pContext);
79void VBoxDispVHWACommandSubmitAsynchAndComplete(PVBOXDISPDEV pDev, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HOST *pCmd);
80void VBoxDispVHWACommandCheckHostCmds(PVBOXDISPDEV pDev);
81
82PVBOXVHWASURFDESC VBoxDispVHWASurfDescAlloc();
83void VBoxDispVHWASurfDescFree(PVBOXVHWASURFDESC pDesc);
84
85uint64_t VBoxDispVHWAVramOffsetFromPDEV(PVBOXDISPDEV pDev, ULONG_PTR offPdev);
86
87void VBoxDispVHWARectUnited(RECTL * pDst, RECTL * pRect1, RECTL * pRect2);
88bool VBoxDispVHWARectIsEmpty(RECTL * pRect);
89bool VBoxDispVHWARectIntersect(RECTL * pRect1, RECTL * pRect2);
90bool VBoxDispVHWARectInclude(RECTL * pRect1, RECTL * pRect2);
91bool VBoxDispVHWARegionIntersects(PVBOXVHWAREGION pReg, RECTL * pRect);
92bool VBoxDispVHWARegionIncludes(PVBOXVHWAREGION pReg, RECTL * pRect);
93bool VBoxDispVHWARegionIncluded(PVBOXVHWAREGION pReg, RECTL * pRect);
94void VBoxDispVHWARegionSet(PVBOXVHWAREGION pReg, RECTL * pRect);
95void VBoxDispVHWARegionAdd(PVBOXVHWAREGION pReg, RECTL * pRect);
96void VBoxDispVHWARegionInit(PVBOXVHWAREGION pReg);
97void VBoxDispVHWARegionClear(PVBOXVHWAREGION pReg);
98bool VBoxDispVHWARegionValid(PVBOXVHWAREGION pReg);
99void VBoxDispVHWARegionTrySubstitute(PVBOXVHWAREGION pReg, const RECTL *pRect);
100
101uint32_t VBoxDispVHWAFromDDCAPS(uint32_t caps);
102uint32_t VBoxDispVHWAToDDCAPS(uint32_t caps);
103uint32_t VBoxDispVHWAFromDDSCAPS(uint32_t caps);
104uint32_t VBoxDispVHWAToDDSCAPS(uint32_t caps);
105uint32_t VBoxDispVHWAFromDDPFS(uint32_t caps);
106uint32_t VBoxDispVHWAToDDPFS(uint32_t caps);
107uint32_t VBoxDispVHWAFromDDCKEYCAPS(uint32_t caps);
108uint32_t VBoxDispVHWAToDDCKEYCAPS(uint32_t caps);
109uint32_t VBoxDispVHWAToDDBLTs(uint32_t caps);
110uint32_t VBoxDispVHWAFromDDBLTs(uint32_t caps);
111uint32_t VBoxDispVHWAFromDDCAPS2(uint32_t caps);
112uint32_t VBoxDispVHWAToDDCAPS2(uint32_t caps);
113uint32_t VBoxDispVHWAFromDDOVERs(uint32_t caps);
114uint32_t VBoxDispVHWAToDDOVERs(uint32_t caps);
115uint32_t VBoxDispVHWAFromDDCKEYs(uint32_t caps);
116uint32_t VBoxDispVHWAToDDCKEYs(uint32_t caps);
117
118int VBoxDispVHWAFromDDSURFACEDESC(VBOXVHWA_SURFACEDESC RT_UNTRUSTED_VOLATILE_HOST *pVHWADesc, DDSURFACEDESC *pDdDesc);
119int VBoxDispVHWAFromDDPIXELFORMAT(VBOXVHWA_PIXELFORMAT RT_UNTRUSTED_VOLATILE_HOST *pVHWAFormat, DDPIXELFORMAT *pDdFormat);
120void VBoxDispVHWAFromDDOVERLAYFX(VBOXVHWA_OVERLAYFX RT_UNTRUSTED_VOLATILE_HOST *pVHWAOverlay, DDOVERLAYFX *pDdOverlay);
121void VBoxDispVHWAFromDDCOLORKEY(VBOXVHWA_COLORKEY RT_UNTRUSTED_VOLATILE_HOST *pVHWACKey, DDCOLORKEY *pDdCKey);
122void VBoxDispVHWAFromDDBLTFX(VBOXVHWA_BLTFX RT_UNTRUSTED_VOLATILE_HOST *pVHWABlt, DDBLTFX *pDdBlt);
123void VBoxDispVHWAFromRECTL(VBOXVHWA_RECTL *pDst, RECTL const *pSrc);
124void VBoxDispVHWAFromRECTL(VBOXVHWA_RECTL RT_UNTRUSTED_VOLATILE_HOST *pDst, RECTL const *pSrc);
125
126uint32_t VBoxDispVHWAUnsupportedDDCAPS(uint32_t caps);
127uint32_t VBoxDispVHWAUnsupportedDDSCAPS(uint32_t caps);
128uint32_t VBoxDispVHWAUnsupportedDDPFS(uint32_t caps);
129uint32_t VBoxDispVHWAUnsupportedDDCEYCAPS(uint32_t caps);
130uint32_t VBoxDispVHWASupportedDDCAPS(uint32_t caps);
131uint32_t VBoxDispVHWASupportedDDSCAPS(uint32_t caps);
132uint32_t VBoxDispVHWASupportedDDPFS(uint32_t caps);
133uint32_t VBoxDispVHWASupportedDDCEYCAPS(uint32_t caps);
134
135#endif /* !GA_INCLUDED_SRC_WINNT_Graphics_Video_disp_xpdm_VBoxDispVHWA_h */
136
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