Changeset 89123 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
- Timestamp:
- May 17, 2021 8:16:19 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r89121 r89123 170 170 *********************************************************************************************************************************/ 171 171 static int vmsvga3dContextDestroyOgl(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t cid); 172 static intvmsvga3dBackContextDestroy(PVGASTATECC pThisCC, uint32_t cid);172 static DECLCALLBACK(int) vmsvga3dBackContextDestroy(PVGASTATECC pThisCC, uint32_t cid); 173 173 static void vmsvgaColor2GLFloatArray(uint32_t color, GLfloat *pRed, GLfloat *pGreen, GLfloat *pBlue, GLfloat *pAlpha); 174 static intvmsvga3dBackSetLightData(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData);175 static intvmsvga3dBackSetClipPlane(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, float plane[4]);176 static intvmsvga3dBackShaderDestroy(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type);177 static intvmsvga3dBackOcclusionQueryDelete(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext);178 static intvmsvga3dBackCreateTexture(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t idAssociatedContext, PVMSVGA3DSURFACE pSurface);174 static DECLCALLBACK(int) vmsvga3dBackSetLightData(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData); 175 static DECLCALLBACK(int) vmsvga3dBackSetClipPlane(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, float plane[4]); 176 static DECLCALLBACK(int) vmsvga3dBackShaderDestroy(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type); 177 static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryDelete(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext); 178 static DECLCALLBACK(int) vmsvga3dBackCreateTexture(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t idAssociatedContext, PVMSVGA3DSURFACE pSurface); 179 179 180 180 /* Generated by VBoxDef2LazyLoad from the VBoxSVGA3D.def and VBoxSVGA3DObjC.def files. */ … … 595 595 * @param pThisCC The VGA/VMSVGA state for ring-3. 596 596 */ 597 static intvmsvga3dBackInit(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC)597 static DECLCALLBACK(int) vmsvga3dBackInit(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC) 598 598 { 599 599 int rc; … … 828 828 829 829 /* We must delay window creation until the PowerOn phase. Init is too early and will cause failures. */ 830 static intvmsvga3dBackPowerOn(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC)830 static DECLCALLBACK(int) vmsvga3dBackPowerOn(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC) 831 831 { 832 832 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 1150 1150 } 1151 1151 1152 static intvmsvga3dBackReset(PVGASTATECC pThisCC)1152 static DECLCALLBACK(int) vmsvga3dBackReset(PVGASTATECC pThisCC) 1153 1153 { 1154 1154 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 1175 1175 } 1176 1176 1177 static intvmsvga3dBackTerminate(PVGASTATECC pThisCC)1177 static DECLCALLBACK(int) vmsvga3dBackTerminate(PVGASTATECC pThisCC) 1178 1178 { 1179 1179 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 1216 1216 1217 1217 1218 static voidvmsvga3dBackUpdateHostScreenViewport(PVGASTATECC pThisCC, uint32_t idScreen, VMSVGAVIEWPORT const *pOldViewport)1218 static DECLCALLBACK(void) vmsvga3dBackUpdateHostScreenViewport(PVGASTATECC pThisCC, uint32_t idScreen, VMSVGAVIEWPORT const *pOldViewport) 1219 1219 { 1220 1220 /** @todo Move the visible framebuffer content here, don't wait for the guest to … … 1381 1381 1382 1382 1383 static intvmsvga3dBackQueryCaps(PVGASTATECC pThisCC, SVGA3dDevCapIndex idx3dCaps, uint32_t *pu32Val)1383 static DECLCALLBACK(int) vmsvga3dBackQueryCaps(PVGASTATECC pThisCC, SVGA3dDevCapIndex idx3dCaps, uint32_t *pu32Val) 1384 1384 { 1385 1385 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 2004 2004 * @param pSurface The surface being destroyed. 2005 2005 */ 2006 static voidvmsvga3dBackSurfaceDestroy(PVGASTATECC pThisCC, PVMSVGA3DSURFACE pSurface)2006 static DECLCALLBACK(void) vmsvga3dBackSurfaceDestroy(PVGASTATECC pThisCC, PVMSVGA3DSURFACE pSurface) 2007 2007 { 2008 2008 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 2053 2053 2054 2054 2055 static intvmsvga3dBackSurfaceCopy(PVGASTATECC pThisCC, SVGA3dSurfaceImageId dest, SVGA3dSurfaceImageId src,2055 static DECLCALLBACK(int) vmsvga3dBackSurfaceCopy(PVGASTATECC pThisCC, SVGA3dSurfaceImageId dest, SVGA3dSurfaceImageId src, 2056 2056 uint32_t cCopyBoxes, SVGA3dCopyBox *pBox) 2057 2057 { … … 2367 2367 * @param pSurface The surface to create the texture for. 2368 2368 */ 2369 static intvmsvga3dBackCreateTexture(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t idAssociatedContext,2369 static DECLCALLBACK(int) vmsvga3dBackCreateTexture(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t idAssociatedContext, 2370 2370 PVMSVGA3DSURFACE pSurface) 2371 2371 { … … 2660 2660 * @param pContext The VMSVGA3d context (already current for OGL). 2661 2661 */ 2662 static intvmsvga3dBackSurfaceStretchBlt(PVGASTATE pThis, PVMSVGA3DSTATE pState,2662 static DECLCALLBACK(int) vmsvga3dBackSurfaceStretchBlt(PVGASTATE pThis, PVMSVGA3DSTATE pState, 2663 2663 PVMSVGA3DSURFACE pDstSurface, uint32_t uDstFace, uint32_t uDstMipmap, SVGA3dBox const *pDstBox, 2664 2664 PVMSVGA3DSURFACE pSrcSurface, uint32_t uSrcFace, uint32_t uSrcMipmap, SVGA3dBox const *pSrcBox, … … 2863 2863 * @param iBox The current box number (for Direct 3D). 2864 2864 */ 2865 static intvmsvga3dBackSurfaceDMACopyBox(PVGASTATE pThis, PVGASTATECC pThisCC, PVMSVGA3DSTATE pState, PVMSVGA3DSURFACE pSurface,2865 static DECLCALLBACK(int) vmsvga3dBackSurfaceDMACopyBox(PVGASTATE pThis, PVGASTATECC pThisCC, PVMSVGA3DSTATE pState, PVMSVGA3DSURFACE pSurface, 2866 2866 PVMSVGA3DMIPMAPLEVEL pMipLevel, uint32_t uHostFace, uint32_t uHostMipmap, 2867 2867 SVGAGuestPtr GuestPtr, uint32_t cbGuestPitch, SVGA3dTransferType transfer, … … 3149 3149 } 3150 3150 3151 static intvmsvga3dBackGenerateMipmaps(PVGASTATECC pThisCC, uint32_t sid, SVGA3dTextureFilter filter)3151 static DECLCALLBACK(int) vmsvga3dBackGenerateMipmaps(PVGASTATECC pThisCC, uint32_t sid, SVGA3dTextureFilter filter) 3152 3152 { 3153 3153 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 3741 3741 } while(0) 3742 3742 3743 static intvmsvga3dBackDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)3743 static DECLCALLBACK(int) vmsvga3dBackDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen) 3744 3744 { 3745 3745 LogRel4(("VMSVGA: vmsvga3dBackDefineScreen: screen %u\n", pScreen->idScreen)); … … 3847 3847 } 3848 3848 3849 static intvmsvga3dBackDestroyScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)3849 static DECLCALLBACK(int) vmsvga3dBackDestroyScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen) 3850 3850 { 3851 3851 LogRel4(("VMSVGA: vmsvga3dBackDestroyScreen: screen %u\n", pScreen->idScreen)); … … 3873 3873 3874 3874 /* Blit a surface to the GLX pixmap. */ 3875 static intvmsvga3dBackSurfaceBlitToScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen,3875 static DECLCALLBACK(int) vmsvga3dBackSurfaceBlitToScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen, 3876 3876 SVGASignedRect destRect, SVGA3dSurfaceImageId srcImage, 3877 3877 SVGASignedRect srcRect, uint32_t cRects, SVGASignedRect *paRects) … … 3966 3966 #else /* !RT_OS_LINUX */ 3967 3967 3968 static intvmsvga3dBackDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)3968 static DECLCALLBACK(int) vmsvga3dBackDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen) 3969 3969 { 3970 3970 RT_NOREF(pThis, pThisCC, pScreen); … … 3972 3972 } 3973 3973 3974 static intvmsvga3dBackDestroyScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)3974 static DECLCALLBACK(int) vmsvga3dBackDestroyScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen) 3975 3975 { 3976 3976 RT_NOREF(pThisCC, pScreen); … … 3978 3978 } 3979 3979 3980 static intvmsvga3dBackSurfaceBlitToScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen,3980 static DECLCALLBACK(int) vmsvga3dBackSurfaceBlitToScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen, 3981 3981 SVGASignedRect destRect, SVGA3dSurfaceImageId srcImage, 3982 3982 SVGASignedRect srcRect, uint32_t cRects, SVGASignedRect *paRects) … … 3994 3994 * @param cid Context id 3995 3995 */ 3996 static intvmsvga3dBackContextDefine(PVGASTATECC pThisCC, uint32_t cid)3996 static DECLCALLBACK(int) vmsvga3dBackContextDefine(PVGASTATECC pThisCC, uint32_t cid) 3997 3997 { 3998 3998 return vmsvga3dContextDefineOgl(pThisCC, cid, 0/*fFlags*/); … … 4104 4104 * @param cid Context id 4105 4105 */ 4106 static intvmsvga3dBackContextDestroy(PVGASTATECC pThisCC, uint32_t cid)4106 static DECLCALLBACK(int) vmsvga3dBackContextDestroy(PVGASTATECC pThisCC, uint32_t cid) 4107 4107 { 4108 4108 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 4133 4133 4134 4134 /* Handle resize */ 4135 static intvmsvga3dBackChangeMode(PVGASTATECC pThisCC)4135 static DECLCALLBACK(int) vmsvga3dBackChangeMode(PVGASTATECC pThisCC) 4136 4136 { 4137 4137 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 4154 4154 4155 4155 4156 static intvmsvga3dBackSetTransform(PVGASTATECC pThisCC, uint32_t cid, SVGA3dTransformType type, float matrix[16])4156 static DECLCALLBACK(int) vmsvga3dBackSetTransform(PVGASTATECC pThisCC, uint32_t cid, SVGA3dTransformType type, float matrix[16]) 4157 4157 { 4158 4158 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 4260 4260 } 4261 4261 4262 static intvmsvga3dBackSetZRange(PVGASTATECC pThisCC, uint32_t cid, SVGA3dZRange zRange)4262 static DECLCALLBACK(int) vmsvga3dBackSetZRange(PVGASTATECC pThisCC, uint32_t cid, SVGA3dZRange zRange) 4263 4263 { 4264 4264 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 4398 4398 } 4399 4399 4400 static intvmsvga3dBackSetRenderState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cRenderStates, SVGA3dRenderState *pRenderState)4400 static DECLCALLBACK(int) vmsvga3dBackSetRenderState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cRenderStates, SVGA3dRenderState *pRenderState) 4401 4401 { 4402 4402 uint32_t val = UINT32_MAX; /* Shut up MSC. */ … … 5261 5261 } 5262 5262 5263 static intvmsvga3dBackSetRenderTarget(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRenderTargetType type, SVGA3dSurfaceImageId target)5263 static DECLCALLBACK(int) vmsvga3dBackSetRenderTarget(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRenderTargetType type, SVGA3dSurfaceImageId target) 5264 5264 { 5265 5265 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 5593 5593 } 5594 5594 5595 static intvmsvga3dBackSetTextureState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState)5595 static DECLCALLBACK(int) vmsvga3dBackSetTextureState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState) 5596 5596 { 5597 5597 GLenum val = ~(GLenum)0; /* Shut up MSC. */ … … 5927 5927 } 5928 5928 5929 static intvmsvga3dBackSetMaterial(PVGASTATECC pThisCC, uint32_t cid, SVGA3dFace face, SVGA3dMaterial *pMaterial)5929 static DECLCALLBACK(int) vmsvga3dBackSetMaterial(PVGASTATECC pThisCC, uint32_t cid, SVGA3dFace face, SVGA3dMaterial *pMaterial) 5930 5930 { 5931 5931 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 5976 5976 5977 5977 /** @todo Move into separate library as we are using logic from Wine here. */ 5978 static intvmsvga3dBackSetLightData(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData)5978 static DECLCALLBACK(int) vmsvga3dBackSetLightData(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData) 5979 5979 { 5980 5980 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 6149 6149 } 6150 6150 6151 static intvmsvga3dBackSetLightEnabled(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, uint32_t enabled)6151 static DECLCALLBACK(int) vmsvga3dBackSetLightEnabled(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, uint32_t enabled) 6152 6152 { 6153 6153 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 6185 6185 } 6186 6186 6187 static intvmsvga3dBackSetViewPort(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect)6187 static DECLCALLBACK(int) vmsvga3dBackSetViewPort(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect) 6188 6188 { 6189 6189 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 6226 6226 } 6227 6227 6228 static intvmsvga3dBackSetClipPlane(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, float plane[4])6228 static DECLCALLBACK(int) vmsvga3dBackSetClipPlane(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, float plane[4]) 6229 6229 { 6230 6230 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 6257 6257 } 6258 6258 6259 static intvmsvga3dBackSetScissorRect(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect)6259 static DECLCALLBACK(int) vmsvga3dBackSetScissorRect(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect) 6260 6260 { 6261 6261 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 6289 6289 } 6290 6290 6291 static intvmsvga3dBackCommandClear(PVGASTATECC pThisCC, uint32_t cid, SVGA3dClearFlag clearFlag, uint32_t color, float depth, uint32_t stencil,6291 static DECLCALLBACK(int) vmsvga3dBackCommandClear(PVGASTATECC pThisCC, uint32_t cid, SVGA3dClearFlag clearFlag, uint32_t color, float depth, uint32_t stencil, 6292 6292 uint32_t cRects, SVGA3dRect *pRect) 6293 6293 { … … 7035 7035 } 7036 7036 7037 static intvmsvga3dBackDrawPrimitives(PVGASTATECC pThisCC, uint32_t cid, uint32_t numVertexDecls, SVGA3dVertexDecl *pVertexDecl,7037 static DECLCALLBACK(int) vmsvga3dBackDrawPrimitives(PVGASTATECC pThisCC, uint32_t cid, uint32_t numVertexDecls, SVGA3dVertexDecl *pVertexDecl, 7038 7038 uint32_t numRanges, SVGA3dPrimitiveRange *pRange, uint32_t cVertexDivisor, 7039 7039 SVGA3dVertexDivisor *pVertexDivisor) … … 7351 7351 7352 7352 7353 static intvmsvga3dBackShaderDefine(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type, uint32_t cbData, uint32_t *pShaderData)7353 static DECLCALLBACK(int) vmsvga3dBackShaderDefine(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type, uint32_t cbData, uint32_t *pShaderData) 7354 7354 { 7355 7355 PVMSVGA3DSHADER pShader; … … 7459 7459 } 7460 7460 7461 static intvmsvga3dBackShaderDestroy(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type)7461 static DECLCALLBACK(int) vmsvga3dBackShaderDestroy(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type) 7462 7462 { 7463 7463 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 7508 7508 } 7509 7509 7510 static intvmsvga3dBackShaderSet(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t cid, SVGA3dShaderType type, uint32_t shid)7510 static DECLCALLBACK(int) vmsvga3dBackShaderSet(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t cid, SVGA3dShaderType type, uint32_t shid) 7511 7511 { 7512 7512 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 7579 7579 } 7580 7580 7581 static intvmsvga3dBackShaderSetConst(PVGASTATECC pThisCC, uint32_t cid, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, uint32_t cRegisters, uint32_t *pValues)7581 static DECLCALLBACK(int) vmsvga3dBackShaderSetConst(PVGASTATECC pThisCC, uint32_t cid, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, uint32_t cRegisters, uint32_t *pValues) 7582 7582 { 7583 7583 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 7671 7671 } 7672 7672 7673 static intvmsvga3dBackOcclusionQueryCreate(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)7673 static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryCreate(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext) 7674 7674 { 7675 7675 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 7685 7685 } 7686 7686 7687 static intvmsvga3dBackOcclusionQueryDelete(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)7687 static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryDelete(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext) 7688 7688 { 7689 7689 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 7698 7698 } 7699 7699 7700 static intvmsvga3dBackOcclusionQueryBegin(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)7700 static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryBegin(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext) 7701 7701 { 7702 7702 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 7709 7709 } 7710 7710 7711 static intvmsvga3dBackOcclusionQueryEnd(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)7711 static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryEnd(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext) 7712 7712 { 7713 7713 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState; … … 7720 7720 } 7721 7721 7722 static intvmsvga3dBackOcclusionQueryGetData(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t *pu32Pixels)7722 static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryGetData(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t *pu32Pixels) 7723 7723 { 7724 7724 PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
Note:
See TracChangeset
for help on using the changeset viewer.