VirtualBox

source: vbox/trunk/src/VBox/Additions/3D/win/include/VBoxGaDriver.h@ 76563

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

Additions: Use GA_INCLUDED_ and variations_ as header guard prefixes with scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1/* $Id: VBoxGaDriver.h 76563 2019-01-01 03:53:56Z vboxsync $ */
2/** @file
3 * VirtualBox Windows Guest Mesa3D - Gallium driver interface.
4 */
5
6/*
7 * Copyright (C) 2016-2019 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_3D_WIN_VBoxGaDriver_h
19#define GA_INCLUDED_3D_WIN_VBoxGaDriver_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBoxGaHWInfo.h>
25#include <VBoxGaTypes.h>
26
27#include <iprt/win/windows.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33typedef struct WDDMGalliumDriverEnv
34{
35 /* Size of the structure. */
36 DWORD cb;
37 const VBOXGAHWINFO *pHWInfo;
38 /* The environment context pointer to use in the following callbacks. */
39 void *pvEnv;
40 /* The callbacks to use by the driver. */
41 DECLCALLBACKMEMBER(uint32_t, pfnContextCreate)(void *pvEnv,
42 boolean extended,
43 boolean vgpu10);
44 DECLCALLBACKMEMBER(void, pfnContextDestroy)(void *pvEnv,
45 uint32_t u32Cid);
46 DECLCALLBACKMEMBER(int, pfnSurfaceDefine)(void *pvEnv,
47 GASURFCREATE *pCreateParms,
48 GASURFSIZE *paSizes,
49 uint32_t cSizes,
50 uint32_t *pu32Sid);
51 DECLCALLBACKMEMBER(void, pfnSurfaceDestroy)(void *pvEnv,
52 uint32_t u32Sid);
53 DECLCALLBACKMEMBER(int, pfnRender)(void *pvEnv,
54 uint32_t u32Cid,
55 void *pvCommands,
56 uint32_t cbCommands,
57 GAFENCEQUERY *pFenceQuery);
58 DECLCALLBACKMEMBER(void, pfnFenceUnref)(void *pvEnv,
59 uint32_t u32FenceHandle);
60 DECLCALLBACKMEMBER(int, pfnFenceQuery)(void *pvEnv,
61 uint32_t u32FenceHandle,
62 GAFENCEQUERY *pFenceQuery);
63 DECLCALLBACKMEMBER(int, pfnFenceWait)(void *pvEnv,
64 uint32_t u32FenceHandle,
65 uint32_t u32TimeoutUS);
66 DECLCALLBACKMEMBER(int, pfnRegionCreate)(void *pvEnv,
67 uint32_t u32RegionSize,
68 uint32_t *pu32GmrId,
69 void **ppvMap);
70 DECLCALLBACKMEMBER(void, pfnRegionDestroy)(void *pvEnv,
71 uint32_t u32GmrId,
72 void *pvMap);
73} WDDMGalliumDriverEnv;
74
75typedef struct pipe_screen * WINAPI FNGaDrvScreenCreate(const WDDMGalliumDriverEnv *pEnv);
76typedef FNGaDrvScreenCreate *PFNGaDrvScreenCreate;
77
78typedef void WINAPI FNGaDrvScreenDestroy(struct pipe_screen *s);
79typedef FNGaDrvScreenDestroy *PFNGaDrvScreenDestroy;
80
81typedef const WDDMGalliumDriverEnv * WINAPI FNGaDrvGetWDDMEnv(struct pipe_screen *pScreen);
82typedef FNGaDrvGetWDDMEnv *PFNGaDrvGetWDDMEnv;
83
84typedef uint32_t WINAPI FNGaDrvGetContextId(struct pipe_context *pPipeContext);
85typedef FNGaDrvGetContextId *PFNGaDrvGetContextId;
86
87typedef uint32_t WINAPI FNGaDrvGetSurfaceId(struct pipe_screen *pScreen, struct pipe_resource *pResource);
88typedef FNGaDrvGetSurfaceId *PFNGaDrvGetSurfaceId;
89
90typedef void WINAPI FNGaDrvContextFlush(struct pipe_context *pPipeContext);
91typedef FNGaDrvContextFlush *PFNGaDrvContextFlush;
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* !GA_INCLUDED_3D_WIN_VBoxGaDriver_h */
98
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