1 | /* $Id: DevVGA-SVGA3d.h 88787 2021-04-29 15:51:13Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * DevVMWare - VMWare SVGA device - 3D part.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2013-2020 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 VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_h
|
---|
19 | #define VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | #include "DevVGA-SVGA.h"
|
---|
25 |
|
---|
26 |
|
---|
27 | /** Arbitrary limit */
|
---|
28 | #define SVGA3D_MAX_SHADER_IDS 0x800
|
---|
29 | /** D3D allows up to 8 texture stages. */
|
---|
30 | #define SVGA3D_MAX_TEXTURE_STAGES 8
|
---|
31 | /** Samplers: 16 Pixel Shader + 1 Displacement Map + 4 Vertex Shader */
|
---|
32 | #define SVGA3D_MAX_SAMPLERS_PS 16
|
---|
33 | #define SVGA3D_MAX_SAMPLERS_DMAP 1
|
---|
34 | #define SVGA3D_MAX_SAMPLERS_VS 4
|
---|
35 | #define SVGA3D_MAX_SAMPLERS (SVGA3D_MAX_SAMPLERS_PS + SVGA3D_MAX_SAMPLERS_DMAP + SVGA3D_MAX_SAMPLERS_VS)
|
---|
36 | /** Arbitrary upper limit; seen 8 so far. */
|
---|
37 | #define SVGA3D_MAX_LIGHTS 32
|
---|
38 | /** Arbitrary upper limit; 2GB enough for 32768x16384*4. */
|
---|
39 | #define SVGA3D_MAX_SURFACE_MEM_SIZE 0x80000000
|
---|
40 |
|
---|
41 |
|
---|
42 | /**@def FLOAT_FMT_STR
|
---|
43 | * Format string bits to go with FLOAT_FMT_ARGS. */
|
---|
44 | #define FLOAT_FMT_STR "%s%u.%06u"
|
---|
45 | /** @def FLOAT_FMT_ARGS
|
---|
46 | * Format arguments for a float value, corresponding to FLOAT_FMT_STR.
|
---|
47 | * @param r The floating point value to format. */
|
---|
48 | #define FLOAT_FMT_ARGS(r) (r) >= 0.0f ? "" : "-", (unsigned)RT_ABS(r), (unsigned)(RT_ABS((r) - (unsigned)(r)) * 1000000.0f)
|
---|
49 |
|
---|
50 |
|
---|
51 | typedef enum VMSVGA3D_SURFACE_MAP
|
---|
52 | {
|
---|
53 | VMSVGA3D_SURFACE_MAP_READ,
|
---|
54 | VMSVGA3D_SURFACE_MAP_WRITE,
|
---|
55 | VMSVGA3D_SURFACE_MAP_READ_WRITE,
|
---|
56 | VMSVGA3D_SURFACE_MAP_WRITE_DISCARD,
|
---|
57 | } VMSVGA3D_SURFACE_MAP;
|
---|
58 |
|
---|
59 | typedef struct VMSVGA3D_MAPPED_SURFACE
|
---|
60 | {
|
---|
61 | VMSVGA3D_SURFACE_MAP enmMapType;
|
---|
62 | SVGA3dBox box;
|
---|
63 | uint32_t cbPixel;
|
---|
64 | uint32_t cbRowPitch;
|
---|
65 | uint32_t cbDepthPitch;
|
---|
66 | void *pvData;
|
---|
67 | } VMSVGA3D_MAPPED_SURFACE;
|
---|
68 |
|
---|
69 | #ifdef DUMP_BITMAPS
|
---|
70 | void vmsvga3dMapWriteBmpFile(VMSVGA3D_MAPPED_SURFACE const *pMap, char const *pszPrefix);
|
---|
71 | #endif
|
---|
72 |
|
---|
73 | /* DevVGA-SVGA.cpp: */
|
---|
74 | void vmsvgaR33dSurfaceUpdateHeapBuffersOnFifoThread(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC, uint32_t sid);
|
---|
75 |
|
---|
76 |
|
---|
77 | /* DevVGA-SVGA3d-ogl.cpp & DevVGA-SVGA3d-win.cpp: */
|
---|
78 | int vmsvga3dInit(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC);
|
---|
79 | int vmsvga3dPowerOn(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC);
|
---|
80 | int vmsvga3dLoadExec(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);
|
---|
81 | int vmsvga3dSaveExec(PPDMDEVINS pDevIns, PVGASTATECC pThisCC, PSSMHANDLE pSSM);
|
---|
82 | int vmsvga3dTerminate(PVGASTATECC pThisCC);
|
---|
83 | int vmsvga3dReset(PVGASTATECC pThisCC);
|
---|
84 | void vmsvga3dUpdateHostScreenViewport(PVGASTATECC pThisCC, uint32_t idScreen, VMSVGAVIEWPORT const *pOldViewport);
|
---|
85 | int vmsvga3dQueryCaps(PVGASTATECC pThisCC, SVGA3dDevCapIndex idx3dCaps, uint32_t *pu32Val);
|
---|
86 |
|
---|
87 | int vmsvga3dSurfaceDefine(PVGASTATECC pThisCC, uint32_t sid, SVGA3dSurface1Flags surfaceFlags, SVGA3dSurfaceFormat format,
|
---|
88 | uint32_t multisampleCount, SVGA3dTextureFilter autogenFilter,
|
---|
89 | uint32_t cMipLevels, SVGA3dSize const *pMipLevel0Size);
|
---|
90 | int vmsvga3dSurfaceDestroy(PVGASTATECC pThisCC, uint32_t sid);
|
---|
91 | int vmsvga3dSurfaceCopy(PVGASTATECC pThisCC, SVGA3dSurfaceImageId dest, SVGA3dSurfaceImageId src,
|
---|
92 | uint32_t cCopyBoxes, SVGA3dCopyBox *pBox);
|
---|
93 | int vmsvga3dSurfaceStretchBlt(PVGASTATE pThis, PVGASTATECC pThisCC,
|
---|
94 | SVGA3dSurfaceImageId const *pDstSfcImg, SVGA3dBox const *pDstBox,
|
---|
95 | SVGA3dSurfaceImageId const *pSrcSfcImg, SVGA3dBox const *pSrcBox, SVGA3dStretchBltMode enmMode);
|
---|
96 | int vmsvga3dSurfaceDMA(PVGASTATE pThis, PVGASTATECC pThisCC, SVGAGuestImage guest, SVGA3dSurfaceImageId host, SVGA3dTransferType transfer, uint32_t cCopyBoxes, SVGA3dCopyBox *pBoxes);
|
---|
97 | int vmsvga3dSurfaceBlitToScreen(PVGASTATE pThis, PVGASTATECC pThisCC, uint32_t dest, SVGASignedRect destRect, SVGA3dSurfaceImageId srcImage, SVGASignedRect srcRect, uint32_t cRects, SVGASignedRect *pRect);
|
---|
98 |
|
---|
99 | int vmsvga3dContextDefine(PVGASTATECC pThisCC, uint32_t cid);
|
---|
100 | int vmsvga3dContextDestroy(PVGASTATECC pThisCC, uint32_t cid);
|
---|
101 |
|
---|
102 | int vmsvga3dChangeMode(PVGASTATECC pThisCC);
|
---|
103 |
|
---|
104 | int vmsvga3dDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen);
|
---|
105 | int vmsvga3dDestroyScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen);
|
---|
106 |
|
---|
107 | int vmsvga3dSetTransform(PVGASTATECC pThisCC, uint32_t cid, SVGA3dTransformType type, float matrix[16]);
|
---|
108 | int vmsvga3dSetZRange(PVGASTATECC pThisCC, uint32_t cid, SVGA3dZRange zRange);
|
---|
109 | int vmsvga3dSetRenderState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cRenderStates, SVGA3dRenderState *pRenderState);
|
---|
110 | int vmsvga3dSetRenderTarget(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRenderTargetType type, SVGA3dSurfaceImageId target);
|
---|
111 | int vmsvga3dSetTextureState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState);
|
---|
112 | int vmsvga3dSetMaterial(PVGASTATECC pThisCC, uint32_t cid, SVGA3dFace face, SVGA3dMaterial *pMaterial);
|
---|
113 | int vmsvga3dSetLightData(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData);
|
---|
114 | int vmsvga3dSetLightEnabled(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, uint32_t enabled);
|
---|
115 | int vmsvga3dSetViewPort(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect);
|
---|
116 | int vmsvga3dSetClipPlane(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, float plane[4]);
|
---|
117 | int vmsvga3dCommandClear(PVGASTATECC pThisCC, uint32_t cid, SVGA3dClearFlag clearFlag, uint32_t color, float depth, uint32_t stencil, uint32_t cRects, SVGA3dRect *pRect);
|
---|
118 | int vmsvga3dCommandPresent(PVGASTATE pThis, PVGASTATECC pThisCC, uint32_t sid, uint32_t cRects, SVGA3dCopyRect *pRect);
|
---|
119 | int vmsvga3dDrawPrimitives(PVGASTATECC pThisCC, uint32_t cid, uint32_t numVertexDecls, SVGA3dVertexDecl *pVertexDecl, uint32_t numRanges, SVGA3dPrimitiveRange *pNumRange, uint32_t cVertexDivisor, SVGA3dVertexDivisor *pVertexDivisor);
|
---|
120 | int vmsvga3dSetScissorRect(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect);
|
---|
121 | int vmsvga3dGenerateMipmaps(PVGASTATECC pThisCC, uint32_t sid, SVGA3dTextureFilter filter);
|
---|
122 |
|
---|
123 | int vmsvga3dShaderDefine(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type, uint32_t cbData, uint32_t *pShaderData);
|
---|
124 | int vmsvga3dShaderDestroy(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type);
|
---|
125 | int vmsvga3dShaderSet(PVGASTATECC pThisCC, struct VMSVGA3DCONTEXT *pContext, uint32_t cid, SVGA3dShaderType type, uint32_t shid);
|
---|
126 | int vmsvga3dShaderSetConst(PVGASTATECC pThisCC, uint32_t cid, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, uint32_t cRegisters, uint32_t *pValues);
|
---|
127 |
|
---|
128 | int vmsvga3dQueryBegin(PVGASTATECC pThisCC, uint32_t cid, SVGA3dQueryType type);
|
---|
129 | int vmsvga3dQueryEnd(PVGASTATECC pThisCC, uint32_t cid, SVGA3dQueryType type, SVGAGuestPtr guestResult);
|
---|
130 | int vmsvga3dQueryWait(PVGASTATE pThis, PVGASTATECC pThisCC, uint32_t cid, SVGA3dQueryType type, SVGAGuestPtr guestResult);
|
---|
131 |
|
---|
132 | int vmsvga3dSurfaceInvalidate(PVGASTATECC pThisCC, uint32_t sid, uint32_t face, uint32_t mipmap);
|
---|
133 |
|
---|
134 | /* DevVGA-SVGA3d-shared.h: */
|
---|
135 | #if defined(RT_OS_WINDOWS) && defined(IN_RING3)
|
---|
136 | # include <iprt/win/windows.h>
|
---|
137 |
|
---|
138 | # define WM_VMSVGA3D_WAKEUP (WM_APP+1)
|
---|
139 | # define WM_VMSVGA3D_CREATEWINDOW (WM_APP+2)
|
---|
140 | # define WM_VMSVGA3D_DESTROYWINDOW (WM_APP+3)
|
---|
141 | # define WM_VMSVGA3D_EXIT (WM_APP+5)
|
---|
142 | # if 0
|
---|
143 | # define WM_VMSVGA3D_CREATE_DEVICE (WM_APP+6)
|
---|
144 | typedef struct VMSVGA3DCREATEDEVICEPARAMS
|
---|
145 | {
|
---|
146 | struct VMSVGA3DSTATE *pState;
|
---|
147 | struct VMSVGA3DCONTEXT *pContext;
|
---|
148 | struct _D3DPRESENT_PARAMETERS_ *pPresParams;
|
---|
149 | HRESULT hrc;
|
---|
150 | } VMSVGA3DCREATEDEVICEPARAMS;
|
---|
151 | # endif
|
---|
152 |
|
---|
153 | DECLCALLBACK(int) vmsvga3dWindowThread(RTTHREAD ThreadSelf, void *pvUser);
|
---|
154 | int vmsvga3dSendThreadMessage(RTTHREAD pWindowThread, RTSEMEVENT WndRequestSem, UINT msg, WPARAM wParam, LPARAM lParam);
|
---|
155 | int vmsvga3dContextWindowCreate(HINSTANCE hInstance, RTTHREAD pWindowThread, RTSEMEVENT WndRequestSem, HWND *pHwnd);
|
---|
156 |
|
---|
157 | #endif
|
---|
158 |
|
---|
159 | void vmsvga3dUpdateHeapBuffersForSurfaces(PVGASTATECC pThisCC, uint32_t sid);
|
---|
160 | void vmsvga3dInfoContextWorker(PVGASTATECC pThisCC, PCDBGFINFOHLP pHlp, uint32_t cid, bool fVerbose);
|
---|
161 | void vmsvga3dInfoSurfaceWorker(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC, PCDBGFINFOHLP pHlp, uint32_t sid,
|
---|
162 | bool fVerbose, uint32_t cxAscii, bool fInvY, const char *pszBitmapPath);
|
---|
163 |
|
---|
164 | /* DevVGA-SVGA3d-shared.cpp: */
|
---|
165 |
|
---|
166 | /**
|
---|
167 | * Structure for use with vmsvga3dInfoU32Flags.
|
---|
168 | */
|
---|
169 | typedef struct VMSVGAINFOFLAGS32
|
---|
170 | {
|
---|
171 | /** The flags. */
|
---|
172 | uint32_t fFlags;
|
---|
173 | /** The corresponding mnemonic. */
|
---|
174 | const char *pszJohnny;
|
---|
175 | } VMSVGAINFOFLAGS32;
|
---|
176 | /** Pointer to a read-only flag translation entry. */
|
---|
177 | typedef VMSVGAINFOFLAGS32 const *PCVMSVGAINFOFLAGS32;
|
---|
178 | void vmsvga3dInfoU32Flags(PCDBGFINFOHLP pHlp, uint32_t fFlags, const char *pszPrefix, PCVMSVGAINFOFLAGS32 paFlags, uint32_t cFlags);
|
---|
179 |
|
---|
180 | /**
|
---|
181 | * Structure for use with vmsvgaFormatEnumValueEx and vmsvgaFormatEnumValue.
|
---|
182 | */
|
---|
183 | typedef struct VMSVGAINFOENUM
|
---|
184 | {
|
---|
185 | /** The enum value. */
|
---|
186 | int32_t iValue;
|
---|
187 | /** The corresponding value name. */
|
---|
188 | const char *pszName;
|
---|
189 | } VMSVGAINFOENUM;
|
---|
190 | /** Pointer to a read-only enum value translation entry. */
|
---|
191 | typedef VMSVGAINFOENUM const *PCVMSVGAINFOENUM;
|
---|
192 | /**
|
---|
193 | * Structure for use with vmsvgaFormatEnumValueEx and vmsvgaFormatEnumValue.
|
---|
194 | */
|
---|
195 | typedef struct VMSVGAINFOENUMMAP
|
---|
196 | {
|
---|
197 | /** Pointer to the value mapping array. */
|
---|
198 | PCVMSVGAINFOENUM paValues;
|
---|
199 | /** The number of value mappings. */
|
---|
200 | size_t cValues;
|
---|
201 | /** The prefix. */
|
---|
202 | const char *pszPrefix;
|
---|
203 | #ifdef RT_STRICT
|
---|
204 | /** Indicates whether we've checked that it's sorted or not. */
|
---|
205 | bool *pfAsserted;
|
---|
206 | #endif
|
---|
207 | } VMSVGAINFOENUMMAP;
|
---|
208 | typedef VMSVGAINFOENUMMAP const *PCVMSVGAINFOENUMMAP;
|
---|
209 | /** @def VMSVGAINFOENUMMAP_MAKE
|
---|
210 | * Macro for defining a VMSVGAINFOENUMMAP, silently dealing with pfAsserted.
|
---|
211 | *
|
---|
212 | * @param a_Scope The scope. RT_NOTHING or static.
|
---|
213 | * @param a_VarName The variable name for this map.
|
---|
214 | * @param a_aValues The variable name of the value mapping array.
|
---|
215 | * @param a_pszPrefix The value name prefix.
|
---|
216 | */
|
---|
217 | #ifdef VBOX_STRICT
|
---|
218 | # define VMSVGAINFOENUMMAP_MAKE(a_Scope, a_VarName, a_aValues, a_pszPrefix) \
|
---|
219 | static bool RT_CONCAT(a_VarName,_AssertedSorted) = false; \
|
---|
220 | a_Scope VMSVGAINFOENUMMAP const a_VarName = { \
|
---|
221 | a_aValues, RT_ELEMENTS(a_aValues), a_pszPrefix, &RT_CONCAT(a_VarName,_AssertedSorted) \
|
---|
222 | }
|
---|
223 | #else
|
---|
224 | # define VMSVGAINFOENUMMAP_MAKE(a_Scope, a_VarName, a_aValues, a_pszPrefix) \
|
---|
225 | a_Scope VMSVGAINFOENUMMAP const a_VarName = { a_aValues, RT_ELEMENTS(a_aValues), a_pszPrefix }
|
---|
226 | #endif
|
---|
227 | extern VMSVGAINFOENUMMAP const g_SVGA3dSurfaceFormat2String;
|
---|
228 | const char *vmsvgaLookupEnum(int32_t iValue, PCVMSVGAINFOENUMMAP pEnumMap);
|
---|
229 | char *vmsvgaFormatEnumValueEx(char *pszBuffer, size_t cbBuffer, const char *pszName, int32_t iValue,
|
---|
230 | bool fPrefix, PCVMSVGAINFOENUMMAP pEnumMap);
|
---|
231 | char *vmsvgaFormatEnumValue(char *pszBuffer, size_t cbBuffer, const char *pszName, uint32_t uValue,
|
---|
232 | const char *pszPrefix, const char * const *papszValues, size_t cValues);
|
---|
233 |
|
---|
234 | /**
|
---|
235 | * ASCII "art" scanline printer callback.
|
---|
236 | *
|
---|
237 | * @param pszLine The line to output.
|
---|
238 | * @param pvUser The user argument.
|
---|
239 | */
|
---|
240 | typedef DECLCALLBACKTYPE(void, FNVMSVGAASCIIPRINTLN,(const char *pszLine, void *pvUser));
|
---|
241 | /** Pointer to an ASCII "art" print line callback. */
|
---|
242 | typedef FNVMSVGAASCIIPRINTLN *PFNVMSVGAASCIIPRINTLN;
|
---|
243 | void vmsvga3dAsciiPrint(PFNVMSVGAASCIIPRINTLN pfnPrintLine, void *pvUser, void const *pvImage, size_t cbImage,
|
---|
244 | uint32_t cx, uint32_t cy, uint32_t cbScanline, SVGA3dSurfaceFormat enmFormat, bool fInvY,
|
---|
245 | uint32_t cchMaxX, uint32_t cchMaxY);
|
---|
246 | DECLCALLBACK(void) vmsvga3dAsciiPrintlnInfo(const char *pszLine, void *pvUser);
|
---|
247 | DECLCALLBACK(void) vmsvga3dAsciiPrintlnLog(const char *pszLine, void *pvUser);
|
---|
248 |
|
---|
249 | char *vmsvga3dFormatRenderState(char *pszBuffer, size_t cbBuffer, SVGA3dRenderState const *pRenderState);
|
---|
250 | char *vmsvga3dFormatTextureState(char *pszBuffer, size_t cbBuffer, SVGA3dTextureState const *pTextureState);
|
---|
251 | void vmsvga3dInfoHostWindow(PCDBGFINFOHLP pHlp, uint64_t idHostWindow);
|
---|
252 |
|
---|
253 | uint32_t vmsvga3dSurfaceFormatSize(SVGA3dSurfaceFormat format,
|
---|
254 | uint32_t *pu32BlockWidth,
|
---|
255 | uint32_t *pu32BlockHeight);
|
---|
256 |
|
---|
257 | #ifdef LOG_ENABLED
|
---|
258 | const char *vmsvga3dGetCapString(uint32_t idxCap);
|
---|
259 | const char *vmsvga3dGet3dFormatString(uint32_t format);
|
---|
260 | const char *vmsvga3dGetRenderStateName(uint32_t state);
|
---|
261 | const char *vmsvga3dTextureStateToString(SVGA3dTextureStateName textureState);
|
---|
262 | const char *vmsvgaTransformToString(SVGA3dTransformType type);
|
---|
263 | const char *vmsvgaDeclUsage2String(SVGA3dDeclUsage usage);
|
---|
264 | const char *vmsvgaDeclType2String(SVGA3dDeclType type);
|
---|
265 | const char *vmsvgaDeclMethod2String(SVGA3dDeclMethod method);
|
---|
266 | const char *vmsvgaSurfaceType2String(SVGA3dSurfaceFormat format);
|
---|
267 | const char *vmsvga3dPrimitiveType2String(SVGA3dPrimitiveType PrimitiveType);
|
---|
268 | #endif
|
---|
269 |
|
---|
270 |
|
---|
271 | #define VMSVGA3D_BACKEND_INTERFACE_NAME_GBO "GBO"
|
---|
272 | typedef struct
|
---|
273 | {
|
---|
274 | DECLCALLBACKMEMBER(int, pfnScreenTargetBind, (PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen, uint32_t sid));
|
---|
275 | DECLCALLBACKMEMBER(int, pfnScreenTargetUpdate, (PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen, SVGA3dRect const *pRect));
|
---|
276 | } VMSVGA3DBACKENDFUNCSGBO;
|
---|
277 |
|
---|
278 | #define VMSVGA3D_BACKEND_INTERFACE_NAME_MAP "MAP"
|
---|
279 | typedef struct
|
---|
280 | {
|
---|
281 | DECLCALLBACKMEMBER(int, pfnSurfaceMap, (PVGASTATECC pThisCC, SVGA3dSurfaceImageId const *pImage, SVGA3dBox const *pBox, VMSVGA3D_SURFACE_MAP enmMapType, VMSVGA3D_MAPPED_SURFACE *pMap));
|
---|
282 | DECLCALLBACKMEMBER(int, pfnSurfaceUnmap, (PVGASTATECC pThisCC, SVGA3dSurfaceImageId const *pImage, VMSVGA3D_MAPPED_SURFACE *pMap, bool fWritten));
|
---|
283 | } VMSVGA3DBACKENDFUNCSMAP;
|
---|
284 |
|
---|
285 | typedef struct VMSVGA3DSHADER *PVMSVGA3DSHADER;
|
---|
286 | typedef struct VMSVGA3DDXCONTEXT *PVMSVGA3DDXCONTEXT;
|
---|
287 | #define VMSVGA3D_BACKEND_INTERFACE_NAME_DX "DX"
|
---|
288 | typedef struct
|
---|
289 | {
|
---|
290 | DECLCALLBACKMEMBER(int, pfnDXDefineContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
291 | DECLCALLBACKMEMBER(int, pfnDXDestroyContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
292 | DECLCALLBACKMEMBER(int, pfnDXBindContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
293 | DECLCALLBACKMEMBER(int, pfnDXReadbackContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
294 | DECLCALLBACKMEMBER(int, pfnDXInvalidateContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
295 | DECLCALLBACKMEMBER(int, pfnDXSetSingleConstantBuffer, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t slot, SVGA3dShaderType type, SVGA3dSurfaceId sid, uint32_t offsetInBytes, uint32_t sizeInBytes));
|
---|
296 | DECLCALLBACKMEMBER(int, pfnDXSetShaderResources, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
297 | DECLCALLBACKMEMBER(int, pfnDXSetShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSHADER pShader));
|
---|
298 | DECLCALLBACKMEMBER(int, pfnDXSetSamplers, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t startSampler, SVGA3dShaderType type, uint32_t cSamplerId, SVGA3dSamplerId const *paSamplerId));
|
---|
299 | DECLCALLBACKMEMBER(int, pfnDXDraw, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t vertexCount, uint32_t startVertexLocation));
|
---|
300 | DECLCALLBACKMEMBER(int, pfnDXDrawIndexed, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t indexCount, uint32_t startIndexLocation, int32_t baseVertexLocation));
|
---|
301 | DECLCALLBACKMEMBER(int, pfnDXDrawInstanced, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
302 | DECLCALLBACKMEMBER(int, pfnDXDrawIndexedInstanced, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
303 | DECLCALLBACKMEMBER(int, pfnDXDrawAuto, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
304 | DECLCALLBACKMEMBER(int, pfnDXSetInputLayout, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dElementLayoutId elementLayoutId));
|
---|
305 | DECLCALLBACKMEMBER(int, pfnDXSetVertexBuffers, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t startBuffer, uint32_t cVertexBuffer, SVGA3dVertexBuffer const *paVertexBuffer));
|
---|
306 | DECLCALLBACKMEMBER(int, pfnDXSetIndexBuffer, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSurfaceId sid, SVGA3dSurfaceFormat format, uint32_t offset));
|
---|
307 | DECLCALLBACKMEMBER(int, pfnDXSetTopology, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dPrimitiveType topology));
|
---|
308 | DECLCALLBACKMEMBER(int, pfnDXSetRenderTargets, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilViewId depthStencilViewId, uint32_t cRenderTargetViewId, SVGA3dRenderTargetViewId const *paRenderTargetViewId));
|
---|
309 | DECLCALLBACKMEMBER(int, pfnDXSetBlendState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dBlendStateId blendId, float const blendFactor[4], uint32_t sampleMask));
|
---|
310 | DECLCALLBACKMEMBER(int, pfnDXSetDepthStencilState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilStateId depthStencilId, uint32_t stencilRef));
|
---|
311 | DECLCALLBACKMEMBER(int, pfnDXSetRasterizerState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRasterizerStateId rasterizerId));
|
---|
312 | DECLCALLBACKMEMBER(int, pfnDXDefineQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
313 | DECLCALLBACKMEMBER(int, pfnDXDestroyQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
314 | DECLCALLBACKMEMBER(int, pfnDXBindQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
315 | DECLCALLBACKMEMBER(int, pfnDXSetQueryOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
316 | DECLCALLBACKMEMBER(int, pfnDXBeginQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
317 | DECLCALLBACKMEMBER(int, pfnDXEndQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
318 | DECLCALLBACKMEMBER(int, pfnDXReadbackQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
319 | DECLCALLBACKMEMBER(int, pfnDXSetPredication, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
320 | DECLCALLBACKMEMBER(int, pfnDXSetSOTargets, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
321 | DECLCALLBACKMEMBER(int, pfnDXSetViewports, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t cViewport, SVGA3dViewport const *paViewport));
|
---|
322 | DECLCALLBACKMEMBER(int, pfnDXSetScissorRects, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t cRect, SVGASignedRect const *paRect));
|
---|
323 | DECLCALLBACKMEMBER(int, pfnDXClearRenderTargetView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
324 | DECLCALLBACKMEMBER(int, pfnDXClearDepthStencilView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
325 | DECLCALLBACKMEMBER(int, pfnDXPredCopyRegion, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
326 | DECLCALLBACKMEMBER(int, pfnDXPredCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
327 | DECLCALLBACKMEMBER(int, pfnDXPresentBlt, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
328 | DECLCALLBACKMEMBER(int, pfnDXGenMips, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
329 | DECLCALLBACKMEMBER(int, pfnDXUpdateSubResource, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
330 | DECLCALLBACKMEMBER(int, pfnDXReadbackSubResource, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
331 | DECLCALLBACKMEMBER(int, pfnDXInvalidateSubResource, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
332 | DECLCALLBACKMEMBER(int, pfnDXDefineShaderResourceView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderResourceViewId shaderResourceViewId, SVGACOTableDXSRViewEntry const *pEntry));
|
---|
333 | DECLCALLBACKMEMBER(int, pfnDXDestroyShaderResourceView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
334 | DECLCALLBACKMEMBER(int, pfnDXDefineRenderTargetView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRenderTargetViewId renderTargetViewId, SVGACOTableDXRTViewEntry const *pEntry));
|
---|
335 | DECLCALLBACKMEMBER(int, pfnDXDestroyRenderTargetView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
336 | DECLCALLBACKMEMBER(int, pfnDXDefineDepthStencilView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
337 | DECLCALLBACKMEMBER(int, pfnDXDestroyDepthStencilView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
338 | DECLCALLBACKMEMBER(int, pfnDXDefineElementLayout, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dElementLayoutId elementLayoutId, SVGACOTableDXElementLayoutEntry const *pEntry));
|
---|
339 | DECLCALLBACKMEMBER(int, pfnDXDestroyElementLayout, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
340 | DECLCALLBACKMEMBER(int, pfnDXDefineBlendState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dBlendStateId blendId, SVGACOTableDXBlendStateEntry const *pEntry));
|
---|
341 | DECLCALLBACKMEMBER(int, pfnDXDestroyBlendState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
342 | DECLCALLBACKMEMBER(int, pfnDXDefineDepthStencilState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilStateId depthStencilId, SVGACOTableDXDepthStencilEntry *pEntry));
|
---|
343 | DECLCALLBACKMEMBER(int, pfnDXDestroyDepthStencilState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
344 | DECLCALLBACKMEMBER(int, pfnDXDefineRasterizerState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRasterizerStateId rasterizerId, SVGACOTableDXRasterizerStateEntry const *pEntry));
|
---|
345 | DECLCALLBACKMEMBER(int, pfnDXDestroyRasterizerState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
346 | DECLCALLBACKMEMBER(int, pfnDXDefineSamplerState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSamplerId samplerId, SVGACOTableDXSamplerEntry const *pEntry));
|
---|
347 | DECLCALLBACKMEMBER(int, pfnDXDestroySamplerState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
348 | DECLCALLBACKMEMBER(int, pfnDXDefineShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSHADER pShader));
|
---|
349 | DECLCALLBACKMEMBER(int, pfnDXDestroyShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
350 | DECLCALLBACKMEMBER(int, pfnDXBindShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PVMSVGA3DSHADER pShader, void const *pvShaderBytecode));
|
---|
351 | DECLCALLBACKMEMBER(int, pfnDXDefineStreamOutput, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
352 | DECLCALLBACKMEMBER(int, pfnDXDestroyStreamOutput, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
353 | DECLCALLBACKMEMBER(int, pfnDXSetStreamOutput, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
354 | DECLCALLBACKMEMBER(int, pfnDXSetCOTable, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGACOTableType type, uint32_t cEntries));
|
---|
355 | DECLCALLBACKMEMBER(int, pfnDXReadbackCOTable, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
356 | DECLCALLBACKMEMBER(int, pfnDXBufferCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
357 | DECLCALLBACKMEMBER(int, pfnDXTransferFromBuffer, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
358 | DECLCALLBACKMEMBER(int, pfnDXSurfaceCopyAndReadback, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
359 | DECLCALLBACKMEMBER(int, pfnDXMoveQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
360 | DECLCALLBACKMEMBER(int, pfnDXBindAllQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
361 | DECLCALLBACKMEMBER(int, pfnDXReadbackAllQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
362 | DECLCALLBACKMEMBER(int, pfnDXPredTransferFromBuffer, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
363 | DECLCALLBACKMEMBER(int, pfnDXMobFence64, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
364 | DECLCALLBACKMEMBER(int, pfnDXBindAllShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
365 | DECLCALLBACKMEMBER(int, pfnDXHint, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
366 | DECLCALLBACKMEMBER(int, pfnDXBufferUpdate, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
367 | DECLCALLBACKMEMBER(int, pfnDXSetVSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
368 | DECLCALLBACKMEMBER(int, pfnDXSetPSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
369 | DECLCALLBACKMEMBER(int, pfnDXSetGSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
370 | DECLCALLBACKMEMBER(int, pfnDXSetHSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
371 | DECLCALLBACKMEMBER(int, pfnDXSetDSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
372 | DECLCALLBACKMEMBER(int, pfnDXSetCSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
373 | DECLCALLBACKMEMBER(int, pfnDXCondBindAllShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
374 | DECLCALLBACKMEMBER(int, pfnScreenCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
375 | DECLCALLBACKMEMBER(int, pfnGrowOTable, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
376 | DECLCALLBACKMEMBER(int, pfnDXGrowCOTable, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
377 | DECLCALLBACKMEMBER(int, pfnIntraSurfaceCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
378 | DECLCALLBACKMEMBER(int, pfnDefineGBSurface_v3, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
379 | DECLCALLBACKMEMBER(int, pfnDXResolveCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
380 | DECLCALLBACKMEMBER(int, pfnDXPredResolveCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
381 | DECLCALLBACKMEMBER(int, pfnDXPredConvertRegion, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
382 | DECLCALLBACKMEMBER(int, pfnDXPredConvert, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
383 | DECLCALLBACKMEMBER(int, pfnWholeSurfaceCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
384 | DECLCALLBACKMEMBER(int, pfnDXDefineUAView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
385 | DECLCALLBACKMEMBER(int, pfnDXDestroyUAView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
386 | DECLCALLBACKMEMBER(int, pfnDXClearUAViewUint, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
387 | DECLCALLBACKMEMBER(int, pfnDXClearUAViewFloat, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
388 | DECLCALLBACKMEMBER(int, pfnDXCopyStructureCount, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
389 | DECLCALLBACKMEMBER(int, pfnDXSetUAViews, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
390 | DECLCALLBACKMEMBER(int, pfnDXDrawIndexedInstancedIndirect, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
391 | DECLCALLBACKMEMBER(int, pfnDXDrawInstancedIndirect, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
392 | DECLCALLBACKMEMBER(int, pfnDXDispatch, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
393 | DECLCALLBACKMEMBER(int, pfnDXDispatchIndirect, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
394 | DECLCALLBACKMEMBER(int, pfnWriteZeroSurface, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
395 | DECLCALLBACKMEMBER(int, pfnHintZeroSurface, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
396 | DECLCALLBACKMEMBER(int, pfnDXTransferToBuffer, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
397 | DECLCALLBACKMEMBER(int, pfnDXSetStructureCount, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
398 | DECLCALLBACKMEMBER(int, pfnLogicOpsBitBlt, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
399 | DECLCALLBACKMEMBER(int, pfnLogicOpsTransBlt, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
400 | DECLCALLBACKMEMBER(int, pfnLogicOpsStretchBlt, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
401 | DECLCALLBACKMEMBER(int, pfnLogicOpsColorFill, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
402 | DECLCALLBACKMEMBER(int, pfnLogicOpsAlphaBlend, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
403 | DECLCALLBACKMEMBER(int, pfnLogicOpsClearTypeBlend, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
404 | DECLCALLBACKMEMBER(int, pfnDefineGBSurface_v4, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
405 | DECLCALLBACKMEMBER(int, pfnDXSetCSUAViews, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
406 | DECLCALLBACKMEMBER(int, pfnDXSetMinLOD, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
407 | DECLCALLBACKMEMBER(int, pfnDXDefineDepthStencilView_v2, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
408 | DECLCALLBACKMEMBER(int, pfnDXDefineStreamOutputWithMob, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
409 | DECLCALLBACKMEMBER(int, pfnDXSetShaderIface, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
410 | DECLCALLBACKMEMBER(int, pfnDXBindStreamOutput, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
411 | DECLCALLBACKMEMBER(int, pfnSurfaceStretchBltNonMSToMS, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
412 | DECLCALLBACKMEMBER(int, pfnDXBindShaderIface, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
|
---|
413 | } VMSVGA3DBACKENDFUNCSDX;
|
---|
414 |
|
---|
415 | int vmsvga3dQueryInterface(PVGASTATECC pThisCC, char const *pszInterfaceName, void *pvInterfaceFuncs, size_t cbInterfaceFuncs);
|
---|
416 |
|
---|
417 | #ifdef VMSVGA3D_DX
|
---|
418 | /* Helpers. */
|
---|
419 | int vmsvga3dDXUnbindContext(PVGASTATECC pThisCC, uint32_t cid, SVGADXContextMobFormat *pSvgaDXContext);
|
---|
420 |
|
---|
421 | /* Command handlers. */
|
---|
422 | int vmsvga3dDXDefineContext(PVGASTATECC pThisCC, uint32_t cid);
|
---|
423 | int vmsvga3dDXDestroyContext(PVGASTATECC pThisCC, uint32_t cid);
|
---|
424 | int vmsvga3dDXBindContext(PVGASTATECC pThisCC, uint32_t cid, SVGADXContextMobFormat *pSvgaDXContext);
|
---|
425 | int vmsvga3dDXReadbackContext(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
426 | int vmsvga3dDXInvalidateContext(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
427 | int vmsvga3dDXSetSingleConstantBuffer(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetSingleConstantBuffer const *pCmd);
|
---|
428 | int vmsvga3dDXSetShaderResources(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
429 | int vmsvga3dDXSetShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetShader const *pCmd);
|
---|
430 | int vmsvga3dDXSetSamplers(PVGASTATECC pThisCC, uint32_t idDXContext, uint32_t startSampler, SVGA3dShaderType type, uint32_t cSamplerId, SVGA3dSamplerId const *paSamplerId);
|
---|
431 | int vmsvga3dDXDraw(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDraw const *pCmd);
|
---|
432 | int vmsvga3dDXDrawIndexed(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawIndexed const *pCmd);
|
---|
433 | int vmsvga3dDXDrawInstanced(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
434 | int vmsvga3dDXDrawIndexedInstanced(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
435 | int vmsvga3dDXDrawAuto(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
436 | int vmsvga3dDXSetInputLayout(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dElementLayoutId elementLayoutId);
|
---|
437 | int vmsvga3dDXSetVertexBuffers(PVGASTATECC pThisCC, uint32_t idDXContext, uint32_t startBuffer, uint32_t cVertexBuffer, SVGA3dVertexBuffer const *paVertexBuffer);
|
---|
438 | int vmsvga3dDXSetIndexBuffer(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetIndexBuffer const *pCmd);
|
---|
439 | int vmsvga3dDXSetTopology(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dPrimitiveType topology);
|
---|
440 | int vmsvga3dDXSetRenderTargets(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dDepthStencilViewId depthStencilViewId, uint32_t cRenderTargetViewId, SVGA3dRenderTargetViewId const *paRenderTargetViewId);
|
---|
441 | int vmsvga3dDXSetBlendState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetBlendState const *pCmd);
|
---|
442 | int vmsvga3dDXSetDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetDepthStencilState const *pCmd);
|
---|
443 | int vmsvga3dDXSetRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dRasterizerStateId rasterizerId);
|
---|
444 | int vmsvga3dDXDefineQuery(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
445 | int vmsvga3dDXDestroyQuery(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
446 | int vmsvga3dDXBindQuery(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
447 | int vmsvga3dDXSetQueryOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
448 | int vmsvga3dDXBeginQuery(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
449 | int vmsvga3dDXEndQuery(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
450 | int vmsvga3dDXReadbackQuery(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
451 | int vmsvga3dDXSetPredication(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
452 | int vmsvga3dDXSetSOTargets(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
453 | int vmsvga3dDXSetViewports(PVGASTATECC pThisCC, uint32_t idDXContext, uint32_t cViewport, SVGA3dViewport const *paViewport);
|
---|
454 | int vmsvga3dDXSetScissorRects(PVGASTATECC pThisCC, uint32_t idDXContext, uint32_t cRect, SVGASignedRect const *paRect);
|
---|
455 | int vmsvga3dDXClearRenderTargetView(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
456 | int vmsvga3dDXClearDepthStencilView(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
457 | int vmsvga3dDXPredCopyRegion(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
458 | int vmsvga3dDXPredCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
459 | int vmsvga3dDXPresentBlt(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
460 | int vmsvga3dDXGenMips(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
461 | int vmsvga3dDXUpdateSubResource(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
462 | int vmsvga3dDXReadbackSubResource(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
463 | int vmsvga3dDXInvalidateSubResource(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
464 | int vmsvga3dDXDefineShaderResourceView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineShaderResourceView const *pCmd);
|
---|
465 | int vmsvga3dDXDestroyShaderResourceView(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
466 | int vmsvga3dDXDefineRenderTargetView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRenderTargetView const *pCmd);
|
---|
467 | int vmsvga3dDXDestroyRenderTargetView(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
468 | int vmsvga3dDXDefineDepthStencilView(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
469 | int vmsvga3dDXDestroyDepthStencilView(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
470 | int vmsvga3dDXDefineElementLayout(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dElementLayoutId elementLayoutId, uint32_t cDesc, SVGA3dInputElementDesc const *paDesc);
|
---|
471 | int vmsvga3dDXDestroyElementLayout(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
472 | int vmsvga3dDXDefineBlendState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineBlendState const *pCmd);
|
---|
473 | int vmsvga3dDXDestroyBlendState(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
474 | int vmsvga3dDXDefineDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineDepthStencilState const *pCmd);
|
---|
475 | int vmsvga3dDXDestroyDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
476 | int vmsvga3dDXDefineRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRasterizerState const *pCmd);
|
---|
477 | int vmsvga3dDXDestroyRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
478 | int vmsvga3dDXDefineSamplerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineSamplerState const *pCmd);
|
---|
479 | int vmsvga3dDXDestroySamplerState(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
480 | int vmsvga3dDXDefineShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineShader const *pCmd);
|
---|
481 | int vmsvga3dDXDestroyShader(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
482 | int vmsvga3dDXBindShader(PVGASTATECC pThisCC, uint32_t cid, PVMSVGAMOB pMob, uint32_t shid, uint32_t offsetInBytes);
|
---|
483 | int vmsvga3dDXDefineStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
484 | int vmsvga3dDXDestroyStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
485 | int vmsvga3dDXSetStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
486 | int vmsvga3dDXSetCOTable(PVGASTATECC pThisCC, uint32_t cid, PVMSVGAMOB pMob, SVGACOTableType type, uint32_t validSizeInBytes);
|
---|
487 | int vmsvga3dDXReadbackCOTable(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
488 | int vmsvga3dDXBufferCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
489 | int vmsvga3dDXTransferFromBuffer(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
490 | int vmsvga3dDXSurfaceCopyAndReadback(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
491 | int vmsvga3dDXMoveQuery(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
492 | int vmsvga3dDXBindAllQuery(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
493 | int vmsvga3dDXReadbackAllQuery(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
494 | int vmsvga3dDXPredTransferFromBuffer(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
495 | int vmsvga3dDXMobFence64(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
496 | int vmsvga3dDXBindAllShader(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
497 | int vmsvga3dDXHint(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
498 | int vmsvga3dDXBufferUpdate(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
499 | int vmsvga3dDXSetVSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
500 | int vmsvga3dDXSetPSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
501 | int vmsvga3dDXSetGSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
502 | int vmsvga3dDXSetHSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
503 | int vmsvga3dDXSetDSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
504 | int vmsvga3dDXSetCSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
505 | int vmsvga3dDXCondBindAllShader(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
506 | int vmsvga3dScreenCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
507 | int vmsvga3dGrowOTable(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
508 | int vmsvga3dDXGrowCOTable(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
509 | int vmsvga3dIntraSurfaceCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
510 | int vmsvga3dDefineGBSurface_v3(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
511 | int vmsvga3dDXResolveCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
512 | int vmsvga3dDXPredResolveCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
513 | int vmsvga3dDXPredConvertRegion(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
514 | int vmsvga3dDXPredConvert(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
515 | int vmsvga3dWholeSurfaceCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
516 | int vmsvga3dDXDefineUAView(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
517 | int vmsvga3dDXDestroyUAView(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
518 | int vmsvga3dDXClearUAViewUint(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
519 | int vmsvga3dDXClearUAViewFloat(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
520 | int vmsvga3dDXCopyStructureCount(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
521 | int vmsvga3dDXSetUAViews(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
522 | int vmsvga3dDXDrawIndexedInstancedIndirect(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
523 | int vmsvga3dDXDrawInstancedIndirect(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
524 | int vmsvga3dDXDispatch(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
525 | int vmsvga3dDXDispatchIndirect(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
526 | int vmsvga3dWriteZeroSurface(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
527 | int vmsvga3dHintZeroSurface(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
528 | int vmsvga3dDXTransferToBuffer(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
529 | int vmsvga3dDXSetStructureCount(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
530 | int vmsvga3dLogicOpsBitBlt(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
531 | int vmsvga3dLogicOpsTransBlt(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
532 | int vmsvga3dLogicOpsStretchBlt(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
533 | int vmsvga3dLogicOpsColorFill(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
534 | int vmsvga3dLogicOpsAlphaBlend(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
535 | int vmsvga3dLogicOpsClearTypeBlend(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
536 | int vmsvga3dDefineGBSurface_v4(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
537 | int vmsvga3dDXSetCSUAViews(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
538 | int vmsvga3dDXSetMinLOD(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
539 | int vmsvga3dDXDefineDepthStencilView_v2(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
540 | int vmsvga3dDXDefineStreamOutputWithMob(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
541 | int vmsvga3dDXSetShaderIface(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
542 | int vmsvga3dDXBindStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
543 | int vmsvga3dSurfaceStretchBltNonMSToMS(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
544 | int vmsvga3dDXBindShaderIface(PVGASTATECC pThisCC, uint32_t idDXContext);
|
---|
545 | #endif /* VMSVGA3D_DX */
|
---|
546 |
|
---|
547 |
|
---|
548 | #endif /* !VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_h */
|
---|
549 |
|
---|