VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.h@ 29883

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

wddm: open,create,destroy,lock,unlock resource

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 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 ___VBoxVideoWddm_h___
13#define ___VBoxVideoWddm_h___
14
15#include "../VBoxVideo.h"
16
17/* one page size */
18#define VBOXWDDM_C_DMA_BUFFER_SIZE 0x1000
19#define VBOXWDDM_C_ALLOC_LIST_SIZE 0xc00
20#define VBOXWDDM_C_PATH_LOCATION_LIST_SIZE 0xc00
21
22#define VBOXWDDM_C_POINTER_MAX_WIDTH 64
23#define VBOXWDDM_C_POINTER_MAX_HEIGHT 64
24
25#define VBOXWDDM_C_VDMA_BUFFER_SIZE (64*_1K)
26
27#ifdef VBOXWDDM_WITH_VBVA
28# define VBOXWDDM_RENDER_FROM_SHADOW
29#endif
30
31#ifndef DEBUG_misha
32# ifdef Assert
33# undef Assert
34# define Assert(_a) do{}while(0)
35# endif
36# ifdef AssertBreakpoint
37# undef AssertBreakpoint
38# define AssertBreakpoint() do{}while(0)
39# endif
40# ifdef AssertFailed
41# undef AssertFailed
42# define AssertFailed() do{}while(0)
43# endif
44#endif
45
46PVOID vboxWddmMemAlloc(IN SIZE_T cbSize);
47PVOID vboxWddmMemAllocZero(IN SIZE_T cbSize);
48VOID vboxWddmMemFree(PVOID pvMem);
49
50/* allocation */
51typedef struct VBOXWDDM_ALLOCATION
52{
53 VBOXWDDM_ALLOC_TYPE enmType;
54 UINT SegmentId;
55 VBOXVIDEOOFFSET offVram;
56 BOOLEAN bVisible;
57 BOOLEAN bAssigned;
58 VBOXWDDM_SURFACE_DESC SurfDesc;
59} VBOXWDDM_ALLOCATION, *PVBOXWDDM_ALLOCATION;
60
61typedef struct VBOXWDDM_RESOURCE
62{
63 VBOXWDDM_ALLOC_TYPE enmType;
64 UINT SegmentId;
65 VBOXVIDEOOFFSET offVram;
66 D3DDDI_RATIONAL RefreshRate;
67 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
68 BOOLEAN bVisible;
69 BOOLEAN bAssigned;
70 VBOXWDDM_SURFACE_DESC SurfDesc;
71 uint32_t cAllocations;
72} VBOXWDDM_RESOURCE, *PVBOXWDDM_RESOURCE;
73
74
75typedef enum
76{
77 VBOXWDDM_DEVICE_TYPE_UNDEFINED = 0,
78 VBOXWDDM_DEVICE_TYPE_SYSTEM
79} VBOXWDDM_DEVICE_TYPE;
80
81typedef struct VBOXWDDM_DEVICE
82{
83 struct _DEVICE_EXTENSION * pAdapter; /* Adapder info */
84 HANDLE hDevice; /* handle passed to CreateDevice */
85 VBOXWDDM_DEVICE_TYPE enmType; /* device creation flags passed to DxgkDdiCreateDevice, not sure we need it */
86} VBOXWDDM_DEVICE, *PVBOXWDDM_DEVICE;
87
88typedef enum
89{
90 VBOXWDDM_CONTEXT_TYPE_UNDEFINED = 0,
91 VBOXWDDM_CONTEXT_TYPE_SYSTEM
92} VBOXWDDM_CONTEXT_TYPE;
93
94typedef struct VBOXWDDM_CONTEXT
95{
96 struct VBOXWDDM_DEVICE * pDevice;
97 HANDLE hContext;
98 VBOXWDDM_CONTEXT_TYPE enmType;
99 UINT NodeOrdinal;
100 UINT EngineAffinity;
101 UINT uLastCompletedCmdFenceId;
102} VBOXWDDM_CONTEXT, *PVBOXWDDM_CONTEXT;
103
104typedef struct VBOXWDDM_DMA_PRIVATE_DATA
105{
106 PVBOXWDDM_CONTEXT pContext;
107 VBOXVDMACMD_TYPE enmCmd;
108#ifdef VBOXWDDM_RENDER_FROM_SHADOW
109 RECT rect;
110 VBOXVIDEOOFFSET offShadow;
111 UINT segmentIdShadow;
112 D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId;
113#endif
114// uint8_t Reserved[8];
115}VBOXWDDM_DMA_PRIVATE_DATA, *PVBOXWDDM_DMA_PRIVATE_DATA;
116
117typedef struct VBOXWDDM_OPENALLOCATION
118{
119 D3DKMT_HANDLE hAllocation;
120} VBOXWDDM_OPENALLOCATION, *PVBOXWDDM_OPENALLOCATION;
121
122#endif /* #ifndef ___VBoxVideoWddm_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