VirtualBox

Changeset 76376 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 22, 2018 10:32:24 PM (6 years ago)
Author:
vboxsync
Message:

VBoxUhgsmi.h: GCC doesn't like unnamed sub-structures in C++ code, so ditched them for VBOXUHGSMI_BUFFER_TYPE_FLAGS, VBOXUHGSMI_BUFFER_LOCK_FLAGS and VBOXUHGSMI_BUFFER_SUBMIT_FLAGS. Also skipped the outer wrapper structures for each of these types as all it contained was an unnamed union, so just make the typedefs unions straight away. Fixed some hungarian inconsistency between the three types ('b' == byte, not boolean in VBox, don't forget).

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.cpp

    r73097 r76376  
    4848    *phSynch = NULL;
    4949
    50     if (fUhgsmiType.fCommand)
     50    if (fUhgsmiType.s.fCommand)
    5151    {
    5252        *phSynch = CreateEvent(
     
    186186        PVBOXUHGSMI_BUFFER_PRIVATE_ESC_BASE pBuf = VBOXUHGSMIESCBASE_GET_BUFFER(pBufInfo->pBuf);
    187187        pSubmInfo->hAlloc = pBuf->Alloc.hAlloc;
    188         if (pBufInfo->fFlags.bEntireBuffer)
     188        if (pBufInfo->fFlags.s.fEntireBuffer)
    189189        {
    190190            pSubmInfo->Info.offData = 0;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiBase.h

    r73097 r76376  
    9494    D3DDDICB_LOCKFLAGS fLockFlags;
    9595    fLockFlags.Value = 0;
    96     if (fFlags.bLockEntire)
     96    if (fFlags.s.fLockEntire)
    9797    {
    9898        Assert(!offLock);
     
    126126    }
    127127
    128     fLockFlags.ReadOnly = fFlags.bReadOnly;
    129     fLockFlags.WriteOnly = fFlags.bWriteOnly;
    130     fLockFlags.DonotWait = fFlags.bDonotWait;
    131 //    fLockFlags.Discard = fFlags.bDiscard;
     128    fLockFlags.ReadOnly  = fFlags.s.fReadOnly;
     129    fLockFlags.WriteOnly = fFlags.s.fWriteOnly;
     130    fLockFlags.DonotWait = fFlags.s.fDonotWait;
     131//    fLockFlags.Discard = fFlags.s.fDiscard;
    132132    *pfFlags = fLockFlags;
    133133    return VINF_SUCCESS;
     
    173173        pAllocationList->hAllocation = pBuffer->hAllocation;
    174174        pAllocationList->Value = 0;
    175         pAllocationList->WriteOperation = !pBufInfo->fFlags.bHostReadOnly;
    176         pAllocationList->DoNotRetireInstance = pBufInfo->fFlags.bDoNotRetire;
    177         if (pBufInfo->fFlags.bEntireBuffer)
     175        pAllocationList->WriteOperation = !pBufInfo->fFlags.s.fHostReadOnly;
     176        pAllocationList->DoNotRetireInstance = pBufInfo->fFlags.s.fDoNotRetire;
     177        if (pBufInfo->fFlags.s.fEntireBuffer)
    178178        {
    179179            pBufSubmInfo->offData = 0;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxUhgsmiKmt.cpp

    r75445 r76376  
    5454}
    5555
    56 DECLCALLBACK(int) vboxUhgsmiKmtBufferLock(PVBOXUHGSMI_BUFFER pBuf, uint32_t offLock, uint32_t cbLock, VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags, void**pvLock)
     56DECLCALLBACK(int) vboxUhgsmiKmtBufferLock(PVBOXUHGSMI_BUFFER pBuf, uint32_t offLock, uint32_t cbLock,
     57                                          VBOXUHGSMI_BUFFER_LOCK_FLAGS fFlags, void**pvLock)
    5758{
    5859    PVBOXUHGSMI_BUFFER_PRIVATE_DX_ALLOC_BASE pBuffer = VBOXUHGSMDXALLOCBASE_GET_BUFFER(pBuf);
  • trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c

    r73223 r76376  
    241241    VBOXUHGSMI_BUFFER_TYPE_FLAGS Flags = {0};
    242242    pClient->pHgsmi = pHgsmi;
    243     Flags.fCommand = 1;
     243    Flags.s.fCommand = 1;
    244244    rc = pHgsmi->pfnBufferCreate(pHgsmi, CRVBOXHGSMI_PAGE_ALIGN(1), Flags, &pClient->pCmdBuffer);
    245245    if (RT_SUCCESS(rc))
     
    417417    int rc;
    418418    fFlags.Value = 0;
    419     fFlags.bDiscard = 1;
     419    fFlags.s.fDiscard = 1;
    420420    rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, cbBuffer, fFlags, (void**)&pHdr);
    421421    if (RT_SUCCESS(rc))
    422422        return pHdr;
    423     else
    424         crWarning("_crVBoxHGSMICmdBufferLock: pfnLock failed rc %d", rc);
     423    crWarning("_crVBoxHGSMICmdBufferLock: pfnLock failed rc %d", rc);
    425424
    426425    crWarning("Failed to Lock the command buffer of size(%d), rc(%d)\n", cbBuffer, rc);
     
    444443    int rc;
    445444    fFlags.Value = 0;
    446     fFlags.bReadOnly = 1;
     445    fFlags.s.fReadOnly = 1;
    447446    rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, cbBuffer, fFlags, (void**)&pHdr);
    448447    if (RT_FAILURE(rc))
     
    465464
    466465    fFlags.Value = 0;
    467     fFlags.bReadOnly = 1;
     466    fFlags.s.fReadOnly = 1;
    468467    rc = pClient->pCmdBuffer->pfnLock(pClient->pCmdBuffer, 0, sizeof (*pHdr), fFlags, (void**)&pHdr);
    469468    if (RT_FAILURE(rc))
     
    515514    pSubm->cbData = cbData;
    516515    pSubm->fFlags.Value = 0;
    517     pSubm->fFlags.bDoNotRetire = 1;
     516    pSubm->fFlags.s.fDoNotRetire = 1;
    518517# if 0
    519518    pSubm->fFlags.bDoNotSignalCompletion = 1; /* <- we do not need that actually since
     
    16151614    aSubmit[1].cbData = pRecvBuffer->cbBuffer;
    16161615    aSubmit[1].fFlags.Value = 0;
    1617     aSubmit[1].fFlags.bHostWriteOnly = 1;
     1616    aSubmit[1].fFlags.s.fHostWriteOnly = 1;
    16181617
    16191618    rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2);
     
    17021701        offBuffer = 0;
    17031702        fFlags.Value = 0;
    1704         fFlags.bDiscard = 1;
    1705         fFlags.bWriteOnly = 1;
     1703        fFlags.s.fDiscard = 1;
     1704        fFlags.s.fWriteOnly = 1;
    17061705        rc = pBuf->pfnLock(pBuf, 0, len, fFlags, &pvBuf);
    17071706        if (RT_SUCCESS(rc))
     
    17401739        aSubmit[1].cbData = len;
    17411740        aSubmit[1].fFlags.Value = 0;
    1742         aSubmit[1].fFlags.bHostReadOnly = 1;
     1741        aSubmit[1].fFlags.s.fHostReadOnly = 1;
    17431742
    17441743        aSubmit[2].pBuf = pRecvBuffer;
     
    18621861        aSubmit[1].cbData = len;
    18631862        aSubmit[1].fFlags.Value = 0;
    1864         aSubmit[1].fFlags.bHostReadOnly = 1;
     1863        aSubmit[1].fFlags.s.fHostReadOnly = 1;
    18651864
    18661865        rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2);
     
    18941893        aSubmit[1].cbData = len;
    18951894        aSubmit[1].fFlags.Value = 0;
    1896         aSubmit[1].fFlags.bHostReadOnly = 1;
     1895        aSubmit[1].fFlags.s.fHostReadOnly = 1;
    18971896
    18981897        rc = pClient->pHgsmi->pfnBufferSubmit(pClient->pHgsmi, aSubmit, 2);
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