VirtualBox

Changeset 76635 in vbox for trunk


Ignore:
Timestamp:
Jan 4, 2019 1:57:30 PM (6 years ago)
Author:
vboxsync
Message:

DevVGA-SVGA.cpp: fixed VMSVGA saved state with 3D disabled

File:
1 edited

Legend:

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

    r76553 r76635  
    28542854            vmsvgaSaveExecFifo(pThis, pSSM);
    28552855# ifdef VBOX_WITH_VMSVGA3D
    2856             vmsvga3dSaveExec(pThis, pSSM);
     2856            if (pThis->svga.f3DEnabled)
     2857                vmsvga3dSaveExec(pThis, pSSM);
    28572858# endif
    28582859            break;
     
    28662867            vmsvgaLoadExecFifo(pThis, pLoadState->pSSM, pLoadState->uVersion, pLoadState->uPass);
    28672868# ifdef VBOX_WITH_VMSVGA3D
    2868             vmsvga3dLoadExec(pThis, pLoadState->pSSM, pLoadState->uVersion, pLoadState->uPass);
     2869            if (pThis->svga.f3DEnabled)
     2870                vmsvga3dLoadExec(pThis, pLoadState->pSSM, pLoadState->uVersion, pLoadState->uPass);
    28692871# endif
    28702872            break;
     
    53675369    }
    53685370
    5369 # ifdef VBOX_WITH_VMSVGA3D
    5370     if (pThis->svga.f3DEnabled)
    5371     {
    53725371#  ifdef RT_OS_DARWIN  /** @todo r=bird: this is normally done on the EMT, so for DARWIN we do that when loading saved state too now. See DevVGA-SVGA3d-shared.h. */
    5373         vmsvga3dPowerOn(pThis);
     5372    vmsvga3dPowerOn(pThis);
    53745373#  endif
    53755374
    5376         VMSVGA_STATE_LOAD LoadState;
    5377         LoadState.pSSM     = pSSM;
    5378         LoadState.uVersion = uVersion;
    5379         LoadState.uPass    = uPass;
    5380         rc = vmsvgaR3RunExtCmdOnFifoThread(pThis, VMSVGA_FIFO_EXTCMD_LOADSTATE, &LoadState, RT_INDEFINITE_WAIT);
    5381         AssertLogRelRCReturn(rc, rc);
    5382     }
    5383 # endif
     5375    VMSVGA_STATE_LOAD LoadState;
     5376    LoadState.pSSM     = pSSM;
     5377    LoadState.uVersion = uVersion;
     5378    LoadState.uPass    = uPass;
     5379    rc = vmsvgaR3RunExtCmdOnFifoThread(pThis, VMSVGA_FIFO_EXTCMD_LOADSTATE, &LoadState, RT_INDEFINITE_WAIT);
     5380    AssertLogRelRCReturn(rc, rc);
    53845381
    53855382    return VINF_SUCCESS;
     
    54905487    }
    54915488
    5492 # ifdef VBOX_WITH_VMSVGA3D
    54935489    /*
    5494      * Must save the 3d state in the FIFO thread.
     5490     * Must save the some state (3D in particular) in the FIFO thread.
    54955491     */
    5496     if (pThis->svga.f3DEnabled)
    5497     {
    5498         rc = vmsvgaR3RunExtCmdOnFifoThread(pThis, VMSVGA_FIFO_EXTCMD_SAVESTATE, pSSM, RT_INDEFINITE_WAIT);
    5499         AssertLogRelRCReturn(rc, rc);
    5500     }
    5501 # endif
     5492    rc = vmsvgaR3RunExtCmdOnFifoThread(pThis, VMSVGA_FIFO_EXTCMD_SAVESTATE, pSSM, RT_INDEFINITE_WAIT);
     5493    AssertLogRelRCReturn(rc, rc);
     5494
    55025495    return VINF_SUCCESS;
    55035496}
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