VirtualBox

source: vbox/trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h@ 97405

Last change on this file since 97405 was 96407, checked in by vboxsync, 2 years ago

scm copyright and license note update

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 53.4 KB
Line 
1/* $Id: DevVGA-SVGA3d.h 96407 2022-08-22 17:43:14Z vboxsync $ */
2/** @file
3 * DevVMWare - VMWare SVGA device - 3D part.
4 */
5
6/*
7 * Copyright (C) 2013-2022 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 VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_h
29#define VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include "DevVGA-SVGA.h"
35
36
37/** Arbitrary limit */
38#define SVGA3D_MAX_SHADER_IDS 0x800
39/** D3D allows up to 8 texture stages. */
40#define SVGA3D_MAX_TEXTURE_STAGES 8
41/** Samplers: 16 Pixel Shader + 1 Displacement Map + 4 Vertex Shader */
42#define SVGA3D_MAX_SAMPLERS_PS 16
43#define SVGA3D_MAX_SAMPLERS_DMAP 1
44#define SVGA3D_MAX_SAMPLERS_VS 4
45#define SVGA3D_MAX_SAMPLERS (SVGA3D_MAX_SAMPLERS_PS + SVGA3D_MAX_SAMPLERS_DMAP + SVGA3D_MAX_SAMPLERS_VS)
46/** Arbitrary upper limit; seen 8 so far. */
47#define SVGA3D_MAX_LIGHTS 32
48/** Arbitrary upper limit; 2GB enough for 32768x16384*4. */
49#define SVGA3D_MAX_SURFACE_MEM_SIZE 0x80000000
50/** Arbitrary upper limit. [0,15] is enough for 2^15=32768x32768. */
51#define SVGA3D_MAX_MIP_LEVELS 16
52
53
54/** @todo Use this as a parameter for vmsvga3dSurfaceDefine and a field in VMSVGA3DSURFACE instead of a multiple values. */
55/* A surface description provided by the guest. Mostly mirrors SVGA3dCmdDefineGBSurface_v4 */
56typedef struct VMSVGA3D_SURFACE_DESC
57{
58 SVGA3dSurface1Flags surface1Flags;
59 SVGA3dSurface2Flags surface2Flags;
60 SVGA3dSurfaceFormat format;
61 uint32 numMipLevels;
62 uint32 multisampleCount;
63 SVGA3dMSPattern multisamplePattern;
64 SVGA3dMSQualityLevel qualityLevel;
65 SVGA3dTextureFilter autogenFilter;
66 SVGA3dSize size;
67 uint32 numArrayElements; /* "Number of array elements for a 1D/2D texture. For cubemap
68 * texture number of faces * array_size."
69 */
70 uint32 cbArrayElement; /* Size of one array element. */
71 uint32 bufferByteStride;
72} VMSVGA3D_SURFACE_DESC;
73
74typedef enum VMSVGA3D_SURFACE_MAP
75{
76 VMSVGA3D_SURFACE_MAP_READ,
77 VMSVGA3D_SURFACE_MAP_WRITE,
78 VMSVGA3D_SURFACE_MAP_READ_WRITE,
79 VMSVGA3D_SURFACE_MAP_WRITE_DISCARD,
80} VMSVGA3D_SURFACE_MAP;
81
82typedef struct VMSVGA3D_MAPPED_SURFACE
83{
84 VMSVGA3D_SURFACE_MAP enmMapType;
85 SVGA3dSurfaceFormat format;
86 SVGA3dBox box;
87 uint32_t cbBlock; /* Size of pixel block, usualy of 1 pixel for uncompressed formats. */
88 uint32_t cbRow; /* Bytes per row. */
89 uint32_t cbRowPitch; /* Bytes between rows. */
90 uint32_t cRows; /* Number of rows. */
91 uint32_t cbDepthPitch; /* Bytes between planes. */
92 void *pvData;
93} VMSVGA3D_MAPPED_SURFACE;
94
95/* Write render targets to bitmaps. */
96//#define DUMP_BITMAPS
97void vmsvga3dMapWriteBmpFile(VMSVGA3D_MAPPED_SURFACE const *pMap, char const *pszPrefix);
98
99/* DevVGA-SVGA.cpp: */
100void vmsvgaR33dSurfaceUpdateHeapBuffersOnFifoThread(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC, uint32_t sid);
101
102
103/* DevVGA-SVGA3d-ogl.cpp & DevVGA-SVGA3d-win.cpp: */
104int vmsvga3dLoadExec(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);
105int vmsvga3dSaveExec(PPDMDEVINS pDevIns, PVGASTATECC pThisCC, PSSMHANDLE pSSM);
106void vmsvga3dUpdateHostScreenViewport(PVGASTATECC pThisCC, uint32_t idScreen, VMSVGAVIEWPORT const *pOldViewport);
107int vmsvga3dQueryCaps(PVGASTATECC pThisCC, SVGA3dDevCapIndex idx3dCaps, uint32_t *pu32Val);
108
109int vmsvga3dSurfaceDefine(PVGASTATECC pThisCC, uint32_t sid, SVGA3dSurfaceAllFlags surfaceFlags, SVGA3dSurfaceFormat format,
110 uint32_t multisampleCount, SVGA3dTextureFilter autogenFilter,
111 uint32_t cMipLevels, SVGA3dSize const *pMipLevel0Size, uint32_t arraySize, bool fAllocMipLevels);
112int vmsvga3dSurfaceDestroy(PVGASTATECC pThisCC, uint32_t sid);
113int vmsvga3dSurfaceCopy(PVGASTATECC pThisCC, SVGA3dSurfaceImageId dest, SVGA3dSurfaceImageId src,
114 uint32_t cCopyBoxes, SVGA3dCopyBox *pBox);
115int vmsvga3dSurfaceStretchBlt(PVGASTATE pThis, PVGASTATECC pThisCC,
116 SVGA3dSurfaceImageId const *pDstSfcImg, SVGA3dBox const *pDstBox,
117 SVGA3dSurfaceImageId const *pSrcSfcImg, SVGA3dBox const *pSrcBox, SVGA3dStretchBltMode enmMode);
118int vmsvga3dSurfaceDMA(PVGASTATE pThis, PVGASTATECC pThisCC, SVGAGuestImage guest, SVGA3dSurfaceImageId host, SVGA3dTransferType transfer, uint32_t cCopyBoxes, SVGA3dCopyBox *pBoxes);
119int vmsvga3dSurfaceBlitToScreen(PVGASTATE pThis, PVGASTATECC pThisCC, uint32_t dest, SVGASignedRect destRect, SVGA3dSurfaceImageId srcImage, SVGASignedRect srcRect, uint32_t cRects, SVGASignedRect *pRect);
120
121int vmsvga3dContextDefine(PVGASTATECC pThisCC, uint32_t cid);
122int vmsvga3dContextDestroy(PVGASTATECC pThisCC, uint32_t cid);
123
124int vmsvga3dChangeMode(PVGASTATECC pThisCC);
125
126int vmsvga3dDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen);
127int vmsvga3dDestroyScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen);
128
129int vmsvga3dScreenUpdate(PVGASTATECC pThisCC, uint32_t idDstScreen, SVGASignedRect const &dstRect,
130 SVGA3dSurfaceImageId const &srcImage, SVGASignedRect const &srcRect,
131 uint32_t cDstClipRects, SVGASignedRect *paDstClipRect);
132
133int vmsvga3dSetTransform(PVGASTATECC pThisCC, uint32_t cid, SVGA3dTransformType type, float matrix[16]);
134int vmsvga3dSetZRange(PVGASTATECC pThisCC, uint32_t cid, SVGA3dZRange zRange);
135int vmsvga3dSetRenderState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cRenderStates, SVGA3dRenderState *pRenderState);
136int vmsvga3dSetRenderTarget(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRenderTargetType type, SVGA3dSurfaceImageId target);
137int vmsvga3dSetTextureState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState);
138int vmsvga3dSetMaterial(PVGASTATECC pThisCC, uint32_t cid, SVGA3dFace face, SVGA3dMaterial *pMaterial);
139int vmsvga3dSetLightData(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData);
140int vmsvga3dSetLightEnabled(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, uint32_t enabled);
141int vmsvga3dSetViewPort(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect);
142int vmsvga3dSetClipPlane(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, float plane[4]);
143int vmsvga3dCommandClear(PVGASTATECC pThisCC, uint32_t cid, SVGA3dClearFlag clearFlag, uint32_t color, float depth, uint32_t stencil, uint32_t cRects, SVGA3dRect *pRect);
144int vmsvga3dCommandPresent(PVGASTATE pThis, PVGASTATECC pThisCC, uint32_t sid, uint32_t cRects, SVGA3dCopyRect *pRect);
145int vmsvga3dDrawPrimitives(PVGASTATECC pThisCC, uint32_t cid, uint32_t numVertexDecls, SVGA3dVertexDecl *pVertexDecl, uint32_t numRanges, SVGA3dPrimitiveRange *pNumRange, uint32_t cVertexDivisor, SVGA3dVertexDivisor *pVertexDivisor);
146int vmsvga3dSetScissorRect(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect);
147int vmsvga3dGenerateMipmaps(PVGASTATECC pThisCC, uint32_t sid, SVGA3dTextureFilter filter);
148
149int vmsvga3dShaderDefine(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type, uint32_t cbData, uint32_t *pShaderData);
150int vmsvga3dShaderDestroy(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type);
151int vmsvga3dShaderSet(PVGASTATECC pThisCC, struct VMSVGA3DCONTEXT *pContext, uint32_t cid, SVGA3dShaderType type, uint32_t shid);
152int vmsvga3dShaderSetConst(PVGASTATECC pThisCC, uint32_t cid, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, uint32_t cRegisters, uint32_t *pValues);
153
154int vmsvga3dQueryCreate(PVGASTATECC pThisCC, uint32_t cid, SVGA3dQueryType type);
155int vmsvga3dQueryBegin(PVGASTATECC pThisCC, uint32_t cid, SVGA3dQueryType type);
156int vmsvga3dQueryEnd(PVGASTATECC pThisCC, uint32_t cid, SVGA3dQueryType type);
157int vmsvga3dQueryWait(PVGASTATECC pThisCC, uint32_t cid, SVGA3dQueryType type, PVGASTATE pThis, SVGAGuestPtr const *pGuestResult);
158
159int vmsvga3dSurfaceInvalidate(PVGASTATECC pThisCC, uint32_t sid, uint32_t face, uint32_t mipmap);
160
161int vmsvga3dSurfaceMap(PVGASTATECC pThisCC, SVGA3dSurfaceImageId const *pImage, SVGA3dBox const *pBox,
162 VMSVGA3D_SURFACE_MAP enmMapType, VMSVGA3D_MAPPED_SURFACE *pMap);
163int vmsvga3dSurfaceUnmap(PVGASTATECC pThisCC, SVGA3dSurfaceImageId const *pImage, VMSVGA3D_MAPPED_SURFACE *pMap, bool fWritten);
164
165uint32_t vmsvga3dCalcSubresourceOffset(PVGASTATECC pThisCC, SVGA3dSurfaceImageId const *pImage);
166
167typedef struct VMSGA3D_BOX_DIMENSIONS
168{
169 uint32_t offSubresource; /* Offset of the miplevel. */
170 uint32_t offBox; /* Offset of the box in the miplevel. */
171 uint32_t cbRow; /* Bytes per row. */
172 int32_t cbPitch; /* Bytes between rows. */
173 uint32_t cyBlocks; /* Number of rows. */
174 uint32_t cbDepthPitch; /* Number of bytes between planes. */
175} VMSGA3D_BOX_DIMENSIONS;
176
177int vmsvga3dGetBoxDimensions(PVGASTATECC pThisCC, SVGA3dSurfaceImageId const *pImage, SVGA3dBox const *pBox,
178 VMSGA3D_BOX_DIMENSIONS *pResult);
179
180DECLINLINE(void) vmsvga3dCalcMipmapSize(SVGA3dSize const *pSize0, uint32_t iMipmap, SVGA3dSize *pSize)
181{
182 pSize->width = RT_MAX(pSize0->width >> iMipmap, 1);
183 pSize->height = RT_MAX(pSize0->height >> iMipmap, 1);
184 pSize->depth = RT_MAX(pSize0->depth >> iMipmap, 1);
185}
186
187uint32_t vmsvga3dGetArrayElements(PVGASTATECC pThisCC, SVGA3dSurfaceId sid);
188uint32_t vmsvga3dGetSubresourceCount(PVGASTATECC pThisCC, SVGA3dSurfaceId sid);
189
190DECLINLINE(uint32_t) vmsvga3dCalcSubresource(uint32_t iMipLevel, uint32_t iArray, uint32_t cMipLevels)
191{
192 /* Same as in D3D */
193 return iMipLevel + iArray * cMipLevels;
194}
195
196DECLINLINE(void) vmsvga3dCalcMipmapAndFace(uint32_t cMipLevels, uint32_t iSubresource, uint32_t *piMipmap, uint32_t *piFace)
197{
198 *piFace = iSubresource / cMipLevels;
199 *piMipmap = iSubresource % cMipLevels;
200}
201
202int vmsvga3dCalcSurfaceMipmapAndFace(PVGASTATECC pThisCC, uint32_t sid, uint32_t iSubresource, uint32_t *piMipmap, uint32_t *piFace);
203
204
205/* DevVGA-SVGA3d-shared.h: */
206#if defined(RT_OS_WINDOWS) && defined(IN_RING3)
207# include <iprt/win/windows.h>
208
209# define WM_VMSVGA3D_WAKEUP (WM_APP+1)
210# define WM_VMSVGA3D_CREATEWINDOW (WM_APP+2)
211# define WM_VMSVGA3D_DESTROYWINDOW (WM_APP+3)
212# define WM_VMSVGA3D_EXIT (WM_APP+5)
213# if 0
214# define WM_VMSVGA3D_CREATE_DEVICE (WM_APP+6)
215typedef struct VMSVGA3DCREATEDEVICEPARAMS
216{
217 struct VMSVGA3DSTATE *pState;
218 struct VMSVGA3DCONTEXT *pContext;
219 struct _D3DPRESENT_PARAMETERS_ *pPresParams;
220 HRESULT hrc;
221} VMSVGA3DCREATEDEVICEPARAMS;
222# endif
223
224DECLCALLBACK(int) vmsvga3dWindowThread(RTTHREAD ThreadSelf, void *pvUser);
225int vmsvga3dSendThreadMessage(RTTHREAD pWindowThread, RTSEMEVENT WndRequestSem, UINT msg, WPARAM wParam, LPARAM lParam);
226int vmsvga3dContextWindowCreate(HINSTANCE hInstance, RTTHREAD pWindowThread, RTSEMEVENT WndRequestSem, HWND *pHwnd);
227
228#endif
229
230void vmsvga3dUpdateHeapBuffersForSurfaces(PVGASTATECC pThisCC, uint32_t sid);
231void vmsvga3dInfoContextWorker(PVGASTATECC pThisCC, PCDBGFINFOHLP pHlp, uint32_t cid, bool fVerbose);
232void vmsvga3dInfoSurfaceWorker(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC, PCDBGFINFOHLP pHlp, uint32_t sid,
233 bool fVerbose, uint32_t cxAscii, bool fInvY, const char *pszBitmapPath);
234
235/* DevVGA-SVGA3d-shared.cpp: */
236
237/**
238 * Structure for use with vmsvga3dInfoU32Flags.
239 */
240typedef struct VMSVGAINFOFLAGS32
241{
242 /** The flags. */
243 uint32_t fFlags;
244 /** The corresponding mnemonic. */
245 const char *pszJohnny;
246} VMSVGAINFOFLAGS32;
247/** Pointer to a read-only flag translation entry. */
248typedef VMSVGAINFOFLAGS32 const *PCVMSVGAINFOFLAGS32;
249void vmsvga3dInfoU32Flags(PCDBGFINFOHLP pHlp, uint32_t fFlags, const char *pszPrefix, PCVMSVGAINFOFLAGS32 paFlags, uint32_t cFlags);
250
251/**
252 * Structure for use with vmsvgaFormatEnumValueEx and vmsvgaFormatEnumValue.
253 */
254typedef struct VMSVGAINFOENUM
255{
256 /** The enum value. */
257 int32_t iValue;
258 /** The corresponding value name. */
259 const char *pszName;
260} VMSVGAINFOENUM;
261/** Pointer to a read-only enum value translation entry. */
262typedef VMSVGAINFOENUM const *PCVMSVGAINFOENUM;
263/**
264 * Structure for use with vmsvgaFormatEnumValueEx and vmsvgaFormatEnumValue.
265 */
266typedef struct VMSVGAINFOENUMMAP
267{
268 /** Pointer to the value mapping array. */
269 PCVMSVGAINFOENUM paValues;
270 /** The number of value mappings. */
271 size_t cValues;
272 /** The prefix. */
273 const char *pszPrefix;
274#ifdef RT_STRICT
275 /** Indicates whether we've checked that it's sorted or not. */
276 bool *pfAsserted;
277#endif
278} VMSVGAINFOENUMMAP;
279typedef VMSVGAINFOENUMMAP const *PCVMSVGAINFOENUMMAP;
280/** @def VMSVGAINFOENUMMAP_MAKE
281 * Macro for defining a VMSVGAINFOENUMMAP, silently dealing with pfAsserted.
282 *
283 * @param a_Scope The scope. RT_NOTHING or static.
284 * @param a_VarName The variable name for this map.
285 * @param a_aValues The variable name of the value mapping array.
286 * @param a_pszPrefix The value name prefix.
287 */
288#ifdef VBOX_STRICT
289# define VMSVGAINFOENUMMAP_MAKE(a_Scope, a_VarName, a_aValues, a_pszPrefix) \
290 static bool RT_CONCAT(a_VarName,_AssertedSorted) = false; \
291 a_Scope VMSVGAINFOENUMMAP const a_VarName = { \
292 a_aValues, RT_ELEMENTS(a_aValues), a_pszPrefix, &RT_CONCAT(a_VarName,_AssertedSorted) \
293 }
294#else
295# define VMSVGAINFOENUMMAP_MAKE(a_Scope, a_VarName, a_aValues, a_pszPrefix) \
296 a_Scope VMSVGAINFOENUMMAP const a_VarName = { a_aValues, RT_ELEMENTS(a_aValues), a_pszPrefix }
297#endif
298extern VMSVGAINFOENUMMAP const g_SVGA3dSurfaceFormat2String;
299const char *vmsvgaLookupEnum(int32_t iValue, PCVMSVGAINFOENUMMAP pEnumMap);
300char *vmsvgaFormatEnumValueEx(char *pszBuffer, size_t cbBuffer, const char *pszName, int32_t iValue,
301 bool fPrefix, PCVMSVGAINFOENUMMAP pEnumMap);
302char *vmsvgaFormatEnumValue(char *pszBuffer, size_t cbBuffer, const char *pszName, uint32_t uValue,
303 const char *pszPrefix, const char * const *papszValues, size_t cValues);
304
305/**
306 * ASCII "art" scanline printer callback.
307 *
308 * @param pszLine The line to output.
309 * @param pvUser The user argument.
310 */
311typedef DECLCALLBACKTYPE(void, FNVMSVGAASCIIPRINTLN,(const char *pszLine, void *pvUser));
312/** Pointer to an ASCII "art" print line callback. */
313typedef FNVMSVGAASCIIPRINTLN *PFNVMSVGAASCIIPRINTLN;
314void vmsvga3dAsciiPrint(PFNVMSVGAASCIIPRINTLN pfnPrintLine, void *pvUser, void const *pvImage, size_t cbImage,
315 uint32_t cx, uint32_t cy, uint32_t cbScanline, SVGA3dSurfaceFormat enmFormat, bool fInvY,
316 uint32_t cchMaxX, uint32_t cchMaxY);
317DECLCALLBACK(void) vmsvga3dAsciiPrintlnInfo(const char *pszLine, void *pvUser);
318DECLCALLBACK(void) vmsvga3dAsciiPrintlnLog(const char *pszLine, void *pvUser);
319
320char *vmsvga3dFormatRenderState(char *pszBuffer, size_t cbBuffer, SVGA3dRenderState const *pRenderState);
321char *vmsvga3dFormatTextureState(char *pszBuffer, size_t cbBuffer, SVGA3dTextureState const *pTextureState);
322void vmsvga3dInfoHostWindow(PCDBGFINFOHLP pHlp, uint64_t idHostWindow);
323
324uint32_t vmsvga3dSurfaceFormatSize(SVGA3dSurfaceFormat format,
325 uint32_t *pu32BlockWidth,
326 uint32_t *pu32BlockHeight);
327
328#ifdef LOG_ENABLED
329const char *vmsvga3dGetCapString(uint32_t idxCap);
330const char *vmsvga3dGet3dFormatString(uint32_t format);
331const char *vmsvga3dGetRenderStateName(uint32_t state);
332const char *vmsvga3dTextureStateToString(SVGA3dTextureStateName textureState);
333const char *vmsvgaTransformToString(SVGA3dTransformType type);
334const char *vmsvgaDeclUsage2String(SVGA3dDeclUsage usage);
335const char *vmsvgaDeclType2String(SVGA3dDeclType type);
336const char *vmsvgaDeclMethod2String(SVGA3dDeclMethod method);
337const char *vmsvgaSurfaceType2String(SVGA3dSurfaceFormat format);
338const char *vmsvga3dPrimitiveType2String(SVGA3dPrimitiveType PrimitiveType);
339#endif
340
341
342/*
343 * Backend interfaces.
344 */
345bool vmsvga3dIsLegacyBackend(PVGASTATECC pThisCC);
346
347typedef struct VMSVGA3DSURFACE *PVMSVGA3DSURFACE;
348typedef struct VMSVGA3DMIPMAPLEVEL *PVMSVGA3DMIPMAPLEVEL;
349typedef struct VMSVGA3DCONTEXT *PVMSVGA3DCONTEXT;
350
351/* Essential 3D backend function. */
352#define VMSVGA3D_BACKEND_INTERFACE_NAME_3D "3D"
353typedef struct
354{
355 DECLCALLBACKMEMBER(int, pfnInit, (PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC));
356 DECLCALLBACKMEMBER(int, pfnPowerOn, (PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC));
357 DECLCALLBACKMEMBER(int, pfnTerminate, (PVGASTATECC pThisCC));
358 DECLCALLBACKMEMBER(int, pfnReset, (PVGASTATECC pThisCC));
359 DECLCALLBACKMEMBER(int, pfnQueryCaps, (PVGASTATECC pThisCC, SVGA3dDevCapIndex idx3dCaps, uint32_t *pu32Val));
360 DECLCALLBACKMEMBER(int, pfnChangeMode, (PVGASTATECC pThisCC));
361 DECLCALLBACKMEMBER(int, pfnCreateTexture, (PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t idAssociatedContext, PVMSVGA3DSURFACE pSurface));
362 DECLCALLBACKMEMBER(void, pfnSurfaceDestroy, (PVGASTATECC pThisCC, bool fClearCOTableEntry, PVMSVGA3DSURFACE pSurface));
363 DECLCALLBACKMEMBER(void, pfnSurfaceInvalidateImage, (PVGASTATECC pThisCC, PVMSVGA3DSURFACE pSurface, uint32_t uFace, uint32_t uMipmap));
364 DECLCALLBACKMEMBER(int, pfnSurfaceCopy, (PVGASTATECC pThisCC, SVGA3dSurfaceImageId dest, SVGA3dSurfaceImageId src, uint32_t cCopyBoxes, SVGA3dCopyBox *pBox));
365 DECLCALLBACKMEMBER(int, pfnSurfaceDMACopyBox, (PVGASTATE pThis, PVGASTATECC pThisCC, PVMSVGA3DSTATE pState, PVMSVGA3DSURFACE pSurface,
366 PVMSVGA3DMIPMAPLEVEL pMipLevel, uint32_t uHostFace, uint32_t uHostMipmap,
367 SVGAGuestPtr GuestPtr, uint32_t cbGuestPitch, SVGA3dTransferType transfer,
368 SVGA3dCopyBox const *pBox, PVMSVGA3DCONTEXT pContext, int rc, int iBox));
369 DECLCALLBACKMEMBER(int, pfnSurfaceStretchBlt, (PVGASTATE pThis, PVMSVGA3DSTATE pState,
370 PVMSVGA3DSURFACE pDstSurface, uint32_t uDstFace, uint32_t uDstMipmap, SVGA3dBox const *pDstBox,
371 PVMSVGA3DSURFACE pSrcSurface, uint32_t uSrcFace, uint32_t uSrcMipmap, SVGA3dBox const *pSrcBox,
372 SVGA3dStretchBltMode enmMode, PVMSVGA3DCONTEXT pContext));
373 DECLCALLBACKMEMBER(void, pfnUpdateHostScreenViewport, (PVGASTATECC pThisCC, uint32_t idScreen, VMSVGAVIEWPORT const *pOldViewport));
374 /** @todo HW accelerated screen output probably needs a separate interface. */
375 DECLCALLBACKMEMBER(int, pfnDefineScreen, (PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen));
376 DECLCALLBACKMEMBER(int, pfnDestroyScreen, (PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen));
377 DECLCALLBACKMEMBER(int, pfnSurfaceBlitToScreen, (PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen,
378 SVGASignedRect destRect, SVGA3dSurfaceImageId srcImage,
379 SVGASignedRect srcRect, uint32_t cRects, SVGASignedRect *paRects));
380 /* Various helpers. */
381 DECLCALLBACKMEMBER(int, pfnSurfaceUpdateHeapBuffers, (PVGASTATECC pThisCC, PVMSVGA3DSURFACE pSurface));
382} VMSVGA3DBACKENDFUNCS3D;
383
384/* VGPU9 3D */
385#define VMSVGA3D_BACKEND_INTERFACE_NAME_VGPU9 "VGPU9"
386typedef struct
387{
388 DECLCALLBACKMEMBER(int, pfnContextDefine, (PVGASTATECC pThisCC, uint32_t cid));
389 DECLCALLBACKMEMBER(int, pfnContextDestroy, (PVGASTATECC pThisCC, uint32_t cid));
390 DECLCALLBACKMEMBER(int, pfnSetTransform, (PVGASTATECC pThisCC, uint32_t cid, SVGA3dTransformType type, float matrix[16]));
391 DECLCALLBACKMEMBER(int, pfnSetZRange, (PVGASTATECC pThisCC, uint32_t cid, SVGA3dZRange zRange));
392 DECLCALLBACKMEMBER(int, pfnSetRenderState, (PVGASTATECC pThisCC, uint32_t cid, uint32_t cRenderStates, SVGA3dRenderState *pRenderState));
393 DECLCALLBACKMEMBER(int, pfnSetRenderTarget, (PVGASTATECC pThisCC, uint32_t cid, SVGA3dRenderTargetType type, SVGA3dSurfaceImageId target));
394 DECLCALLBACKMEMBER(int, pfnSetTextureState, (PVGASTATECC pThisCC, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState));
395 DECLCALLBACKMEMBER(int, pfnSetMaterial, (PVGASTATECC pThisCC, uint32_t cid, SVGA3dFace face, SVGA3dMaterial *pMaterial));
396 DECLCALLBACKMEMBER(int, pfnSetLightData, (PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData));
397 DECLCALLBACKMEMBER(int, pfnSetLightEnabled, (PVGASTATECC pThisCC, uint32_t cid, uint32_t index, uint32_t enabled));
398 DECLCALLBACKMEMBER(int, pfnSetViewPort, (PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect));
399 DECLCALLBACKMEMBER(int, pfnSetClipPlane, (PVGASTATECC pThisCC, uint32_t cid, uint32_t index, float plane[4]));
400 DECLCALLBACKMEMBER(int, pfnCommandClear, (PVGASTATECC pThisCC, uint32_t cid, SVGA3dClearFlag clearFlag, uint32_t color, float depth, uint32_t stencil, uint32_t cRects, SVGA3dRect *pRect));
401 DECLCALLBACKMEMBER(int, pfnDrawPrimitives, (PVGASTATECC pThisCC, uint32_t cid, uint32_t numVertexDecls, SVGA3dVertexDecl *pVertexDecl, uint32_t numRanges, SVGA3dPrimitiveRange *pNumRange, uint32_t cVertexDivisor, SVGA3dVertexDivisor *pVertexDivisor));
402 DECLCALLBACKMEMBER(int, pfnSetScissorRect, (PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect));
403 DECLCALLBACKMEMBER(int, pfnGenerateMipmaps, (PVGASTATECC pThisCC, uint32_t sid, SVGA3dTextureFilter filter));
404 DECLCALLBACKMEMBER(int, pfnShaderDefine, (PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type, uint32_t cbData, uint32_t *pShaderData));
405 DECLCALLBACKMEMBER(int, pfnShaderDestroy, (PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type));
406 DECLCALLBACKMEMBER(int, pfnShaderSet, (PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t cid, SVGA3dShaderType type, uint32_t shid));
407 DECLCALLBACKMEMBER(int, pfnShaderSetConst, (PVGASTATECC pThisCC, uint32_t cid, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, uint32_t cRegisters, uint32_t *pValues));
408 DECLCALLBACKMEMBER(int, pfnOcclusionQueryCreate, (PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext));
409 DECLCALLBACKMEMBER(int, pfnOcclusionQueryDelete, (PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext));
410 DECLCALLBACKMEMBER(int, pfnOcclusionQueryBegin, (PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext));
411 DECLCALLBACKMEMBER(int, pfnOcclusionQueryEnd, (PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext));
412 DECLCALLBACKMEMBER(int, pfnOcclusionQueryGetData, (PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t *pu32Pixels));
413} VMSVGA3DBACKENDFUNCSVGPU9;
414
415/* Support for Guest-Backed Objects. */
416#define VMSVGA3D_BACKEND_INTERFACE_NAME_GBO "GBO"
417typedef struct
418{
419 DECLCALLBACKMEMBER(int, pfnScreenTargetBind, (PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen, uint32_t sid));
420 DECLCALLBACKMEMBER(int, pfnScreenTargetUpdate, (PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen, SVGA3dRect const *pRect));
421} VMSVGA3DBACKENDFUNCSGBO;
422
423#define VMSVGA3D_BACKEND_INTERFACE_NAME_MAP "MAP"
424typedef struct
425{
426 DECLCALLBACKMEMBER(int, pfnSurfaceMap, (PVGASTATECC pThisCC, SVGA3dSurfaceImageId const *pImage, SVGA3dBox const *pBox, VMSVGA3D_SURFACE_MAP enmMapType, VMSVGA3D_MAPPED_SURFACE *pMap));
427 DECLCALLBACKMEMBER(int, pfnSurfaceUnmap, (PVGASTATECC pThisCC, SVGA3dSurfaceImageId const *pImage, VMSVGA3D_MAPPED_SURFACE *pMap, bool fWritten));
428} VMSVGA3DBACKENDFUNCSMAP;
429
430typedef struct VMSVGA3DSHADER *PVMSVGA3DSHADER;
431typedef struct VMSVGA3DDXCONTEXT *PVMSVGA3DDXCONTEXT;
432struct DXShaderInfo;
433#define VMSVGA3D_BACKEND_INTERFACE_NAME_DX "DX"
434typedef struct
435{
436 DECLCALLBACKMEMBER(int, pfnDXSaveState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PCPDMDEVHLPR3 pHlp, PSSMHANDLE pSSM));
437 DECLCALLBACKMEMBER(int, pfnDXLoadState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, PCPDMDEVHLPR3 pHlp, PSSMHANDLE pSSM));
438 DECLCALLBACKMEMBER(int, pfnDXDefineContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
439 DECLCALLBACKMEMBER(int, pfnDXDestroyContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
440 DECLCALLBACKMEMBER(int, pfnDXBindContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
441 DECLCALLBACKMEMBER(int, pfnDXSwitchContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
442 DECLCALLBACKMEMBER(int, pfnDXReadbackContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
443 DECLCALLBACKMEMBER(int, pfnDXInvalidateContext, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
444 DECLCALLBACKMEMBER(int, pfnDXSetSingleConstantBuffer, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t slot, SVGA3dShaderType type, SVGA3dSurfaceId sid, uint32_t offsetInBytes, uint32_t sizeInBytes));
445 DECLCALLBACKMEMBER(int, pfnDXSetShaderResources, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t startView, SVGA3dShaderType type, uint32_t cShaderResourceViewId, SVGA3dShaderResourceViewId const *paShaderResourceViewId));
446 DECLCALLBACKMEMBER(int, pfnDXSetShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderId shaderId, SVGA3dShaderType type));
447 DECLCALLBACKMEMBER(int, pfnDXSetSamplers, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t startSampler, SVGA3dShaderType type, uint32_t cSamplerId, SVGA3dSamplerId const *paSamplerId));
448 DECLCALLBACKMEMBER(int, pfnDXDraw, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t vertexCount, uint32_t startVertexLocation));
449 DECLCALLBACKMEMBER(int, pfnDXDrawIndexed, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t indexCount, uint32_t startIndexLocation, int32_t baseVertexLocation));
450 DECLCALLBACKMEMBER(int, pfnDXDrawInstanced, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t vertexCountPerInstance, uint32_t instanceCount, uint32_t startVertexLocation, uint32_t startInstanceLocation));
451 DECLCALLBACKMEMBER(int, pfnDXDrawIndexedInstanced, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t indexCountPerInstance, uint32_t instanceCount, uint32_t startIndexLocation, int32_t baseVertexLocation, uint32_t startInstanceLocation));
452 DECLCALLBACKMEMBER(int, pfnDXDrawAuto, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
453 DECLCALLBACKMEMBER(int, pfnDXSetInputLayout, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dElementLayoutId elementLayoutId));
454 DECLCALLBACKMEMBER(int, pfnDXSetVertexBuffers, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t startBuffer, uint32_t cVertexBuffer, SVGA3dVertexBuffer const *paVertexBuffer));
455 DECLCALLBACKMEMBER(int, pfnDXSetIndexBuffer, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSurfaceId sid, SVGA3dSurfaceFormat format, uint32_t offset));
456 DECLCALLBACKMEMBER(int, pfnDXSetTopology, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dPrimitiveType topology));
457 DECLCALLBACKMEMBER(int, pfnDXSetRenderTargets, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilViewId depthStencilViewId, uint32_t cRenderTargetViewId, SVGA3dRenderTargetViewId const *paRenderTargetViewId));
458 DECLCALLBACKMEMBER(int, pfnDXSetBlendState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dBlendStateId blendId, float const blendFactor[4], uint32_t sampleMask));
459 DECLCALLBACKMEMBER(int, pfnDXSetDepthStencilState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilStateId depthStencilId, uint32_t stencilRef));
460 DECLCALLBACKMEMBER(int, pfnDXSetRasterizerState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRasterizerStateId rasterizerId));
461 DECLCALLBACKMEMBER(int, pfnDXDefineQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dQueryId queryId, SVGACOTableDXQueryEntry const *pEntry));
462 DECLCALLBACKMEMBER(int, pfnDXDestroyQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dQueryId queryId));
463 DECLCALLBACKMEMBER(int, pfnDXBeginQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dQueryId queryId));
464 DECLCALLBACKMEMBER(int, pfnDXEndQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dQueryId queryId, SVGADXQueryResultUnion *pQueryResult, uint32_t *pcbOut));
465 DECLCALLBACKMEMBER(int, pfnDXSetPredication, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dQueryId queryId, uint32_t predicateValue));
466 DECLCALLBACKMEMBER(int, pfnDXSetSOTargets, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t cSoTarget, SVGA3dSoTarget const *paSoTarget));
467 DECLCALLBACKMEMBER(int, pfnDXSetViewports, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t cViewport, SVGA3dViewport const *paViewport));
468 DECLCALLBACKMEMBER(int, pfnDXSetScissorRects, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t cRect, SVGASignedRect const *paRect));
469 DECLCALLBACKMEMBER(int, pfnDXClearRenderTargetView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRenderTargetViewId renderTargetViewId, SVGA3dRGBAFloat const *pRGBA));
470 DECLCALLBACKMEMBER(int, pfnDXClearDepthStencilView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t flags, SVGA3dDepthStencilViewId depthStencilViewId, float depth, uint8_t stencil));
471 DECLCALLBACKMEMBER(int, pfnDXPredCopyRegion, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSurfaceId dstSid, uint32_t dstSubResource, SVGA3dSurfaceId srcSid, uint32_t srcSubResource, SVGA3dCopyBox const *pBox));
472 DECLCALLBACKMEMBER(int, pfnDXPredCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSurfaceId dstSid, SVGA3dSurfaceId srcSid));
473 DECLCALLBACKMEMBER(int, pfnDXPresentBlt, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSurfaceId dstSid, uint32_t dstSubResource, SVGA3dBox const *pBoxDst, SVGA3dSurfaceId srcSid, uint32_t srcSubResource, SVGA3dBox const *pBoxSrc, SVGA3dDXPresentBltMode mode));
474 DECLCALLBACKMEMBER(int, pfnDXGenMips, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderResourceViewId shaderResourceViewId));
475 DECLCALLBACKMEMBER(int, pfnDXDefineShaderResourceView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderResourceViewId shaderResourceViewId, SVGACOTableDXSRViewEntry const *pEntry));
476 DECLCALLBACKMEMBER(int, pfnDXDestroyShaderResourceView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderResourceViewId shaderResourceViewId));
477 DECLCALLBACKMEMBER(int, pfnDXDefineRenderTargetView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRenderTargetViewId renderTargetViewId, SVGACOTableDXRTViewEntry const *pEntry));
478 DECLCALLBACKMEMBER(int, pfnDXDestroyRenderTargetView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRenderTargetViewId renderTargetViewId));
479 DECLCALLBACKMEMBER(int, pfnDXDefineDepthStencilView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilViewId depthStencilViewId, SVGACOTableDXDSViewEntry const *pEntry));
480 DECLCALLBACKMEMBER(int, pfnDXDestroyDepthStencilView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilViewId depthStencilViewId));
481 DECLCALLBACKMEMBER(int, pfnDXDefineElementLayout, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dElementLayoutId elementLayoutId, SVGACOTableDXElementLayoutEntry const *pEntry));
482 DECLCALLBACKMEMBER(int, pfnDXDestroyElementLayout, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dElementLayoutId elementLayoutId));
483 DECLCALLBACKMEMBER(int, pfnDXDefineBlendState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dBlendStateId blendId, SVGACOTableDXBlendStateEntry const *pEntry));
484 DECLCALLBACKMEMBER(int, pfnDXDestroyBlendState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dBlendStateId blendId));
485 DECLCALLBACKMEMBER(int, pfnDXDefineDepthStencilState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilStateId depthStencilId, SVGACOTableDXDepthStencilEntry const *pEntry));
486 DECLCALLBACKMEMBER(int, pfnDXDestroyDepthStencilState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dDepthStencilStateId depthStencilId));
487 DECLCALLBACKMEMBER(int, pfnDXDefineRasterizerState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRasterizerStateId rasterizerId, SVGACOTableDXRasterizerStateEntry const *pEntry));
488 DECLCALLBACKMEMBER(int, pfnDXDestroyRasterizerState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRasterizerStateId rasterizerId));
489 DECLCALLBACKMEMBER(int, pfnDXDefineSamplerState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSamplerId samplerId, SVGACOTableDXSamplerEntry const *pEntry));
490 DECLCALLBACKMEMBER(int, pfnDXDestroySamplerState, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSamplerId samplerId));
491 DECLCALLBACKMEMBER(int, pfnDXDefineShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderId shaderId, SVGACOTableDXShaderEntry const *pEntry));
492 DECLCALLBACKMEMBER(int, pfnDXDestroyShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderId shaderId));
493 DECLCALLBACKMEMBER(int, pfnDXBindShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dShaderId shaderId, DXShaderInfo const *pShaderInfo));
494 DECLCALLBACKMEMBER(int, pfnDXDefineStreamOutput, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dStreamOutputId soid, SVGACOTableDXStreamOutputEntry const *pEntry));
495 DECLCALLBACKMEMBER(int, pfnDXDestroyStreamOutput, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dStreamOutputId soid));
496 DECLCALLBACKMEMBER(int, pfnDXSetStreamOutput, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dStreamOutputId soid));
497 DECLCALLBACKMEMBER(int, pfnDXSetCOTable, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGACOTableType type, uint32_t cValidEntries));
498 DECLCALLBACKMEMBER(int, pfnDXBufferCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
499 DECLCALLBACKMEMBER(int, pfnDXSurfaceCopyAndReadback, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
500 DECLCALLBACKMEMBER(int, pfnDXMoveQuery, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
501 DECLCALLBACKMEMBER(int, pfnDXBindAllShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
502 DECLCALLBACKMEMBER(int, pfnDXHint, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
503 DECLCALLBACKMEMBER(int, pfnDXBufferUpdate, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
504 DECLCALLBACKMEMBER(int, pfnDXSetVSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
505 DECLCALLBACKMEMBER(int, pfnDXSetPSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
506 DECLCALLBACKMEMBER(int, pfnDXSetGSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
507 DECLCALLBACKMEMBER(int, pfnDXSetHSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
508 DECLCALLBACKMEMBER(int, pfnDXSetDSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
509 DECLCALLBACKMEMBER(int, pfnDXSetCSConstantBufferOffset, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
510 DECLCALLBACKMEMBER(int, pfnDXCondBindAllShader, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
511 DECLCALLBACKMEMBER(int, pfnScreenCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
512 DECLCALLBACKMEMBER(int, pfnIntraSurfaceCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
513 DECLCALLBACKMEMBER(int, pfnDXResolveCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
514 DECLCALLBACKMEMBER(int, pfnDXPredResolveCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
515 DECLCALLBACKMEMBER(int, pfnDXPredConvertRegion, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
516 DECLCALLBACKMEMBER(int, pfnDXPredConvert, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
517 DECLCALLBACKMEMBER(int, pfnWholeSurfaceCopy, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
518 DECLCALLBACKMEMBER(int, pfnDXDefineUAView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dUAViewId uaViewId, SVGACOTableDXUAViewEntry const *pEntry));
519 DECLCALLBACKMEMBER(int, pfnDXDestroyUAView, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dUAViewId uaViewId));
520 DECLCALLBACKMEMBER(int, pfnDXClearUAViewUint, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dUAViewId uaViewId, uint32_t const aValues[4]));
521 DECLCALLBACKMEMBER(int, pfnDXClearUAViewFloat, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dUAViewId uaViewId, float const aValues[4]));
522 DECLCALLBACKMEMBER(int, pfnDXCopyStructureCount, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dUAViewId srcUAViewId, SVGA3dSurfaceId destSid, uint32_t destByteOffset));
523 DECLCALLBACKMEMBER(int, pfnDXSetUAViews, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t uavSpliceIndex, uint32_t cUAViewId, SVGA3dUAViewId const *paUAViewId));
524 DECLCALLBACKMEMBER(int, pfnDXDrawIndexedInstancedIndirect, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSurfaceId argsBufferSid, uint32_t byteOffsetForArgs));
525 DECLCALLBACKMEMBER(int, pfnDXDrawInstancedIndirect, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dSurfaceId argsBufferSid, uint32_t byteOffsetForArgs));
526 DECLCALLBACKMEMBER(int, pfnDXDispatch, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t threadGroupCountX, uint32_t threadGroupCountY, uint32_t threadGroupCountZ));
527 DECLCALLBACKMEMBER(int, pfnDXDispatchIndirect, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
528 DECLCALLBACKMEMBER(int, pfnWriteZeroSurface, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
529 DECLCALLBACKMEMBER(int, pfnHintZeroSurface, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
530 DECLCALLBACKMEMBER(int, pfnDXTransferToBuffer, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
531 DECLCALLBACKMEMBER(int, pfnLogicOpsBitBlt, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
532 DECLCALLBACKMEMBER(int, pfnLogicOpsTransBlt, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
533 DECLCALLBACKMEMBER(int, pfnLogicOpsStretchBlt, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
534 DECLCALLBACKMEMBER(int, pfnLogicOpsColorFill, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
535 DECLCALLBACKMEMBER(int, pfnLogicOpsAlphaBlend, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
536 DECLCALLBACKMEMBER(int, pfnLogicOpsClearTypeBlend, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
537 DECLCALLBACKMEMBER(int, pfnDXSetCSUAViews, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, uint32_t startIndex, uint32_t cUAViewId, SVGA3dUAViewId const *paUAViewId));
538 DECLCALLBACKMEMBER(int, pfnDXSetMinLOD, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
539 DECLCALLBACKMEMBER(int, pfnDXSetShaderIface, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
540 DECLCALLBACKMEMBER(int, pfnSurfaceStretchBltNonMSToMS, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
541 DECLCALLBACKMEMBER(int, pfnDXBindShaderIface, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext));
542 DECLCALLBACKMEMBER(int, pfnVBDXClearRenderTargetViewRegion, (PVGASTATECC pThisCC, PVMSVGA3DDXCONTEXT pDXContext, SVGA3dRenderTargetViewId renderTargetViewId, SVGA3dRGBAFloat const *pColor, uint32_t cRect, SVGASignedRect const *paRect));
543} VMSVGA3DBACKENDFUNCSDX;
544
545typedef struct VMSVGA3DBACKENDDESC
546{
547 char const *pszName;
548 DECLCALLBACKMEMBER(int, pfnQueryInterface, (PVGASTATECC pThisCC, char const *pszInterfaceName, void *pvInterfaceFuncs, size_t cbInterfaceFuncs));
549} VMSVGA3DBACKENDDESC;
550
551#ifdef VMSVGA3D_DX
552/* Helpers. */
553int vmsvga3dDXUnbindContext(PVGASTATECC pThisCC, uint32_t cid, SVGADXContextMobFormat *pSvgaDXContext);
554int vmsvga3dDXSwitchContext(PVGASTATECC pThisCC, uint32_t cid);
555
556/* Command handlers. */
557int vmsvga3dDXDefineContext(PVGASTATECC pThisCC, uint32_t cid);
558int vmsvga3dDXDestroyContext(PVGASTATECC pThisCC, uint32_t cid);
559int vmsvga3dDXBindContext(PVGASTATECC pThisCC, uint32_t cid, SVGADXContextMobFormat *pSvgaDXContext);
560int vmsvga3dDXReadbackContext(PVGASTATECC pThisCC, uint32_t idDXContext, SVGADXContextMobFormat *pSvgaDXContext);
561int vmsvga3dDXInvalidateContext(PVGASTATECC pThisCC, uint32_t idDXContext);
562int vmsvga3dDXSetSingleConstantBuffer(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetSingleConstantBuffer const *pCmd);
563int vmsvga3dDXSetShaderResources(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetShaderResources const *pCmd, uint32_t cShaderResourceViewId, SVGA3dShaderResourceViewId const *paShaderResourceViewId);
564int vmsvga3dDXSetShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetShader const *pCmd);
565int vmsvga3dDXSetSamplers(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetSamplers const *pCmd, uint32_t cSamplerId, SVGA3dSamplerId const *paSamplerId);
566int vmsvga3dDXDraw(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDraw const *pCmd);
567int vmsvga3dDXDrawIndexed(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawIndexed const *pCmd);
568int vmsvga3dDXDrawInstanced(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawInstanced const *pCmd);
569int vmsvga3dDXDrawIndexedInstanced(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawIndexedInstanced const *pCmd);
570int vmsvga3dDXDrawAuto(PVGASTATECC pThisCC, uint32_t idDXContext);
571int vmsvga3dDXSetInputLayout(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dElementLayoutId elementLayoutId);
572int vmsvga3dDXSetVertexBuffers(PVGASTATECC pThisCC, uint32_t idDXContext, uint32_t startBuffer, uint32_t cVertexBuffer, SVGA3dVertexBuffer const *paVertexBuffer);
573int vmsvga3dDXSetIndexBuffer(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetIndexBuffer const *pCmd);
574int vmsvga3dDXSetTopology(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dPrimitiveType topology);
575int vmsvga3dDXSetRenderTargets(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dDepthStencilViewId depthStencilViewId, uint32_t cRenderTargetViewId, SVGA3dRenderTargetViewId const *paRenderTargetViewId);
576int vmsvga3dDXSetBlendState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetBlendState const *pCmd);
577int vmsvga3dDXSetDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetDepthStencilState const *pCmd);
578int vmsvga3dDXSetRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dRasterizerStateId rasterizerId);
579int vmsvga3dDXDefineQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineQuery const *pCmd);
580int vmsvga3dDXDestroyQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyQuery const *pCmd);
581int vmsvga3dDXBindQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBindQuery const *pCmd, PVMSVGAMOB pMob);
582int vmsvga3dDXSetQueryOffset(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetQueryOffset const *pCmd);
583int vmsvga3dDXBeginQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBeginQuery const *pCmd);
584int vmsvga3dDXEndQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXEndQuery const *pCmd);
585int vmsvga3dDXReadbackQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXReadbackQuery const *pCmd);
586int vmsvga3dDXSetPredication(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetPredication const *pCmd);
587int vmsvga3dDXSetSOTargets(PVGASTATECC pThisCC, uint32_t idDXContext, uint32_t cSoTarget, SVGA3dSoTarget const *paSoTarget);
588int vmsvga3dDXSetViewports(PVGASTATECC pThisCC, uint32_t idDXContext, uint32_t cViewport, SVGA3dViewport const *paViewport);
589int vmsvga3dDXSetScissorRects(PVGASTATECC pThisCC, uint32_t idDXContext, uint32_t cRect, SVGASignedRect const *paRect);
590int vmsvga3dDXClearRenderTargetView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXClearRenderTargetView const *pCmd);
591int vmsvga3dDXClearDepthStencilView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXClearDepthStencilView const *pCmd);
592int vmsvga3dDXPredCopyRegion(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXPredCopyRegion const *pCmd);
593int vmsvga3dDXPredCopy(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXPredCopy const *pCmd);
594int vmsvga3dDXPresentBlt(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXPresentBlt const *pCmd);
595int vmsvga3dDXGenMips(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXGenMips const *pCmd);
596int vmsvga3dDXDefineShaderResourceView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineShaderResourceView const *pCmd);
597int vmsvga3dDXDestroyShaderResourceView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyShaderResourceView const *pCmd);
598int vmsvga3dDXDefineRenderTargetView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRenderTargetView const *pCmd);
599int vmsvga3dDXDestroyRenderTargetView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyRenderTargetView const *pCmd);
600int vmsvga3dDXDefineDepthStencilView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineDepthStencilView_v2 const *pCmd);
601int vmsvga3dDXDestroyDepthStencilView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyDepthStencilView const *pCmd);
602int vmsvga3dDXDefineElementLayout(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dElementLayoutId elementLayoutId, uint32_t cDesc, SVGA3dInputElementDesc const *paDesc);
603int vmsvga3dDXDestroyElementLayout(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyElementLayout const *pCmd);
604int vmsvga3dDXDefineBlendState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineBlendState const *pCmd);
605int vmsvga3dDXDestroyBlendState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyBlendState const *pCmd);
606int vmsvga3dDXDefineDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineDepthStencilState const *pCmd);
607int vmsvga3dDXDestroyDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyDepthStencilState const *pCmd);
608int vmsvga3dDXDefineRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRasterizerState const *pCmd);
609int vmsvga3dDXDestroyRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyRasterizerState const *pCmd);
610int vmsvga3dDXDefineSamplerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineSamplerState const *pCmd);
611int vmsvga3dDXDestroySamplerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroySamplerState const *pCmd);
612int vmsvga3dDXDefineShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineShader const *pCmd);
613int vmsvga3dDXDestroyShader(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyShader const *pCmd);
614int vmsvga3dDXBindShader(PVGASTATECC pThisCC, SVGA3dCmdDXBindShader const *pCmd, PVMSVGAMOB pMob);
615int vmsvga3dDXDefineStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineStreamOutput const *pCmd);
616int vmsvga3dDXDestroyStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyStreamOutput const *pCmd);
617int vmsvga3dDXSetStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetStreamOutput const *pCmd);
618int vmsvga3dDXSetCOTable(PVGASTATECC pThisCC, SVGA3dCmdDXSetCOTable const *pCmd, PVMSVGAMOB pMob);
619int vmsvga3dDXReadbackCOTable(PVGASTATECC pThisCC, SVGA3dCmdDXReadbackCOTable const *pCmd);
620int vmsvga3dDXBufferCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
621int vmsvga3dDXSurfaceCopyAndReadback(PVGASTATECC pThisCC, uint32_t idDXContext);
622int vmsvga3dDXMoveQuery(PVGASTATECC pThisCC, uint32_t idDXContext);
623int vmsvga3dDXBindAllQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBindAllQuery const *pCmd);
624int vmsvga3dDXReadbackAllQuery(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXReadbackAllQuery const *pCmd);
625int vmsvga3dDXBindAllShader(PVGASTATECC pThisCC, uint32_t idDXContext);
626int vmsvga3dDXHint(PVGASTATECC pThisCC, uint32_t idDXContext);
627int vmsvga3dDXBufferUpdate(PVGASTATECC pThisCC, uint32_t idDXContext);
628int vmsvga3dDXSetVSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
629int vmsvga3dDXSetPSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
630int vmsvga3dDXSetGSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
631int vmsvga3dDXSetHSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
632int vmsvga3dDXSetDSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
633int vmsvga3dDXSetCSConstantBufferOffset(PVGASTATECC pThisCC, uint32_t idDXContext);
634int vmsvga3dDXCondBindAllShader(PVGASTATECC pThisCC, uint32_t idDXContext);
635int vmsvga3dScreenCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
636int vmsvga3dDXGrowCOTable(PVGASTATECC pThisCC, SVGA3dCmdDXGrowCOTable const *pCmd);
637int vmsvga3dIntraSurfaceCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
638int vmsvga3dDXResolveCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
639int vmsvga3dDXPredResolveCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
640int vmsvga3dDXPredConvertRegion(PVGASTATECC pThisCC, uint32_t idDXContext);
641int vmsvga3dDXPredConvert(PVGASTATECC pThisCC, uint32_t idDXContext);
642int vmsvga3dWholeSurfaceCopy(PVGASTATECC pThisCC, uint32_t idDXContext);
643int vmsvga3dDXDefineUAView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineUAView const *pCmd);
644int vmsvga3dDXDestroyUAView(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyUAView const *pCmd);
645int vmsvga3dDXClearUAViewUint(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXClearUAViewUint const *pCmd);
646int vmsvga3dDXClearUAViewFloat(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXClearUAViewFloat const *pCmd);
647int vmsvga3dDXCopyStructureCount(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXCopyStructureCount const *pCmd);
648int vmsvga3dDXSetUAViews(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetUAViews const *pCmd, uint32_t cUAViewId, SVGA3dUAViewId const *paUAViewId);
649int vmsvga3dDXDrawIndexedInstancedIndirect(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawIndexedInstancedIndirect const *pCmd);
650int vmsvga3dDXDrawInstancedIndirect(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDrawInstancedIndirect const *pCmd);
651int vmsvga3dDXDispatch(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDispatch const *pCmd);
652int vmsvga3dDXDispatchIndirect(PVGASTATECC pThisCC, uint32_t idDXContext);
653int vmsvga3dWriteZeroSurface(PVGASTATECC pThisCC, uint32_t idDXContext);
654int vmsvga3dHintZeroSurface(PVGASTATECC pThisCC, uint32_t idDXContext);
655int vmsvga3dDXTransferToBuffer(PVGASTATECC pThisCC, uint32_t idDXContext);
656int vmsvga3dDXSetStructureCount(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetStructureCount const *pCmd);
657int vmsvga3dLogicOpsBitBlt(PVGASTATECC pThisCC, uint32_t idDXContext);
658int vmsvga3dLogicOpsTransBlt(PVGASTATECC pThisCC, uint32_t idDXContext);
659int vmsvga3dLogicOpsStretchBlt(PVGASTATECC pThisCC, uint32_t idDXContext);
660int vmsvga3dLogicOpsColorFill(PVGASTATECC pThisCC, uint32_t idDXContext);
661int vmsvga3dLogicOpsAlphaBlend(PVGASTATECC pThisCC, uint32_t idDXContext);
662int vmsvga3dLogicOpsClearTypeBlend(PVGASTATECC pThisCC, uint32_t idDXContext);
663int vmsvga3dDXSetCSUAViews(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXSetCSUAViews const *pCmd, uint32_t cUAViewId, SVGA3dUAViewId const *paUAViewId);
664int vmsvga3dDXSetMinLOD(PVGASTATECC pThisCC, uint32_t idDXContext);
665int vmsvga3dDXDefineStreamOutputWithMob(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineStreamOutputWithMob const *pCmd);
666int vmsvga3dDXSetShaderIface(PVGASTATECC pThisCC, uint32_t idDXContext);
667int vmsvga3dDXBindStreamOutput(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXBindStreamOutput const *pCmd);
668int vmsvga3dSurfaceStretchBltNonMSToMS(PVGASTATECC pThisCC, uint32_t idDXContext);
669int vmsvga3dDXBindShaderIface(PVGASTATECC pThisCC, uint32_t idDXContext);
670int vmsvga3dDXLoadExec(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);
671int vmsvga3dDXSaveExec(PPDMDEVINS pDevIns, PVGASTATECC pThisCC, PSSMHANDLE pSSM);
672
673int vmsvga3dVBDXClearRenderTargetViewRegion(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdVBDXClearRenderTargetViewRegion const *pCmd, uint32_t cRect, SVGASignedRect const *paRect);
674#endif /* VMSVGA3D_DX */
675
676
677#endif /* !VBOX_INCLUDED_SRC_Graphics_DevVGA_SVGA3d_h */
678
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