VirtualBox

Ignore:
Timestamp:
Nov 9, 2020 11:16:50 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
141287
Message:

Devices/Graphics: A couple of new commands; a more generic handler for creating a surface; cleaned saved state data for a surface; increased saved state version; possibility to build DX11 backend. bugref:9830

File:
1 edited

Legend:

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

    r86024 r86838  
    291291        for (uint32_t iFace = 0; iFace < pSurface->cFaces; iFace++)
    292292        {
    293             Assert(pSurface->faces[iFace].numMipLevels <= pSurface->faces[0].numMipLevels);
    294             PVMSVGA3DMIPMAPLEVEL pMipmapLevel = &pSurface->paMipmapLevels[iFace * pSurface->faces[0].numMipLevels];
    295             for (uint32_t i = 0; i < pSurface->faces[iFace].numMipLevels; i++, pMipmapLevel++)
     293            PVMSVGA3DMIPMAPLEVEL pMipmapLevel = &pSurface->paMipmapLevels[iFace * pSurface->cLevels];
     294            for (uint32_t i = 0; i < pSurface->cLevels; i++, pMipmapLevel++)
    296295            {
    297296                if (VMSVGA3DSURFACE_HAS_HW_SURFACE(pSurface))
     
    498497                            AssertMsgFailed(("%#x\n", fSwitchFlags));
    499498                    }
     499#elif defined(VMSVGA3D_DX)
     500                    /** @todo */
     501                    RT_NOREF(pState);
    500502#else
    501503# error "misconfigured"
     
    15221524# ifdef VMSVGA3D_DIRECT3D
    15231525    pHlp->pfnPrintf(pHlp, "pDevice:                 %p\n", pContext->pDevice);
     1526# elif defined(VMSVGA3D_DX)
     1527    /** @todo */
    15241528# else
    15251529    pHlp->pfnPrintf(pHlp, "hdc:                     %p\n", pContext->hdc);
     
    19191923    const uint32_t u32Seq = ASMAtomicIncU32(&sSeq);
    19201924
    1921     for (uint32_t i = 0; i < pSurface->faces[0].numMipLevels; ++i)
     1925    for (uint32_t i = 0; i < pSurface->cLevels; ++i)
    19221926    {
    19231927        if (!pSurface->paMipmapLevels[i].pSurfaceData)
     
    19781982    vmsvga3dInfoU32Flags(pHlp, pSurface->surfaceFlags, "SVGA3D_SURFACE_", g_aSvga3DSurfaceFlags, RT_ELEMENTS(g_aSvga3DSurfaceFlags));
    19791983    pHlp->pfnPrintf(pHlp, "\n");
    1980     if (pSurface->cFaces == 0)
     1984    if (pSurface->cFaces != 0)
    19811985        pHlp->pfnPrintf(pHlp, "Faces:                   %u\n", pSurface->cFaces);
     1986    if (pSurface->cLevels != 0)
     1987        pHlp->pfnPrintf(pHlp, "Mipmap levels:  %u\n", pSurface->cLevels);
    19821988    for (uint32_t iFace = 0; iFace < pSurface->cFaces; iFace++)
    19831989    {
    1984         Assert(pSurface->faces[iFace].numMipLevels <= pSurface->faces[0].numMipLevels);
    1985         if (pSurface->faces[iFace].numMipLevels == 0)
    1986             pHlp->pfnPrintf(pHlp, "Faces[%u] Mipmap levels:  %u\n", iFace, pSurface->faces[iFace].numMipLevels);
    1987 
    1988         uint32_t iMipmap = iFace * pSurface->faces[0].numMipLevels;
    1989         for (uint32_t iLevel = 0; iLevel < pSurface->faces[iFace].numMipLevels; iLevel++, iMipmap++)
     1990        uint32_t iMipmap = iFace * pSurface->cLevels;
     1991        for (uint32_t iLevel = 0; iLevel < pSurface->cLevels; iLevel++, iMipmap++)
    19901992        {
    19911993            pHlp->pfnPrintf(pHlp, "Face #%u, mipmap #%u[%u]:%s  cx=%u, cy=%u, cz=%u, cbSurface=%#x, cbPitch=%#x",
     
    20302032    pHlp->pfnPrintf(pHlp, "fStencilAsTexture:       %RTbool\n", pSurface->fStencilAsTexture);
    20312033
     2034#elif defined(VMSVGA3D_DX)
     2035    /** @todo */
    20322036#elif defined(VMSVGA3D_OPENGL)
    20332037    /** @todo   */
     
    20392043        for (uint32_t iFace = 0; iFace < pSurface->cFaces; iFace++)
    20402044        {
    2041             uint32_t iMipmap = iFace * pSurface->faces[0].numMipLevels;
    2042             for (uint32_t iLevel = 0; iLevel < pSurface->faces[iFace].numMipLevels; iLevel++, iMipmap++)
     2045            uint32_t iMipmap = iFace * pSurface->cLevels;
     2046            for (uint32_t iLevel = 0; iLevel < pSurface->cLevels; iLevel++, iMipmap++)
    20432047                if (pSurface->paMipmapLevels[iMipmap].pSurfaceData)
    20442048                {
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