VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVbva.h@ 85817

Last change on this file since 85817 was 82968, checked in by vboxsync, 5 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.4 KB
Line 
1/* $Id: VBoxMPVbva.h 82968 2020-02-04 10:35:17Z vboxsync $ */
2/** @file
3 * VBox WDDM Miniport driver
4 */
5
6/*
7 * Copyright (C) 2011-2020 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_mp_wddm_VBoxMPVbva_h
19#define GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_wddm_VBoxMPVbva_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBox/cdefs.h> /* for VBOXCALL */
25
26typedef struct VBOXVBVAINFO
27{
28 VBVABUFFERCONTEXT Vbva;
29 D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId;
30 KSPIN_LOCK Lock;
31} VBOXVBVAINFO;
32
33int vboxVbvaEnable(PVBOXMP_DEVEXT pDevExt, VBOXVBVAINFO *pVbva);
34int vboxVbvaDisable(PVBOXMP_DEVEXT pDevExt, VBOXVBVAINFO *pVbva);
35int vboxVbvaDestroy(PVBOXMP_DEVEXT pDevExt, VBOXVBVAINFO *pVbva);
36int vboxVbvaCreate(PVBOXMP_DEVEXT pDevExt, VBOXVBVAINFO *pVbva, ULONG offBuffer, ULONG cbBuffer, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId);
37int vboxVbvaReportDirtyRect(PVBOXMP_DEVEXT pDevExt, struct VBOXWDDM_SOURCE *pSrc, RECT *pRectOrig);
38
39#define VBOXVBVA_OP(_op, _pdext, _psrc, _arg) \
40 do { \
41 if (VBoxVBVABufferBeginUpdate(&(_psrc)->Vbva.Vbva, &VBoxCommonFromDeviceExt(_pdext)->guestCtx)) \
42 { \
43 vboxVbva##_op(_pdext, _psrc, _arg); \
44 VBoxVBVABufferEndUpdate(&(_psrc)->Vbva.Vbva); \
45 } \
46 } while (0)
47
48#define VBOXVBVA_OP_WITHLOCK_ATDPC(_op, _pdext, _psrc, _arg) \
49 do { \
50 Assert(KeGetCurrentIrql() == DISPATCH_LEVEL); \
51 KeAcquireSpinLockAtDpcLevel(&(_psrc)->Vbva.Lock); \
52 VBOXVBVA_OP(_op, _pdext, _psrc, _arg); \
53 KeReleaseSpinLockFromDpcLevel(&(_psrc)->Vbva.Lock);\
54 } while (0)
55
56#define VBOXVBVA_OP_WITHLOCK(_op, _pdext, _psrc, _arg) \
57 do { \
58 KIRQL OldIrql; \
59 KeAcquireSpinLock(&(_psrc)->Vbva.Lock, &OldIrql); \
60 VBOXVBVA_OP(_op, _pdext, _psrc, _arg); \
61 KeReleaseSpinLock(&(_psrc)->Vbva.Lock, OldIrql); \
62 } while (0)
63
64#endif /* !GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_wddm_VBoxMPVbva_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