VirtualBox

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

Last change on this file was 106061, checked in by vboxsync, 3 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1/* $Id: VBoxGaDriver.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * VirtualBox Windows Guest Mesa3D - Gallium driver interface.
4 */
5
6/*
7 * Copyright (C) 2016-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef GA_INCLUDED_3D_WIN_VBoxGaDriver_h
29#define GA_INCLUDED_3D_WIN_VBoxGaDriver_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include <VBoxGaHWInfo.h>
35#include <VBoxGaTypes.h>
36
37#include <iprt/win/windows.h>
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43typedef struct WDDMGalliumDriverEnv
44{
45 /* Size of the structure. */
46 DWORD cb;
47 const VBOXGAHWINFO *pHWInfo;
48 /* The environment context pointer to use in the following callbacks. */
49 void *pvEnv;
50 /* The callbacks to use by the driver. */
51 DECLCALLBACKMEMBER(uint32_t, pfnContextCreate,(void *pvEnv,
52 boolean extended,
53 boolean vgpu10));
54 DECLCALLBACKMEMBER(void, pfnContextDestroy,(void *pvEnv,
55 uint32_t u32Cid));
56 DECLCALLBACKMEMBER(int, pfnSurfaceDefine,(void *pvEnv,
57 GASURFCREATE *pCreateParms,
58 GASURFSIZE *paSizes,
59 uint32_t cSizes,
60 uint32_t *pu32Sid));
61 DECLCALLBACKMEMBER(void, pfnSurfaceDestroy,(void *pvEnv,
62 uint32_t u32Sid));
63 DECLCALLBACKMEMBER(int, pfnRender,(void *pvEnv,
64 uint32_t u32Cid,
65 void *pvCommands,
66 uint32_t cbCommands,
67 GAFENCEQUERY *pFenceQuery));
68 DECLCALLBACKMEMBER(void, pfnFenceUnref,(void *pvEnv,
69 uint32_t u32FenceHandle));
70 DECLCALLBACKMEMBER(int, pfnFenceQuery,(void *pvEnv,
71 uint32_t u32FenceHandle,
72 GAFENCEQUERY *pFenceQuery));
73 DECLCALLBACKMEMBER(int, pfnFenceWait,(void *pvEnv,
74 uint32_t u32FenceHandle,
75 uint32_t u32TimeoutUS));
76 DECLCALLBACKMEMBER(int, pfnRegionCreate,(void *pvEnv,
77 uint32_t u32RegionSize,
78 uint32_t *pu32GmrId,
79 void **ppvMap));
80 DECLCALLBACKMEMBER(void, pfnRegionDestroy,(void *pvEnv,
81 uint32_t u32GmrId,
82 void *pvMap));
83 /* VGPU10 */
84 DECLCALLBACKMEMBER(int, pfnGBSurfaceDefine,(void *pvEnv,
85 SVGAGBSURFCREATE *pCreateParms));
86} WDDMGalliumDriverEnv;
87
88struct pipe_context;
89struct pipe_screen;
90struct pipe_resource;
91
92typedef struct pipe_screen * WINAPI FNGaDrvScreenCreate(const WDDMGalliumDriverEnv *pEnv);
93typedef FNGaDrvScreenCreate *PFNGaDrvScreenCreate;
94
95typedef void WINAPI FNGaDrvScreenDestroy(struct pipe_screen *s);
96typedef FNGaDrvScreenDestroy *PFNGaDrvScreenDestroy;
97
98typedef const WDDMGalliumDriverEnv * WINAPI FNGaDrvGetWDDMEnv(struct pipe_screen *pScreen);
99typedef FNGaDrvGetWDDMEnv *PFNGaDrvGetWDDMEnv;
100
101typedef uint32_t WINAPI FNGaDrvGetContextId(struct pipe_context *pPipeContext);
102typedef FNGaDrvGetContextId *PFNGaDrvGetContextId;
103
104typedef uint32_t WINAPI FNGaDrvGetSurfaceId(struct pipe_screen *pScreen, struct pipe_resource *pResource);
105typedef FNGaDrvGetSurfaceId *PFNGaDrvGetSurfaceId;
106
107typedef void WINAPI FNGaDrvContextFlush(struct pipe_context *pPipeContext);
108typedef FNGaDrvContextFlush *PFNGaDrvContextFlush;
109
110#ifdef __cplusplus
111}
112#endif
113
114#endif /* !GA_INCLUDED_3D_WIN_VBoxGaDriver_h */
115
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