VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVbva.h@ 31713

Last change on this file since 31713 was 30953, checked in by vboxsync, 14 years ago

wddm/2d: notify host on color fill FB update, bugfix

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/*
2 * Copyright (C) 2010 Oracle Corporation
3 *
4 * This file is part of VirtualBox Open Source Edition (OSE), as
5 * available from http://www.virtualbox.org. This file is free software;
6 * you can redistribute it and/or modify it under the terms of the GNU
7 * General Public License (GPL) as published by the Free Software
8 * Foundation, in version 2 as it comes in the "COPYING" file of the
9 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
10 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
11 */
12#ifndef ___VBoxVideoVbva_h___
13#define ___VBoxVideoVbva_h___
14
15typedef struct VBOXVBVAINFO
16{
17 VBOXVIDEOOFFSET offVBVA;
18 uint32_t cbVBVA;
19 VBVABUFFER *pVBVA;
20 BOOL fHwBufferOverflow;
21 VBVARECORD *pRecord;
22 D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId;
23 KSPIN_LOCK Lock;
24} VBOXVBVAINFO;
25
26int vboxVbvaEnable (struct _DEVICE_EXTENSION* pDevExt, VBOXVBVAINFO *pVbva);
27int vboxVbvaDisable (struct _DEVICE_EXTENSION* pDevExt, VBOXVBVAINFO *pVbva);
28int vboxVbvaDestroy(PDEVICE_EXTENSION pDevExt, VBOXVBVAINFO *pVbva);
29int vboxVbvaCreate(struct _DEVICE_EXTENSION* pDevExt, VBOXVBVAINFO *pVbva, ULONG offBuffer, ULONG cbBuffer, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId);
30int vboxVbvaReportCmdOffset (struct _DEVICE_EXTENSION* pDevExt, VBOXVBVAINFO *pVbva, uint32_t offCmd);
31int vboxVbvaReportDirtyRect (struct _DEVICE_EXTENSION* pDevExt, VBOXVBVAINFO *pVbva, RECT *pRectOrig);
32BOOL vboxVbvaBufferBeginUpdate (struct _DEVICE_EXTENSION* pDevExt, VBOXVBVAINFO *pVbva);
33void vboxVbvaBufferEndUpdate (struct _DEVICE_EXTENSION* pDevExt, VBOXVBVAINFO *pVbva);
34
35#define VBOXVBVA_OP(_op, _pdext, _pvbva, _arg) \
36 do { \
37 if (vboxVbvaBufferBeginUpdate(_pdext, _pvbva)) \
38 { \
39 vboxVbva##_op(_pdext, _pvbva, _arg); \
40 vboxVbvaBufferEndUpdate(_pdext, _pvbva); \
41 } \
42 } while (0)
43
44#define VBOXVBVA_OP_WITHLOCK_ATDPC(_op, _pdext, _pvbva, _arg) \
45 do { \
46 KeAcquireSpinLockAtDpcLevel(&(_pvbva)->Lock); \
47 VBOXVBVA_OP(_op, _pdext, _pvbva, _arg); \
48 KeReleaseSpinLockFromDpcLevel(&(_pvbva)->Lock);\
49 } while (0)
50
51#define VBOXVBVA_OP_WITHLOCK(_op, _pdext, _pvbva, _arg) \
52 do { \
53 KIRQL OldIrql; \
54 KeAcquireSpinLock(&(_pvbva)->Lock, &OldIrql); \
55 VBOXVBVA_OP(_op, _pdext, _pvbva, _arg); \
56 KeReleaseSpinLock(&(_pvbva)->Lock, OldIrql); \
57 } while (0)
58
59
60#endif /* #ifndef ___VBoxVideoVbva_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