VirtualBox

Ignore:
Timestamp:
May 22, 2014 11:42:21 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93835
Message:

crOpenGL: saved state fixes, misc fixes

Location:
trunk/src/VBox/HostServices/SharedOpenGL
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp

    r51335 r51349  
    49204920    int rc;
    49214921    int cDisplays = 0, i;
     4922
    49224923    for (i = 0; i < cr_server.screenCount; ++i)
    49234924    {
     
    49684969            AssertRCReturn(rc, rc);
    49694970
    4970             rc = SSMR3PutU32(pSSM, 0xffffffff);
    4971             AssertRCReturn(rc, rc);
    4972 
    4973             rc = CrFbSaveState(hFb, pSSM);
     4971            rc = SSMR3PutU32(pSSM, hFb->ScreenInfo.u32StartOffset);
    49744972            AssertRCReturn(rc, rc);
    49754973
    49764974            CR_FB_INFO *pFbInfo = &g_CrPresenter.aFbInfos[hFb->ScreenInfo.u32ViewIndex];
    49774975            rc = SSMR3PutMem(pSSM, pFbInfo->aTargetMap, sizeof (pFbInfo->aTargetMap));
     4976            AssertRCReturn(rc, rc);
     4977
     4978            rc = CrFbSaveState(hFb, pSSM);
    49784979            AssertRCReturn(rc, rc);
    49794980        }
     
    51545155            AssertRCReturn(rc, rc);
    51555156
    5156             uint32_t offVram = 0;
    5157             rc = SSMR3GetU32(pSSM, &offVram);
     5157            rc = SSMR3GetU32(pSSM, &Screen.u32StartOffset);
    51585158            AssertRCReturn(rc, rc);
    5159             if (offVram != 0xffffffff)
     5159            if (Screen.u32StartOffset == 0xffffffff)
    51605160            {
    51615161                WARN(("not expected offVram"));
    5162                 Screen.u32StartOffset = offVram;
     5162                Screen.u32StartOffset = 0;
    51635163            }
    51645164
    5165             rc = CrFbLoadState(pFb, pSSM, version);
    5166             AssertRCReturn(rc, rc);
    5167 
    5168             if (version >= SHCROGL_SSM_VERSION_WITH_SCREEN_MAP)
     5165            if (version >= SHCROGL_SSM_VERSION_WITH_SCREEN_MAP_REORDERED)
    51695166            {
    51705167                rc = SSMR3GetMem(pSSM, aTargetMap, sizeof (aTargetMap));
    51715168                AssertRCReturn(rc, rc);
    51725169            }
     5170
     5171            if (version == SHCROGL_SSM_VERSION_WITH_SCREEN_MAP)
     5172            {
     5173                VBOXCMDVBVA_SCREENMAP_DECL(uint32_t, aEmptyTargetMap);
     5174
     5175                memset(aEmptyTargetMap, 0, sizeof (aEmptyTargetMap));
     5176
     5177                rc = CrPMgrResize(&Screen, cr_server.fCrCmdEnabled ? NULL : CrFbGetVRAM(pFb), aEmptyTargetMap);
     5178                AssertRCReturn(rc, rc);
     5179
     5180                rc = CrFbLoadState(pFb, pSSM, version);
     5181                AssertRCReturn(rc, rc);
     5182
     5183                rc = SSMR3GetMem(pSSM, aTargetMap, sizeof (aTargetMap));
     5184                AssertRCReturn(rc, rc);
     5185            }
    51735186        }
    51745187
    51755188        rc = CrPMgrResize(&Screen, cr_server.fCrCmdEnabled ? NULL : CrFbGetVRAM(pFb), aTargetMap);
    51765189        AssertRCReturn(rc, rc);
     5190
     5191        if (version >= SHCROGL_SSM_VERSION_WITH_FB_INFO && version != SHCROGL_SSM_VERSION_WITH_SCREEN_MAP)
     5192        {
     5193            rc = CrFbLoadState(pFb, pSSM, version);
     5194            AssertRCReturn(rc, rc);
     5195        }
    51775196    }
    51785197
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c

    r51082 r51349  
    946946}
    947947
    948 PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData )
    949 {
    950     PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGet(window);
     948PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData, bool fRedraw )
     949{
     950    PCR_BLITTER pBlitter = fRedraw ? window->pBlitter : renderspuVBoxPresentBlitterGet(window);
    951951    if (pBlitter)
    952952    {
     
    10011001}
    10021002
    1003 void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData )
    1004 {
    1005     PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGetAndEnter(window, i32MakeCurrentUserData);
     1003void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor,
     1004        const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData,
     1005        bool fRedraw )
     1006{
     1007    PCR_BLITTER pBlitter = renderspuVBoxPresentBlitterGetAndEnter(window, i32MakeCurrentUserData, fRedraw);
    10061008    if (!pBlitter)
    10071009        return;
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.h

    r51064 r51349  
    418418extern int renderspuVBoxCompositorTryAcquire(WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR **ppCompositor);
    419419extern void renderspuVBoxCompositorRelease( WindowInfo *window);
    420 extern void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData );
     420extern void renderspuVBoxPresentCompositionGeneric( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor,
     421        const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry, int32_t i32MakeCurrentUserData,
     422        bool fRedraw);
    421423extern PCR_BLITTER renderspuVBoxPresentBlitterGet( WindowInfo *window );
    422424void renderspuVBoxPresentBlitterCleanup( WindowInfo *window );
    423425extern int renderspuVBoxPresentBlitterEnter( PCR_BLITTER pBlitter, int32_t i32MakeCurrentUserData );
    424 extern PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData );
     426extern PCR_BLITTER renderspuVBoxPresentBlitterGetAndEnter( WindowInfo *window, int32_t i32MakeCurrentUserData, bool fRedraw );
    425427extern PCR_BLITTER renderspuVBoxPresentBlitterEnsureCreated( WindowInfo *window, int32_t i32MakeCurrentUserData );
    426428void renderspuWindowTermBase( WindowInfo *window );
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_agl.c

    r50095 r51349  
    610610void renderspu_SystemVBoxPresentComposition( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry )
    611611{
    612     renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0);
     612    renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0, false);
    613613}
    614614
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_glx.c

    r51064 r51349  
    584584                        if (pCompositor)
    585585                        {
    586                             renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL, 0);
     586                            renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL, 0, true);
    587587                            renderspuVBoxCompositorRelease(pWindow);
    588588                        }
     
    19811981    if (RT_SUCCESS(rc))
    19821982    {
    1983         renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0);
     1983        renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0, false);
    19841984        renderspuVBoxCompositorRelease(window);
    19851985    }
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c

    r50626 r51349  
    446446                        pWindow->redraw_device_context = hDC;
    447447
    448                         renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL, 1);
     448                        renderspuVBoxPresentCompositionGeneric(pWindow, pCompositor, NULL, 1, true);
    449449
    450450                        bRc = EndPaint(pWindow->hWnd, &Paint);
     
    12951295    if (RT_SUCCESS(rc))
    12961296    {
    1297         renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0);
     1297        renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0, false);
    12981298        renderspuVBoxCompositorRelease(window);
    12991299    }
Note: See TracChangeset for help on using the changeset viewer.

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