- Timestamp:
- May 20, 2015 3:17:50 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxVideo.h
r54565 r55971 1850 1850 VBOXCMDVBVA_HDR Hdr; 1851 1851 VBOXCMDVBVA_ALLOCINFO src; 1852 VBOXCMDVBVA_RECT aRects[1]; 1852 1853 } VBOXCMDVBVA_FLIP; 1854 1855 #define VBOXCMDVBVA_SIZEOF_FLIPSTRUCT_MIN (RT_OFFSETOF(VBOXCMDVBVA_FLIP, aRects)) 1853 1856 1854 1857 typedef struct VBOXCMDVBVA_CLRFILL_HDR -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r55247 r55971 6157 6157 } 6158 6158 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 6159 6169 if (pPresent->Flags.Blt) 6160 6170 { … … 6295 6305 6296 6306 cbBuffer = VBOXWDDM_DUMMY_DMABUFFER_SIZE; 6297 cbPrivateData = sizeof (*pFlip); 6307 paRects = pFlip->aRects; 6308 cbPrivateData = VBOXCMDVBVA_SIZEOF_FLIPSTRUCT_MIN; 6298 6309 } 6299 6310 else if (pPresent->Flags.ColorFill) -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp
r55831 r55971 3955 3955 } 3956 3956 3957 int8_t crVBoxServerCrCmdFlipProcess(const VBOXCMDVBVA_FLIP *pFlip )3957 int8_t crVBoxServerCrCmdFlipProcess(const VBOXCMDVBVA_FLIP *pFlip, uint32_t cbCmd) 3958 3958 { 3959 3959 uint32_t hostId; 3960 const VBOXCMDVBVA_RECT *pPRects = pFlip->aRects; 3961 uint32_t cRects; 3962 3960 3963 if (pFlip->Hdr.u8Flags & VBOXCMDVBVA_OPF_OPERAND1_ISID) 3961 3964 { … … 3981 3984 } 3982 3985 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; 3986 3998 } 3987 3999 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h
r55748 r55971 472 472 int8_t crVBoxServerCrCmdBltProcess(const VBOXCMDVBVA_BLT_HDR *pCmd, uint32_t cbCmd); 473 473 int8_t crVBoxServerCrCmdClrFillProcess(const VBOXCMDVBVA_CLRFILL_HDR *pCmd, uint32_t cbCmd); 474 int8_t crVBoxServerCrCmdFlipProcess(const VBOXCMDVBVA_FLIP *pFlip );474 int8_t crVBoxServerCrCmdFlipProcess(const VBOXCMDVBVA_FLIP *pFlip, uint32_t cbCmd); 475 475 476 476 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
r55832 r55971 3553 3553 const VBOXCMDVBVA_FLIP *pFlip; 3554 3554 3555 if (cbCmd < sizeof (VBOXCMDVBVA_FLIP))3555 if (cbCmd < VBOXCMDVBVA_SIZEOF_FLIPSTRUCT_MIN) 3556 3556 { 3557 WARN(("invalid buffer size "));3557 WARN(("invalid buffer size (cbCmd(%u) < sizeof(VBOXCMDVBVA_FLIP)(%u))", cbCmd, sizeof(VBOXCMDVBVA_FLIP))); 3558 3558 return -1; 3559 3559 } 3560 3560 3561 3561 pFlip = (const VBOXCMDVBVA_FLIP*)pCmd; 3562 return crVBoxServerCrCmdFlipProcess(pFlip );3562 return crVBoxServerCrCmdFlipProcess(pFlip, cbCmd); 3563 3563 } 3564 3564 case VBOXCMDVBVA_OPTYPE_BLT:
Note:
See TracChangeset
for help on using the changeset viewer.