VirtualBox

Ignore:
Timestamp:
May 17, 2021 8:16:19 PM (4 years ago)
Author:
vboxsync
Message:

Devices/Graphics: Function tables for 3D backends (build fix). bugref:9830

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp

    r89121 r89123  
    170170*********************************************************************************************************************************/
    171171static int  vmsvga3dContextDestroyOgl(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t cid);
    172 static int vmsvga3dBackContextDestroy(PVGASTATECC pThisCC, uint32_t cid);
     172static DECLCALLBACK(int) vmsvga3dBackContextDestroy(PVGASTATECC pThisCC, uint32_t cid);
    173173static void vmsvgaColor2GLFloatArray(uint32_t color, GLfloat *pRed, GLfloat *pGreen, GLfloat *pBlue, GLfloat *pAlpha);
    174 static int vmsvga3dBackSetLightData(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData);
    175 static int vmsvga3dBackSetClipPlane(PVGASTATECC pThisCC, uint32_t cid,  uint32_t index, float plane[4]);
    176 static int vmsvga3dBackShaderDestroy(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type);
    177 static int vmsvga3dBackOcclusionQueryDelete(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext);
    178 static int vmsvga3dBackCreateTexture(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t idAssociatedContext, PVMSVGA3DSURFACE pSurface);
     174static DECLCALLBACK(int) vmsvga3dBackSetLightData(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData);
     175static DECLCALLBACK(int) vmsvga3dBackSetClipPlane(PVGASTATECC pThisCC, uint32_t cid,  uint32_t index, float plane[4]);
     176static DECLCALLBACK(int) vmsvga3dBackShaderDestroy(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type);
     177static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryDelete(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext);
     178static DECLCALLBACK(int) vmsvga3dBackCreateTexture(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t idAssociatedContext, PVMSVGA3DSURFACE pSurface);
    179179
    180180/* Generated by VBoxDef2LazyLoad from the VBoxSVGA3D.def and VBoxSVGA3DObjC.def files. */
     
    595595 * @param   pThisCC     The VGA/VMSVGA state for ring-3.
    596596 */
    597 static int vmsvga3dBackInit(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC)
     597static DECLCALLBACK(int) vmsvga3dBackInit(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC)
    598598{
    599599    int rc;
     
    828828
    829829/* We must delay window creation until the PowerOn phase. Init is too early and will cause failures. */
    830 static int vmsvga3dBackPowerOn(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC)
     830static DECLCALLBACK(int) vmsvga3dBackPowerOn(PPDMDEVINS pDevIns, PVGASTATE pThis, PVGASTATECC pThisCC)
    831831{
    832832    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    11501150}
    11511151
    1152 static int vmsvga3dBackReset(PVGASTATECC pThisCC)
     1152static DECLCALLBACK(int) vmsvga3dBackReset(PVGASTATECC pThisCC)
    11531153{
    11541154    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    11751175}
    11761176
    1177 static int vmsvga3dBackTerminate(PVGASTATECC pThisCC)
     1177static DECLCALLBACK(int) vmsvga3dBackTerminate(PVGASTATECC pThisCC)
    11781178{
    11791179    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    12161216
    12171217
    1218 static void vmsvga3dBackUpdateHostScreenViewport(PVGASTATECC pThisCC, uint32_t idScreen, VMSVGAVIEWPORT const *pOldViewport)
     1218static DECLCALLBACK(void) vmsvga3dBackUpdateHostScreenViewport(PVGASTATECC pThisCC, uint32_t idScreen, VMSVGAVIEWPORT const *pOldViewport)
    12191219{
    12201220    /** @todo Move the visible framebuffer content here, don't wait for the guest to
     
    13811381
    13821382
    1383 static int vmsvga3dBackQueryCaps(PVGASTATECC pThisCC, SVGA3dDevCapIndex idx3dCaps, uint32_t *pu32Val)
     1383static DECLCALLBACK(int) vmsvga3dBackQueryCaps(PVGASTATECC pThisCC, SVGA3dDevCapIndex idx3dCaps, uint32_t *pu32Val)
    13841384{
    13851385    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    20042004 * @param   pSurface            The surface being destroyed.
    20052005 */
    2006 static void vmsvga3dBackSurfaceDestroy(PVGASTATECC pThisCC, PVMSVGA3DSURFACE pSurface)
     2006static DECLCALLBACK(void) vmsvga3dBackSurfaceDestroy(PVGASTATECC pThisCC, PVMSVGA3DSURFACE pSurface)
    20072007{
    20082008    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    20532053
    20542054
    2055 static int vmsvga3dBackSurfaceCopy(PVGASTATECC pThisCC, SVGA3dSurfaceImageId dest, SVGA3dSurfaceImageId src,
     2055static DECLCALLBACK(int) vmsvga3dBackSurfaceCopy(PVGASTATECC pThisCC, SVGA3dSurfaceImageId dest, SVGA3dSurfaceImageId src,
    20562056                                   uint32_t cCopyBoxes, SVGA3dCopyBox *pBox)
    20572057{
     
    23672367 * @param   pSurface            The surface to create the texture for.
    23682368 */
    2369 static int vmsvga3dBackCreateTexture(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t idAssociatedContext,
     2369static DECLCALLBACK(int) vmsvga3dBackCreateTexture(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t idAssociatedContext,
    23702370                              PVMSVGA3DSURFACE pSurface)
    23712371{
     
    26602660 * @param   pContext            The VMSVGA3d context (already current for OGL).
    26612661 */
    2662 static int vmsvga3dBackSurfaceStretchBlt(PVGASTATE pThis, PVMSVGA3DSTATE pState,
     2662static DECLCALLBACK(int) vmsvga3dBackSurfaceStretchBlt(PVGASTATE pThis, PVMSVGA3DSTATE pState,
    26632663                                  PVMSVGA3DSURFACE pDstSurface, uint32_t uDstFace, uint32_t uDstMipmap, SVGA3dBox const *pDstBox,
    26642664                                  PVMSVGA3DSURFACE pSrcSurface, uint32_t uSrcFace, uint32_t uSrcMipmap, SVGA3dBox const *pSrcBox,
     
    28632863 * @param   iBox                The current box number (for Direct 3D).
    28642864 */
    2865 static int vmsvga3dBackSurfaceDMACopyBox(PVGASTATE pThis, PVGASTATECC pThisCC, PVMSVGA3DSTATE pState, PVMSVGA3DSURFACE pSurface,
     2865static DECLCALLBACK(int) vmsvga3dBackSurfaceDMACopyBox(PVGASTATE pThis, PVGASTATECC pThisCC, PVMSVGA3DSTATE pState, PVMSVGA3DSURFACE pSurface,
    28662866                                  PVMSVGA3DMIPMAPLEVEL pMipLevel, uint32_t uHostFace, uint32_t uHostMipmap,
    28672867                                  SVGAGuestPtr GuestPtr, uint32_t cbGuestPitch, SVGA3dTransferType transfer,
     
    31493149}
    31503150
    3151 static int vmsvga3dBackGenerateMipmaps(PVGASTATECC pThisCC, uint32_t sid, SVGA3dTextureFilter filter)
     3151static DECLCALLBACK(int) vmsvga3dBackGenerateMipmaps(PVGASTATECC pThisCC, uint32_t sid, SVGA3dTextureFilter filter)
    31523152{
    31533153    PVMSVGA3DSTATE      pState = pThisCC->svga.p3dState;
     
    37413741    } while(0)
    37423742
    3743 static int vmsvga3dBackDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)
     3743static DECLCALLBACK(int) vmsvga3dBackDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)
    37443744{
    37453745    LogRel4(("VMSVGA: vmsvga3dBackDefineScreen: screen %u\n", pScreen->idScreen));
     
    38473847}
    38483848
    3849 static int vmsvga3dBackDestroyScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)
     3849static DECLCALLBACK(int) vmsvga3dBackDestroyScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)
    38503850{
    38513851    LogRel4(("VMSVGA: vmsvga3dBackDestroyScreen: screen %u\n", pScreen->idScreen));
     
    38733873
    38743874/* Blit a surface to the GLX pixmap. */
    3875 static int vmsvga3dBackSurfaceBlitToScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen,
     3875static DECLCALLBACK(int) vmsvga3dBackSurfaceBlitToScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen,
    38763876                                    SVGASignedRect destRect, SVGA3dSurfaceImageId srcImage,
    38773877                                    SVGASignedRect srcRect, uint32_t cRects, SVGASignedRect *paRects)
     
    39663966#else /* !RT_OS_LINUX */
    39673967
    3968 static int vmsvga3dBackDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)
     3968static DECLCALLBACK(int) vmsvga3dBackDefineScreen(PVGASTATE pThis, PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)
    39693969{
    39703970    RT_NOREF(pThis, pThisCC, pScreen);
     
    39723972}
    39733973
    3974 static int vmsvga3dBackDestroyScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)
     3974static DECLCALLBACK(int) vmsvga3dBackDestroyScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen)
    39753975{
    39763976    RT_NOREF(pThisCC, pScreen);
     
    39783978}
    39793979
    3980 static int vmsvga3dBackSurfaceBlitToScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen,
     3980static DECLCALLBACK(int) vmsvga3dBackSurfaceBlitToScreen(PVGASTATECC pThisCC, VMSVGASCREENOBJECT *pScreen,
    39813981                                    SVGASignedRect destRect, SVGA3dSurfaceImageId srcImage,
    39823982                                    SVGASignedRect srcRect, uint32_t cRects, SVGASignedRect *paRects)
     
    39943994 * @param   cid             Context id
    39953995 */
    3996 static int vmsvga3dBackContextDefine(PVGASTATECC pThisCC, uint32_t cid)
     3996static DECLCALLBACK(int) vmsvga3dBackContextDefine(PVGASTATECC pThisCC, uint32_t cid)
    39973997{
    39983998    return vmsvga3dContextDefineOgl(pThisCC, cid, 0/*fFlags*/);
     
    41044104 * @param   cid             Context id
    41054105 */
    4106 static int vmsvga3dBackContextDestroy(PVGASTATECC pThisCC, uint32_t cid)
     4106static DECLCALLBACK(int) vmsvga3dBackContextDestroy(PVGASTATECC pThisCC, uint32_t cid)
    41074107{
    41084108    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    41334133
    41344134/* Handle resize */
    4135 static int vmsvga3dBackChangeMode(PVGASTATECC pThisCC)
     4135static DECLCALLBACK(int) vmsvga3dBackChangeMode(PVGASTATECC pThisCC)
    41364136{
    41374137    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    41544154
    41554155
    4156 static int vmsvga3dBackSetTransform(PVGASTATECC pThisCC, uint32_t cid, SVGA3dTransformType type, float matrix[16])
     4156static DECLCALLBACK(int) vmsvga3dBackSetTransform(PVGASTATECC pThisCC, uint32_t cid, SVGA3dTransformType type, float matrix[16])
    41574157{
    41584158    PVMSVGA3DSTATE        pState = pThisCC->svga.p3dState;
     
    42604260}
    42614261
    4262 static int vmsvga3dBackSetZRange(PVGASTATECC pThisCC, uint32_t cid, SVGA3dZRange zRange)
     4262static DECLCALLBACK(int) vmsvga3dBackSetZRange(PVGASTATECC pThisCC, uint32_t cid, SVGA3dZRange zRange)
    42634263{
    42644264    PVMSVGA3DSTATE        pState = pThisCC->svga.p3dState;
     
    43984398}
    43994399
    4400 static int vmsvga3dBackSetRenderState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cRenderStates, SVGA3dRenderState *pRenderState)
     4400static DECLCALLBACK(int) vmsvga3dBackSetRenderState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cRenderStates, SVGA3dRenderState *pRenderState)
    44014401{
    44024402    uint32_t                    val = UINT32_MAX; /* Shut up MSC. */
     
    52615261}
    52625262
    5263 static int vmsvga3dBackSetRenderTarget(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRenderTargetType type, SVGA3dSurfaceImageId target)
     5263static DECLCALLBACK(int) vmsvga3dBackSetRenderTarget(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRenderTargetType type, SVGA3dSurfaceImageId target)
    52645264{
    52655265    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    55935593}
    55945594
    5595 static int vmsvga3dBackSetTextureState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState)
     5595static DECLCALLBACK(int) vmsvga3dBackSetTextureState(PVGASTATECC pThisCC, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState)
    55965596{
    55975597    GLenum                      val = ~(GLenum)0; /* Shut up MSC. */
     
    59275927}
    59285928
    5929 static int vmsvga3dBackSetMaterial(PVGASTATECC pThisCC, uint32_t cid, SVGA3dFace face, SVGA3dMaterial *pMaterial)
     5929static DECLCALLBACK(int) vmsvga3dBackSetMaterial(PVGASTATECC pThisCC, uint32_t cid, SVGA3dFace face, SVGA3dMaterial *pMaterial)
    59305930{
    59315931    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    59765976
    59775977/** @todo Move into separate library as we are using logic from Wine here. */
    5978 static int vmsvga3dBackSetLightData(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData)
     5978static DECLCALLBACK(int) vmsvga3dBackSetLightData(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, SVGA3dLightData *pData)
    59795979{
    59805980    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    61496149}
    61506150
    6151 static int vmsvga3dBackSetLightEnabled(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, uint32_t enabled)
     6151static DECLCALLBACK(int) vmsvga3dBackSetLightEnabled(PVGASTATECC pThisCC, uint32_t cid, uint32_t index, uint32_t enabled)
    61526152{
    61536153    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    61856185}
    61866186
    6187 static int vmsvga3dBackSetViewPort(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect)
     6187static DECLCALLBACK(int) vmsvga3dBackSetViewPort(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect)
    61886188{
    61896189    PVMSVGA3DSTATE        pState = pThisCC->svga.p3dState;
     
    62266226}
    62276227
    6228 static int vmsvga3dBackSetClipPlane(PVGASTATECC pThisCC, uint32_t cid,  uint32_t index, float plane[4])
     6228static DECLCALLBACK(int) vmsvga3dBackSetClipPlane(PVGASTATECC pThisCC, uint32_t cid,  uint32_t index, float plane[4])
    62296229{
    62306230    PVMSVGA3DSTATE        pState = pThisCC->svga.p3dState;
     
    62576257}
    62586258
    6259 static int vmsvga3dBackSetScissorRect(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect)
     6259static DECLCALLBACK(int) vmsvga3dBackSetScissorRect(PVGASTATECC pThisCC, uint32_t cid, SVGA3dRect *pRect)
    62606260{
    62616261    PVMSVGA3DSTATE        pState = pThisCC->svga.p3dState;
     
    62896289}
    62906290
    6291 static int vmsvga3dBackCommandClear(PVGASTATECC pThisCC, uint32_t cid, SVGA3dClearFlag clearFlag, uint32_t color, float depth, uint32_t stencil,
     6291static DECLCALLBACK(int) vmsvga3dBackCommandClear(PVGASTATECC pThisCC, uint32_t cid, SVGA3dClearFlag clearFlag, uint32_t color, float depth, uint32_t stencil,
    62926292                                    uint32_t cRects, SVGA3dRect *pRect)
    62936293{
     
    70357035}
    70367036
    7037 static int vmsvga3dBackDrawPrimitives(PVGASTATECC pThisCC, uint32_t cid, uint32_t numVertexDecls, SVGA3dVertexDecl *pVertexDecl,
     7037static DECLCALLBACK(int) vmsvga3dBackDrawPrimitives(PVGASTATECC pThisCC, uint32_t cid, uint32_t numVertexDecls, SVGA3dVertexDecl *pVertexDecl,
    70387038                           uint32_t numRanges, SVGA3dPrimitiveRange *pRange, uint32_t cVertexDivisor,
    70397039                           SVGA3dVertexDivisor *pVertexDivisor)
     
    73517351
    73527352
    7353 static int vmsvga3dBackShaderDefine(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type, uint32_t cbData, uint32_t *pShaderData)
     7353static DECLCALLBACK(int) vmsvga3dBackShaderDefine(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type, uint32_t cbData, uint32_t *pShaderData)
    73547354{
    73557355    PVMSVGA3DSHADER       pShader;
     
    74597459}
    74607460
    7461 static int vmsvga3dBackShaderDestroy(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type)
     7461static DECLCALLBACK(int) vmsvga3dBackShaderDestroy(PVGASTATECC pThisCC, uint32_t cid, uint32_t shid, SVGA3dShaderType type)
    74627462{
    74637463    PVMSVGA3DSTATE        pState = pThisCC->svga.p3dState;
     
    75087508}
    75097509
    7510 static int vmsvga3dBackShaderSet(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t cid, SVGA3dShaderType type, uint32_t shid)
     7510static DECLCALLBACK(int) vmsvga3dBackShaderSet(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t cid, SVGA3dShaderType type, uint32_t shid)
    75117511{
    75127512    PVMSVGA3DSTATE      pState = pThisCC->svga.p3dState;
     
    75797579}
    75807580
    7581 static int vmsvga3dBackShaderSetConst(PVGASTATECC pThisCC, uint32_t cid, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, uint32_t cRegisters, uint32_t *pValues)
     7581static DECLCALLBACK(int) vmsvga3dBackShaderSetConst(PVGASTATECC pThisCC, uint32_t cid, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, uint32_t cRegisters, uint32_t *pValues)
    75827582{
    75837583    PVMSVGA3DSTATE        pState = pThisCC->svga.p3dState;
     
    76717671}
    76727672
    7673 static int vmsvga3dBackOcclusionQueryCreate(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)
     7673static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryCreate(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)
    76747674{
    76757675    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    76857685}
    76867686
    7687 static int vmsvga3dBackOcclusionQueryDelete(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)
     7687static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryDelete(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)
    76887688{
    76897689    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    76987698}
    76997699
    7700 static int vmsvga3dBackOcclusionQueryBegin(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)
     7700static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryBegin(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)
    77017701{
    77027702    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    77097709}
    77107710
    7711 static int vmsvga3dBackOcclusionQueryEnd(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)
     7711static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryEnd(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext)
    77127712{
    77137713    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
     
    77207720}
    77217721
    7722 static int vmsvga3dBackOcclusionQueryGetData(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t *pu32Pixels)
     7722static DECLCALLBACK(int) vmsvga3dBackOcclusionQueryGetData(PVGASTATECC pThisCC, PVMSVGA3DCONTEXT pContext, uint32_t *pu32Pixels)
    77237723{
    77247724    PVMSVGA3DSTATE pState = pThisCC->svga.p3dState;
Note: See TracChangeset for help on using the changeset viewer.

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