VirtualBox

source: vbox/trunk/src/VBox/Additions/3D/win/VBoxWddmUmHlp/VBoxWddmUmHlp.h@ 75443

Last change on this file since 75443 was 75443, checked in by vboxsync, 6 years ago

Exported Mesa related code to OSE.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: VBoxWddmUmHlp.h 75443 2018-11-14 10:17:08Z vboxsync $ */
2/** @file
3 * VBox WDDM User Mode Driver Helpers
4 */
5
6/*
7 * Copyright (C) 2018 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 ___VBoxWddmUmHlp_h__
19#define ___VBoxWddmUmHlp_h__
20
21#include <iprt/win/d3d9.h>
22#include <d3dumddi.h>
23#include <d3dkmthk.h>
24
25#include <iprt/asm.h>
26#include <iprt/cdefs.h>
27
28/* Do not require IPRT library. */
29#if defined(Assert)
30#undef Assert
31#endif
32#ifdef RT_STRICT
33#define Assert(_e) (void)( (!!(_e)) || (ASMBreakpoint(), 0) )
34#else
35#define Assert(_e) (void)( 0 )
36#endif
37
38/* Do not require ntstatus.h.
39 * D3DKMT functions return NTSTATUS, but the driver code uses it only as a success/failure indicator.
40 * Therefore define the success and a failure status here.
41 */
42#ifndef STATUS_SUCCESS
43#define STATUS_SUCCESS 0
44#endif
45#ifndef STATUS_NOT_SUPPORTED
46#define STATUS_NOT_SUPPORTED ((NTSTATUS)0xC00000BBL)
47#endif
48
49RT_C_DECLS_BEGIN
50
51typedef struct VBOXWDDMDLLPROC
52{
53 char const *pszName;
54 FARPROC *ppfn;
55} VBOXWDDMDLLPROC;
56
57typedef struct D3DKMTFUNCTIONS
58{
59 PFND3DKMT_OPENADAPTERFROMHDC pfnD3DKMTOpenAdapterFromHdc;
60 PFND3DKMT_OPENADAPTERFROMDEVICENAME pfnD3DKMTOpenAdapterFromDeviceName;
61 PFND3DKMT_CLOSEADAPTER pfnD3DKMTCloseAdapter;
62 PFND3DKMT_QUERYADAPTERINFO pfnD3DKMTQueryAdapterInfo;
63 PFND3DKMT_ESCAPE pfnD3DKMTEscape;
64 PFND3DKMT_CREATEDEVICE pfnD3DKMTCreateDevice;
65 PFND3DKMT_DESTROYDEVICE pfnD3DKMTDestroyDevice;
66 PFND3DKMT_CREATECONTEXT pfnD3DKMTCreateContext;
67 PFND3DKMT_DESTROYCONTEXT pfnD3DKMTDestroyContext;
68 PFND3DKMT_CREATEALLOCATION pfnD3DKMTCreateAllocation;
69 PFND3DKMT_DESTROYALLOCATION pfnD3DKMTDestroyAllocation;
70 PFND3DKMT_RENDER pfnD3DKMTRender;
71 PFND3DKMT_PRESENT pfnD3DKMTPresent;
72 PFND3DKMT_GETSHAREDPRIMARYHANDLE pfnD3DKMTGetSharedPrimaryHandle;
73 PFND3DKMT_QUERYRESOURCEINFO pfnD3DKMTQueryResourceInfo;
74 PFND3DKMT_OPENRESOURCE pfnD3DKMTOpenResource;
75
76 /* Win 8+ */
77 PFND3DKMT_ENUMADAPTERS pfnD3DKMTEnumAdapters;
78 PFND3DKMT_OPENADAPTERFROMLUID pfnD3DKMTOpenAdapterFromLuid;
79} D3DKMTFUNCTIONS;
80
81DECLCALLBACK(HMODULE) VBoxWddmLoadSystemDll(const char *pszName);
82DECLCALLBACK(HMODULE) VBoxWddmLoadAdresses(const char *pszModName, VBOXWDDMDLLPROC *paProcs);
83
84DECLCALLBACK(int) D3DKMTLoad(void);
85DECLCALLBACK(D3DKMTFUNCTIONS const *) D3DKMTFunctions(void);
86
87DECLCALLBACK(void) VBoxWddmUmLog(const char *pszString);
88
89RT_C_DECLS_END
90
91#endif
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