VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxUhgsmiKmt.h@ 33530

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

wddm/3d: chromium hgsmi: better alloc/submit engine

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1/** @file
2 *
3 * VBoxVideo Display D3D User mode dll
4 *
5 * Copyright (C) 2010 Oracle Corporation
6 *
7 * This file is part of VirtualBox Open Source Edition (OSE), as
8 * available from http://www.virtualbox.org. This file is free software;
9 * you can redistribute it and/or modify it under the terms of the GNU
10 * General Public License (GPL) as published by the Free Software
11 * Foundation, in version 2 as it comes in the "COPYING" file of the
12 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14 */
15#ifndef ___VBoxUhgsmiKmt_h__
16#define ___VBoxUhgsmiKmt_h__
17
18#include "VBoxUhgsmiBase.h"
19#include "VBoxDispD3DCmn.h"
20
21#include <D3dkmthk.h>
22
23typedef struct VBOXDISPKMT_CALLBACKS
24{
25 HMODULE hGdi32;
26 /* open adapter */
27 PFND3DKMT_OPENADAPTERFROMHDC pfnD3DKMTOpenAdapterFromHdc;
28 PFND3DKMT_OPENADAPTERFROMGDIDISPLAYNAME pfnD3DKMTOpenAdapterFromGdiDisplayName;
29 /* close adapter */
30 PFND3DKMT_CLOSEADAPTER pfnD3DKMTCloseAdapter;
31 /* escape */
32 PFND3DKMT_ESCAPE pfnD3DKMTEscape;
33
34 PFND3DKMT_CREATEDEVICE pfnD3DKMTCreateDevice;
35 PFND3DKMT_DESTROYDEVICE pfnD3DKMTDestroyDevice;
36 PFND3DKMT_CREATECONTEXT pfnD3DKMTCreateContext;
37 PFND3DKMT_DESTROYCONTEXT pfnD3DKMTDestroyContext;
38
39 PFND3DKMT_RENDER pfnD3DKMTRender;
40
41 PFND3DKMT_CREATEALLOCATION pfnD3DKMTCreateAllocation;
42 PFND3DKMT_DESTROYALLOCATION pfnD3DKMTDestroyAllocation;
43
44 PFND3DKMT_LOCK pfnD3DKMTLock;
45 PFND3DKMT_UNLOCK pfnD3DKMTUnlock;
46} VBOXDISPKMT_CALLBACKS, *PVBOXDISPKMT_CALLBACKS;
47
48HRESULT vboxDispKmtCallbacksInit(PVBOXDISPKMT_CALLBACKS pCallbacks);
49HRESULT vboxDispKmtCallbacksTerm(PVBOXDISPKMT_CALLBACKS pCallbacks);
50
51typedef struct VBOXDISPKMT_ADAPTER
52{
53 D3DKMT_HANDLE hAdapter;
54 PVBOXDISPKMT_CALLBACKS pCallbacks;
55}VBOXDISPKMT_ADAPTER, *PVBOXDISPKMT_ADAPTER;
56
57typedef struct VBOXDISPKMT_DEVICE
58{
59 struct VBOXDISPKMT_ADAPTER *pAdapter;
60 D3DKMT_HANDLE hDevice;
61 VOID *pCommandBuffer;
62 UINT CommandBufferSize;
63 D3DDDI_ALLOCATIONLIST *pAllocationList;
64 UINT AllocationListSize;
65 D3DDDI_PATCHLOCATIONLIST *pPatchLocationList;
66 UINT PatchLocationListSize;
67}VBOXDISPKMT_DEVICE, *PVBOXDISPKMT_DEVICE;
68
69typedef struct VBOXDISPKMT_CONTEXT
70{
71 struct VBOXDISPKMT_DEVICE *pDevice;
72 D3DKMT_HANDLE hContext;
73 VOID *pCommandBuffer;
74 UINT CommandBufferSize;
75 D3DDDI_ALLOCATIONLIST *pAllocationList;
76 UINT AllocationListSize;
77 D3DDDI_PATCHLOCATIONLIST *pPatchLocationList;
78 UINT PatchLocationListSize;
79} VBOXDISPKMT_CONTEXT, *PVBOXDISPKMT_CONTEXT;
80
81typedef struct VBOXUHGSMI_PRIVATE_KMT
82{
83 VBOXUHGSMI_PRIVATE_BASE BasePrivate;
84 VBOXDISPKMT_CALLBACKS Callbacks;
85 VBOXDISPKMT_ADAPTER Adapter;
86 VBOXDISPKMT_DEVICE Device;
87 VBOXDISPKMT_CONTEXT Context;
88} VBOXUHGSMI_PRIVATE_KMT, *PVBOXUHGSMI_PRIVATE_KMT;
89
90#define VBOXUHGSMIKMT_GET_PRIVATE(_p, _t) ((_t*)(((uint8_t*)_p) - RT_OFFSETOF(_t, BasePrivate.Base)))
91#define VBOXUHGSMIKMT_GET(_p) VBOXUHGSMIKMT_GET_PRIVATE(_p, VBOXUHGSMI_PRIVATE_KMT)
92
93HRESULT vboxDispKmtOpenAdapter(PVBOXDISPKMT_CALLBACKS pCallbacks, PVBOXDISPKMT_ADAPTER pAdapter);
94HRESULT vboxDispKmtCloseAdapter(PVBOXDISPKMT_ADAPTER pAdapter);
95HRESULT vboxDispKmtCreateDevice(PVBOXDISPKMT_ADAPTER pAdapter, PVBOXDISPKMT_DEVICE pDevice);
96HRESULT vboxDispKmtDestroyDevice(PVBOXDISPKMT_DEVICE pDevice);
97HRESULT vboxDispKmtCreateContext(PVBOXDISPKMT_DEVICE pDevice, PVBOXDISPKMT_CONTEXT pContext, BOOL bD3D);
98HRESULT vboxDispKmtDestroyContext(PVBOXDISPKMT_CONTEXT pContext);
99
100HRESULT vboxUhgsmiKmtCreate(PVBOXUHGSMI_PRIVATE_KMT pHgsmi, BOOL bD3D);
101HRESULT vboxUhgsmiKmtDestroy(PVBOXUHGSMI_PRIVATE_KMT pHgsmi);
102
103HRESULT vboxUhgsmiKmtEscCreate(PVBOXUHGSMI_PRIVATE_KMT pHgsmi, BOOL bD3D);
104
105
106#endif /* #ifndef ___VBoxUhgsmiKmt_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