VirtualBox

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

最後變更 在這個檔案從95234是 95234,由 vboxsync 提交於 3 年 前

WDDM: allow gallium based d3d9 and opengl drivers to work with VGPU10. bugref:9845

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.2 KB
 
1/* $Id: VBoxGaDriver.h 95234 2022-06-08 16:31:28Z vboxsync $ */
2/** @file
3 * VirtualBox Windows Guest Mesa3D - Gallium driver interface.
4 */
5
6/*
7 * Copyright (C) 2016-2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.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 /* VGPU10 */
74 DECLCALLBACKMEMBER(int, pfnGBSurfaceDefine,(void *pvEnv,
75 SVGAGBSURFCREATE *pCreateParms));
76} WDDMGalliumDriverEnv;
77
78struct pipe_context;
79struct pipe_screen;
80struct pipe_resource;
81
82typedef struct pipe_screen * WINAPI FNGaDrvScreenCreate(const WDDMGalliumDriverEnv *pEnv);
83typedef FNGaDrvScreenCreate *PFNGaDrvScreenCreate;
84
85typedef void WINAPI FNGaDrvScreenDestroy(struct pipe_screen *s);
86typedef FNGaDrvScreenDestroy *PFNGaDrvScreenDestroy;
87
88typedef const WDDMGalliumDriverEnv * WINAPI FNGaDrvGetWDDMEnv(struct pipe_screen *pScreen);
89typedef FNGaDrvGetWDDMEnv *PFNGaDrvGetWDDMEnv;
90
91typedef uint32_t WINAPI FNGaDrvGetContextId(struct pipe_context *pPipeContext);
92typedef FNGaDrvGetContextId *PFNGaDrvGetContextId;
93
94typedef uint32_t WINAPI FNGaDrvGetSurfaceId(struct pipe_screen *pScreen, struct pipe_resource *pResource);
95typedef FNGaDrvGetSurfaceId *PFNGaDrvGetSurfaceId;
96
97typedef void WINAPI FNGaDrvContextFlush(struct pipe_context *pPipeContext);
98typedef FNGaDrvContextFlush *PFNGaDrvContextFlush;
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif /* !GA_INCLUDED_3D_WIN_VBoxGaDriver_h */
105
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette