VirtualBox

Changeset 84841 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 16, 2020 12:23:56 AM (5 years ago)
Author:
vboxsync
Message:

DevVGA-SVGA3d-win.cpp: More assertions. bugref:8489

File:
1 edited

Legend:

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

    r84742 r84841  
    12721272            int rc = vmsvga3dContextFromCid(pState, pSurface->idAssociatedContext, &pAssociatedContext);
    12731273            if (RT_SUCCESS(rc))
     1274                AssertStmt(pAssociatedContext->pDevice, rc = VERR_INTERNAL_ERROR);
     1275            if (RT_SUCCESS(rc))
    12741276            {
    12751277                IDirect3DQuery9 *pQuery;
     
    15111513        rc = vmsvga3dContextFromCid(pState, cidSrc, &pContextSrc);
    15121514        AssertRCReturn(rc, rc);
     1515        AssertReturn(pContextSrc->pDevice, VERR_INTERNAL_ERROR);
    15131516
    15141517        LogFunc(("sid=%u type=%x format=%d -> create dest texture\n", sidDest, pSurfaceDest->surfaceFlags, pSurfaceDest->format));
     
    15321535        rc = vmsvga3dContextFromCid(pState, cidSrc, &pContextSrc);
    15331536        AssertRCReturn(rc, rc);
     1537        AssertReturn(pContextSrc->pDevice, VERR_INTERNAL_ERROR);
    15341538
    15351539        /* Must flush the other context's 3d pipeline to make sure all drawing is complete for the surface we're about to use. */
     
    16831687            rc = vmsvga3dContextFromCid(pState, pSurfaceSrc->idAssociatedContext, &pContext);
    16841688            AssertRCReturn(rc, rc);
     1689            AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    16851690
    16861691            rc = vmsvga3dGetD3DSurface(pState, pContext, pSurfaceSrc, src.face, src.mipmap, true, &pD3DSurf);
     
    16931698            rc = vmsvga3dContextFromCid(pState, pSurfaceDest->idAssociatedContext, &pContext);
    16941699            AssertRCReturn(rc, rc);
     1700            AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    16951701
    16961702            rc = vmsvga3dGetD3DSurface(pState, pContext, pSurfaceDest, dest.face, dest.mipmap, true, &pD3DSurf);
     
    23522358        rc = vmsvga3dContextFromCid(pState, pSurface->idAssociatedContext, &pContext);
    23532359        AssertRCReturn(rc, rc);
     2360        AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    23542361
    23552362        /* Get the surface involved in the transfer. */
     
    25222529        rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    25232530        AssertRCReturn(rc, rc);
     2531        AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    25242532
    25252533        /* Unknown surface type; turn it into a texture. */
     
    30923100    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    30933101    AssertRCReturn(rc, rc);
     3102    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    30943103
    30953104    switch (type)
     
    31693178    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    31703179    AssertRCReturn(rc, rc);
     3180    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    31713181
    31723182    pContext->state.zRange = zRange;
     
    32413251    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    32423252    AssertRCReturn(rc, rc);
     3253    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    32433254
    32443255    for (unsigned i = 0; i < cRenderStates; i++)
     
    39133924    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    39143925    AssertRCReturn(rc, rc);
     3926    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    39153927
    39163928    /* Save for vm state save/restore. */
     
    43374349    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    43384350    AssertRCReturn(rc, rc);
     4351    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    43394352
    43404353    for (unsigned i = 0; i < cTextureStates; i++)
     
    46264639    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    46274640    AssertRCReturn(rc, rc);
     4641    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    46284642
    46294643    AssertReturn((unsigned)face < SVGA3D_FACE_MAX, VERR_INVALID_PARAMETER);
     
    46784692    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    46794693    AssertRCReturn(rc, rc);
     4694    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    46804695
    46814696    switch (pData->type)
     
    47474762    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    47484763    AssertRCReturn(rc, rc);
     4764    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    47494765
    47504766    /* Store for vm state save/restore */
     
    47694785    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    47704786    AssertRCReturn(rc, rc);
     4787    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    47714788
    47724789    /* Save for vm state save/restore. */
     
    48014818    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    48024819    AssertRCReturn(rc, rc);
     4820    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    48034821
    48044822    /* Store for vm state save/restore. */
     
    48334851    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    48344852    AssertRCReturn(rc, rc);
     4853    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    48354854
    48364855    PVMSVGA3DSURFACE pRT;
     
    51005119    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    51015120    AssertRCReturn(rc, rc);
     5121    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    51025122
    51035123    HRESULT hr;
     
    54175437    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    54185438    AssertRCReturn(rc, rc);
     5439    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    54195440
    54205441    /* Store for vm state save/restore. */
     
    54475468    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    54485469    AssertRCReturn(rc, rc);
     5470    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    54495471
    54505472    AssertReturn(shid < SVGA3D_MAX_SHADER_IDS, VERR_INVALID_PARAMETER);
     
    55995621    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    56005622    AssertRCReturn(rc, rc);
     5623    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    56015624
    56025625    if (type == SVGA3D_SHADERTYPE_VS)
     
    56675690    int rc = vmsvga3dContextFromCid(pState, cid, &pContext);
    56685691    AssertRCReturn(rc, rc);
     5692    AssertReturn(pContext->pDevice, VERR_INTERNAL_ERROR);
    56695693
    56705694    for (uint32_t i = 0; i < cRegisters; i++)
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