VirtualBox

Ignore:
Timestamp:
Nov 18, 2010 9:47:50 PM (14 years ago)
Author:
vboxsync
Message:

wddm/3d: saved state working for Aero (current frame still needs to be saved)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp

    r34182 r34188  
    8383    PHGSMIINSTANCE pHgsmi;
    8484    PVGASTATE pVGAState;
    85     bool bEnabled;
    8685#ifdef VBOX_VDMA_WITH_WORKERTHREAD
    8786    VBOXVDMAPIPE Pipe;
     
    203202}
    204203
    205 static int vboxVDMACrCtlHgsmiSetupAsync(struct VBOXVDMAHOST *pVdma)
     204static int vboxVDMACrCtlHgsmiSetup(struct VBOXVDMAHOST *pVdma)
    206205{
    207206    PVBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP pCmd = (PVBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP)vboxVDMACrCtlCreate(
     
    211210        PVGASTATE pVGAState = pVdma->pVGAState;
    212211        pCmd->pvRamBase = pVGAState->vram_ptrR3;
    213         int rc = vboxVDMACrCtlPostAsync(pVGAState, &pCmd->Hdr, vboxVDMACrCtlCbReleaseCmd, NULL);
    214 #ifdef DEBUG_misha
     212        int rc = vboxVDMACrCtlPost(pVGAState, &pCmd->Hdr);
    215213        AssertRC(rc);
    216 #endif
    217 #if 0
    218214        if (RT_SUCCESS(rc))
    219215        {
     
    221217        }
    222218        vboxVDMACrCtlRelease(&pCmd->Hdr);
    223 #endif
    224219        return rc;
    225220    }
     
    10721067#endif
    10731068
    1074 int vboxVDMAConstruct(PVGASTATE pVGAState, struct VBOXVDMAHOST **ppVdma, uint32_t cPipeElements)
     1069int vboxVDMAConstruct(PVGASTATE pVGAState, uint32_t cPipeElements)
    10751070{
    10761071    int rc;
     
    11081103# endif
    11091104#endif
    1110                 *ppVdma = pVdma;
     1105                pVGAState->pVdma = pVdma;
     1106#ifdef VBOX_WITH_CRHGSMI
     1107                rc = vboxVDMACrCtlHgsmiSetup(pVdma);
     1108# ifdef DEBUG_misha
     1109                AssertRC(rc);
     1110# endif
     1111#endif
    11111112                return VINF_SUCCESS;
    11121113#ifdef VBOX_VDMA_WITH_WORKERTHREAD
     
    11681169int vboxVDMASaveStateExecPrep(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM)
    11691170{
     1171#ifdef VBOX_WITH_CRHGSMI
    11701172    PVGASTATE pVGAState = pVdma->pVGAState;
    11711173    PVBOXVDMACMD_CHROMIUM_CTL pCmd = (PVBOXVDMACMD_CHROMIUM_CTL)vboxVDMACrCtlCreate(
     
    11761178        int rc = vboxVDMACrCtlPost(pVGAState, pCmd);
    11771179        AssertRC(rc);
     1180        if (RT_SUCCESS(rc))
     1181        {
     1182            rc = vboxVDMACrCtlGetRc(pCmd);
     1183        }
     1184        vboxVDMACrCtlRelease(pCmd);
    11781185        return rc;
    11791186    }
    11801187    return VERR_NO_MEMORY;
     1188#else
     1189    return VINF_SUCCESS;
     1190#endif
    11811191}
    11821192
    11831193int vboxVDMASaveStateExecDone(struct VBOXVDMAHOST *pVdma, PSSMHANDLE pSSM)
    11841194{
     1195#ifdef VBOX_WITH_CRHGSMI
    11851196    PVGASTATE pVGAState = pVdma->pVGAState;
    11861197    PVBOXVDMACMD_CHROMIUM_CTL pCmd = (PVBOXVDMACMD_CHROMIUM_CTL)vboxVDMACrCtlCreate(
     
    11911202        int rc = vboxVDMACrCtlPost(pVGAState, pCmd);
    11921203        AssertRC(rc);
     1204        if (RT_SUCCESS(rc))
     1205        {
     1206            rc = vboxVDMACrCtlGetRc(pCmd);
     1207        }
     1208        vboxVDMACrCtlRelease(pCmd);
    11931209        return rc;
    11941210    }
    11951211    return VERR_NO_MEMORY;
     1212#else
     1213    return VINF_SUCCESS;
     1214#endif
    11961215}
    11971216
     
    12051224    {
    12061225        case VBOXVDMA_CTL_TYPE_ENABLE:
    1207         {
    1208             pVdma->bEnabled = true;
    12091226            pCmd->i32Result = VINF_SUCCESS;
    1210 #ifdef VBOX_WITH_CRHGSMI
    1211             /* @todo: use async completion to ensure we notify a status to guest */
    1212             int tmpRc = vboxVDMACrCtlHgsmiSetupAsync(pVdma);
    1213             AssertRC(tmpRc);
    1214 #endif
    1215         }
    12161227            break;
    12171228        case VBOXVDMA_CTL_TYPE_DISABLE:
    1218             pVdma->bEnabled = false;
    12191229            pCmd->i32Result = VINF_SUCCESS;
    12201230            break;
     
    12991309    AssertRC(tmpRc);
    13001310}
    1301 
    1302 bool vboxVDMAIsEnabled(PVBOXVDMAHOST pVdma)
    1303 {
    1304     return pVdma->bEnabled;
    1305 }
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