VirtualBox

Changeset 55971 in vbox for trunk


Ignore:
Timestamp:
May 20, 2015 3:17:50 PM (10 years ago)
Author:
vboxsync
Message:

3D: WDDM: consider sub-regions on FLIP operation.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxVideo.h

    r54565 r55971  
    18501850    VBOXCMDVBVA_HDR Hdr;
    18511851    VBOXCMDVBVA_ALLOCINFO src;
     1852    VBOXCMDVBVA_RECT aRects[1];
    18521853} VBOXCMDVBVA_FLIP;
     1854
     1855#define VBOXCMDVBVA_SIZEOF_FLIPSTRUCT_MIN (RT_OFFSETOF(VBOXCMDVBVA_FLIP, aRects))
    18531856
    18541857typedef struct VBOXCMDVBVA_CLRFILL_HDR
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r55247 r55971  
    61576157    }
    61586158
     6159#ifdef VBOX_WDDM_DUMP_REGIONS_ON_PRESENT
     6160    LogRel(("%s: [%ld, %ld, %ld, %ld] -> [%ld, %ld, %ld, %ld] (SubRectCnt=%u)\n",
     6161        pPresent->Flags.Blt ? "Blt" : (pPresent->Flags.Flip ? "Flip" : (pPresent->Flags.ColorFill ? "ColorFill" : "Unknown OP")),
     6162        pPresent->SrcRect.left, pPresent->SrcRect.top, pPresent->SrcRect.right, pPresent->SrcRect.bottom,
     6163        pPresent->DstRect.left, pPresent->DstRect.top, pPresent->DstRect.right, pPresent->DstRect.bottom,
     6164        pPresent->SubRectCnt));
     6165    for (unsigned int i = 0; i < pPresent->SubRectCnt; i++)
     6166        LogRel(("\tsub#%u = [%ld, %ld, %ld, %ld]\n", i, pPresent->pDstSubRects[i].left, pPresent->pDstSubRects[i].top, pPresent->pDstSubRects[i].right, pPresent->pDstSubRects[i].bottom));
     6167#endif
     6168
    61596169    if (pPresent->Flags.Blt)
    61606170    {
     
    62956305
    62966306        cbBuffer = VBOXWDDM_DUMMY_DMABUFFER_SIZE;
    6297         cbPrivateData = sizeof (*pFlip);
     6307        paRects = pFlip->aRects;
     6308        cbPrivateData = VBOXCMDVBVA_SIZEOF_FLIPSTRUCT_MIN;
    62986309    }
    62996310    else if (pPresent->Flags.ColorFill)
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp

    r55831 r55971  
    39553955}
    39563956
    3957 int8_t crVBoxServerCrCmdFlipProcess(const VBOXCMDVBVA_FLIP *pFlip)
     3957int8_t crVBoxServerCrCmdFlipProcess(const VBOXCMDVBVA_FLIP *pFlip, uint32_t cbCmd)
    39583958{
    39593959    uint32_t hostId;
     3960    const VBOXCMDVBVA_RECT *pPRects = pFlip->aRects;
     3961    uint32_t cRects;
     3962
    39603963    if (pFlip->Hdr.u8Flags & VBOXCMDVBVA_OPF_OPERAND1_ISID)
    39613964    {
     
    39813984    }
    39823985
    3983     const RTRECT *pRect = CrVrScrCompositorRectGet(&hFb->Compositor);
    3984     crServerDispatchVBoxTexPresent(hostId, idFb, 0, 0, 1, (const GLint*)pRect);
    3985     return 0;
     3986    cRects = (cbCmd - VBOXCMDVBVA_SIZEOF_FLIPSTRUCT_MIN) / sizeof (VBOXCMDVBVA_RECT);
     3987    if (cRects > 0)
     3988    {
     3989        RTRECT *pRects = crVBoxServerCrCmdBltRecsUnpack(pPRects, cRects);
     3990        if (pRects)
     3991        {
     3992            crServerDispatchVBoxTexPresent(hostId, idFb, 0, 0, cRects, (const GLint*)pRects);
     3993            return 0;
     3994        }
     3995    }
     3996
     3997    return -1;
    39863998}
    39873999
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h

    r55748 r55971  
    472472int8_t crVBoxServerCrCmdBltProcess(const VBOXCMDVBVA_BLT_HDR *pCmd, uint32_t cbCmd);
    473473int8_t crVBoxServerCrCmdClrFillProcess(const VBOXCMDVBVA_CLRFILL_HDR *pCmd, uint32_t cbCmd);
    474 int8_t crVBoxServerCrCmdFlipProcess(const VBOXCMDVBVA_FLIP *pFlip);
     474int8_t crVBoxServerCrCmdFlipProcess(const VBOXCMDVBVA_FLIP *pFlip, uint32_t cbCmd);
    475475
    476476
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c

    r55832 r55971  
    35533553            const VBOXCMDVBVA_FLIP *pFlip;
    35543554
    3555             if (cbCmd < sizeof (VBOXCMDVBVA_FLIP))
     3555            if (cbCmd < VBOXCMDVBVA_SIZEOF_FLIPSTRUCT_MIN)
    35563556            {
    3557                 WARN(("invalid buffer size"));
     3557                WARN(("invalid buffer size (cbCmd(%u) < sizeof(VBOXCMDVBVA_FLIP)(%u))", cbCmd, sizeof(VBOXCMDVBVA_FLIP)));
    35583558                return -1;
    35593559            }
    35603560
    35613561            pFlip = (const VBOXCMDVBVA_FLIP*)pCmd;
    3562             return crVBoxServerCrCmdFlipProcess(pFlip);
     3562            return crVBoxServerCrCmdFlipProcess(pFlip, cbCmd);
    35633563        }
    35643564        case VBOXCMDVBVA_OPTYPE_BLT:
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