Changeset 21939 in vbox
- Timestamp:
- Aug 3, 2009 11:52:51 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50619
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxVideo.h
r21609 r21939 276 276 * must not be cleared once set, the command completion is performed by issuing a host->guest completion command 277 277 * while keeping this flag unchanged */ 278 #define VBOXVHWACMD_FLAG_ ASYNCH 0x00000001278 #define VBOXVHWACMD_FLAG_HG_ASYNCH 0x00010000 279 279 /* asynch completion is performed by issuing the event */ 280 #define VBOXVHWACMD_FLAG_ ASYNCH_EVENT 0x00000002280 #define VBOXVHWACMD_FLAG_GH_ASYNCH_EVENT 0x00000001 281 281 /* issue interrupt on asynch completion */ 282 #define VBOXVHWACMD_FLAG_ASYNCH_IRQ 0x00000004 282 #define VBOXVHWACMD_FLAG_GH_ASYNCH_IRQ 0x00000002 283 /* guest does not do any op on completion of this command, the host may copy the command and indicate that it does not need the command anymore 284 * by setting the VBOXVHWACMD_FLAG_HG_ASYNCH_RETURNED flag */ 285 #define VBOXVHWACMD_FLAG_GH_ASYNCH_NOCOMPLETION 0x00000004 286 /* the host has copied the VBOXVHWACMD_FLAG_GH_ASYNCH_NOCOMPLETION command and returned it to the guest */ 287 #define VBOXVHWACMD_FLAG_HG_ASYNCH_RETURNED 0x00020000 283 288 284 289 typedef struct _VBOXVHWACMD … … 309 314 typedef struct _VBOXVHWA_RECTL 310 315 { 311 int32_t x;312 int32_t y;313 uint32_t w;314 uint32_t h;316 int32_t left; 317 int32_t top; 318 int32_t right; 319 int32_t bottom; 315 320 } VBOXVHWA_RECTL; 316 321 … … 348 353 uint32_t yuvVBitMask; 349 354 } m3; 355 356 union 357 { 358 uint32_t rgbABitMask; 359 } m4; 350 360 } VBOXVHWA_PIXELFORMAT; 351 361 … … 356 366 uint32_t width; 357 367 uint32_t pitch; 368 uint32_t bitsPerPixel; 358 369 uint32_t cBackBuffers; 359 uint32_t Reserved1;360 370 VBOXVHWA_COLORKEY DstOverlayCK; 361 371 VBOXVHWA_COLORKEY DstBltCK; … … 398 408 #define VBOXVHWA_CAPS_OVERLAYFOURCC 0x00000200 399 409 #define VBOXVHWA_CAPS_OVERLAYSTRETCH 0x00000400 410 #define VBOXVHWA_CAPS_OVERLAYCANTCLIP 0x00000800 400 411 401 412 #define VBOXVHWA_CAPS_COLORKEY 0x00010000 … … 521 532 typedef struct _VBOXVHWACMD_SURF_CANCREATE 522 533 { 523 union524 {525 struct526 {527 VBOXVHWA_SURFACEDESC SurfInfo;534 VBOXVHWA_SURFACEDESC SurfInfo; 535 union 536 { 537 struct 538 { 528 539 uint32_t bIsDifferentPixelFormat; 529 540 uint32_t Reserved; … … 539 550 typedef struct _VBOXVHWACMD_SURF_CREATE 540 551 { 541 union542 {543 struct544 {545 VBOXVHWA_SURFACEDESC SurfInfo;552 VBOXVHWA_SURFACEDESC SurfInfo; 553 union 554 { 555 struct 556 { 546 557 uint64_t offSurface; 547 558 } in; … … 587 598 { 588 599 VBOXVHWA_SURFHANDLE hSurf; 600 uint32_t xUpdatedMemValid; 601 uint32_t reserved; 602 VBOXVHWA_RECTL xUpdatedMemRect; 589 603 } in; 590 604 } u; … … 606 620 VBOXVHWA_RECTL srcRect; 607 621 uint32_t flags; 608 uint32_t reserved;622 uint32_t xUpdatedSrcMemValid; 609 623 VBOXVHWA_BLTFX desc; 624 VBOXVHWA_RECTL xUpdatedSrcMemRect; 610 625 } in; 611 626 } u; … … 625 640 uint64_t offCurrSurface; 626 641 uint32_t flags; 627 uint32_t reserved; 642 uint32_t xUpdatedTargMemValid; 643 VBOXVHWA_RECTL xUpdatedTargMemRect; 628 644 } in; 629 645 } u; … … 658 674 VBOXVHWA_RECTL srcRect; 659 675 uint32_t flags; 660 uint32_t reserved;676 uint32_t xUpdatedSrcMemValid; 661 677 VBOXVHWA_OVERLAYFX desc; 678 VBOXVHWA_RECTL xUpdatedSrcMemRect; 662 679 } in; 663 680 } u; -
trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.c
r21611 r21939 46 46 #define VBOXVHWA_CAP(_pdev, _cap) ((_pdev)->vhwaInfo.caps & (_cap)) 47 47 static bool getDDHALInfo(PPDEV pDev, DD_HALINFO* pHALInfo); 48 static DECLCALLBACK(void) vboxVHWAFreeCmdCompletion(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext);49 48 static DECLCALLBACK(void) vboxVHWASurfBltCompletion(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext); 50 49 static DECLCALLBACK(void) vboxVHWASurfFlipCompletion(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext); … … 76 75 * 77 76 */ 77 78 DD_HALINFO g_h2; 79 78 80 BOOL APIENTRY DrvGetDirectDrawInfo( 79 81 DHPDEV dhpdev, … … 615 617 DDPIXELFORMAT * pFormat = &lpSurfaceGlobal->ddpfSurface; 616 618 617 if(lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)618 {619 lBpp = pDev->ulBitCount;620 lPitch = pDev->lDeltaScreen;621 }622 else623 {624 if (pFormat->dwFlags & DDPF_PALETTEINDEXED4)625 {626 lBpp = 4;627 lPitch = lpSurfaceGlobal->wWidth/2;628 lPitch = (lPitch + 31) & ~31;629 }630 else631 if (pFormat->dwFlags & DDPF_PALETTEINDEXED8)632 {633 lBpp = 8;634 lPitch = lpSurfaceGlobal->wWidth;635 lPitch = (lPitch + 31) & ~31;636 }637 else638 {639 lBpp = pFormat->dwRGBBitCount;640 lPitch = lpSurfaceGlobal->wWidth*(lBpp/8);641 }642 }643 644 DISPDBG((0, "New surface (%d,%d)\n", lpSurfaceGlobal->wWidth, lpSurfaceGlobal->wHeight));645 DISPDBG((0, "BPP %d lPitch=%d\n", lBpp, lPitch));646 #if 1647 lpSurfaceGlobal->dwBlockSizeX = lPitch;648 lpSurfaceGlobal->dwBlockSizeY = lpSurfaceGlobal->wHeight;649 lpSurfaceGlobal->lPitch = lPitch;650 #else651 lpSurfaceGlobal->dwBlockSizeX = lPitch * lpSurfaceGlobal->wHeight;652 lpSurfaceGlobal->dwBlockSizeY = 1;653 lpSurfaceGlobal->lPitch = lPitch;654 #endif655 656 #if 1657 lpSurfaceDesc->lPitch = lpSurfaceGlobal->lPitch;658 lpSurfaceDesc->dwFlags |= DDSD_PITCH;659 #endif660 661 619 // 662 620 // Modify surface descriptions as appropriate and let Direct … … 683 641 memset(pBody, 0, sizeof(VBOXVHWACMD_SURF_CREATE)); 684 642 685 rc = vboxVHWAFromDDSURFACEDESC(&pBody-> u.in.SurfInfo, lpSurfaceDesc);686 687 pBody-> u.in.SurfInfo.surfCaps = vboxVHWAFromDDSCAPS(lpSurfaceLocal->ddsCaps.dwCaps);688 pBody-> u.in.SurfInfo.flags |= DDSD_CAPS;689 690 pBody-> u.in.SurfInfo.height = lpSurfaceGlobal->wHeight;691 pBody-> u.in.SurfInfo.width = lpSurfaceGlobal->wWidth;692 pBody-> u.in.SurfInfo.flags |= DDSD_HEIGHT | DDSD_WIDTH;693 694 vboxVHWAFromDDPIXELFORMAT(&pBody-> u.in.SurfInfo.PixelFormat, pFormat);695 pBody-> u.in.SurfInfo.flags |= VBOXVHWA_SD_PIXELFORMAT;643 rc = vboxVHWAFromDDSURFACEDESC(&pBody->SurfInfo, lpSurfaceDesc); 644 645 pBody->SurfInfo.surfCaps = vboxVHWAFromDDSCAPS(lpSurfaceLocal->ddsCaps.dwCaps); 646 pBody->SurfInfo.flags |= DDSD_CAPS; 647 648 pBody->SurfInfo.height = lpSurfaceGlobal->wHeight; 649 pBody->SurfInfo.width = lpSurfaceGlobal->wWidth; 650 pBody->SurfInfo.flags |= DDSD_HEIGHT | DDSD_WIDTH; 651 652 vboxVHWAFromDDPIXELFORMAT(&pBody->SurfInfo.PixelFormat, pFormat); 653 pBody->SurfInfo.flags |= VBOXVHWA_SD_PIXELFORMAT; 696 654 697 655 if (lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) … … 708 666 if(pDesc) 709 667 { 710 pDesc->cBitsPerPixel = lBpp;711 668 vboxVHWACommandSubmit(pDev, pCmd); 712 669 Assert(pCmd->rc == VINF_SUCCESS); … … 715 672 pDesc->hHostHandle = pBody->u.out.hSurf; 716 673 lpSurfaceGlobal->dwReserved1 = (ULONG_PTR)pDesc; 674 lPitch = pBody->SurfInfo.pitch; 675 lBpp = pBody->SurfInfo.bitsPerPixel; 676 pDesc->cBitsPerPixel = lBpp; 677 #if 0 678 lpSurfaceGlobal->dwBlockSizeX = lPitch; 679 lpSurfaceGlobal->dwBlockSizeY = lpSurfaceGlobal->wHeight; 680 lpSurfaceGlobal->lPitch = lPitch; 681 #else 682 lpSurfaceGlobal->dwBlockSizeX = lPitch * lpSurfaceGlobal->wHeight; 683 lpSurfaceGlobal->dwBlockSizeY = 1; 684 lpSurfaceGlobal->lPitch = lPitch; 685 #endif 686 #if 1 687 lpSurfaceDesc->lPitch = lpSurfaceGlobal->lPitch; 688 lpSurfaceDesc->dwFlags |= DDSD_PITCH; 689 #endif 690 717 691 lpCreateSurface->ddRVal = DD_OK; 718 692 } … … 831 805 memset(pBody, 0, sizeof(VBOXVHWACMD_SURF_CANCREATE)); 832 806 833 rc = vboxVHWAFromDDSURFACEDESC(&pBody-> u.in.SurfInfo, lpDDS);807 rc = vboxVHWAFromDDSURFACEDESC(&pBody->SurfInfo, lpDDS); 834 808 pBody->u.in.bIsDifferentPixelFormat = lpCanCreateSurface->bIsDifferentPixelFormat; 835 809 … … 1029 1003 DD_SURFACE_GLOBAL* lpSurfaceGlobal = lpSurfaceLocal->lpGbl; 1030 1004 PVBOXVHWASURFDESC pDesc = (PVBOXVHWASURFDESC)lpSurfaceGlobal->dwReserved1; 1031 VBOXVHWACMD* pCmd; 1032 /* ensure we have host cmds processed to update pending blits and flips */ 1033 vboxVHWACommandCheckHostCmds(pDev); 1034 1035 // if(VBOXDD_CHECKFLAG(lpLock, DDLOCK_DONOTWAIT)) 1036 { 1005 RECTL tmpRect, *pRect; 1006 1007 if(ASMAtomicUoReadU32(&pDesc->cPendingBltsSrc) 1008 || ASMAtomicUoReadU32(&pDesc->cPendingFlipsCurr) 1009 || ASMAtomicUoReadU32(&pDesc->cPendingBltsDst) 1010 || ASMAtomicUoReadU32(&pDesc->cPendingFlipsTarg)) 1011 { 1012 /* ensure we have host cmds processed to update pending blits and flips */ 1013 vboxVHWACommandCheckHostCmds(pDev); 1037 1014 if(ASMAtomicUoReadU32(&pDesc->cPendingBltsSrc) 1038 || ASMAtomicUoReadU32(&pDesc->cPendingBltsDst)1039 || ASMAtomicUoReadU32(&pDesc->cPendingFlipsTarg)1040 || ASMAtomicUoReadU32(&pDesc->cPendingFlipsCurr))1015 || ASMAtomicUoReadU32(&pDesc->cPendingFlipsCurr) 1016 || ASMAtomicUoReadU32(&pDesc->cPendingBltsDst) 1017 || ASMAtomicUoReadU32(&pDesc->cPendingFlipsTarg)) 1041 1018 { 1042 1019 lpLock->ddRVal = DDERR_WASSTILLDRAWING; … … 1051 1028 // } 1052 1029 1053 pCmd = vboxVHWACommandCreate (pDev, VBOXVHWACMD_TYPE_SURF_LOCK, sizeof(VBOXVHWACMD_SURF_LOCK)); 1054 if(pCmd) 1055 { 1056 VBOXVHWACMD_SURF_LOCK * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_LOCK); 1057 RECTL tmpRect, *pRect; 1058 memset(pBody, 0, sizeof(VBOXVHWACMD_SURF_LOCK)); 1059 1060 pBody->u.in.offSurface = (uint64_t)lpSurfaceGlobal->fpVidMem; 1061 1062 if (lpLock->bHasRect) 1030 if (lpLock->bHasRect) 1031 { 1032 pRect = &lpLock->rArea; 1033 } 1034 else 1035 { 1036 tmpRect.left=0; 1037 tmpRect.top=0; 1038 tmpRect.right=lpSurfaceGlobal->wWidth-1; 1039 tmpRect.bottom=lpSurfaceGlobal->wHeight-1; 1040 pRect = &tmpRect; 1041 } 1042 1043 if(VBOXDD_CHECKFLAG(lpLock->dwFlags, DDLOCK_DISCARDCONTENTS)) 1044 { 1045 // pBody->u.in.flags |= VBOXVHWA_LOCK_DISCARDCONTENTS; 1046 1047 vboxVHWARegionTrySubstitute(&pDesc->NonupdatedMemRegion, pRect); 1048 // /* we're not interested in completion, just send the command */ 1049 // vboxVHWACommandSubmitAsynch(pDev, pCmd, vboxVHWAFreeCmdCompletion, NULL); 1050 vboxVHWARegionAdd(&pDesc->UpdatedMemRegion, pRect); 1051 lpLock->ddRVal = DD_OK; 1052 } 1053 else if(!vboxVHWARegionIntersects(&pDesc->NonupdatedMemRegion, pRect)) 1054 { 1055 // vboxVHWACommandSubmitAsynch(pDev, pCmd, vboxVHWAFreeCmdCompletion, NULL); 1056 vboxVHWARegionAdd(&pDesc->UpdatedMemRegion, pRect); 1057 lpLock->ddRVal = DD_OK; 1058 } 1059 else 1060 { 1061 VBOXVHWACMD* pCmd = vboxVHWACommandCreate (pDev, VBOXVHWACMD_TYPE_SURF_LOCK, sizeof(VBOXVHWACMD_SURF_LOCK)); 1062 if(pCmd) 1063 1063 { 1064 DISPDBG((0, "%d,%d %dx%d\n", lpLock->rArea.left, lpLock->rArea.top, lpLock->rArea.right - lpLock->rArea.left, lpLock->rArea.bottom - lpLock->rArea.top)); 1065 vboxVHWAFromRECTL(&pBody->u.in.rect, &lpLock->rArea); 1064 VBOXVHWACMD_SURF_LOCK * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_LOCK); 1065 memset(pBody, 0, sizeof(VBOXVHWACMD_SURF_LOCK)); 1066 1067 pBody->u.in.offSurface = (uint64_t)lpSurfaceGlobal->fpVidMem; 1068 1069 // if (lpLock->bHasRect) 1070 // { 1071 // DISPDBG((0, "%d,%d %dx%d\n", lpLock->rArea.left, lpLock->rArea.top, lpLock->rArea.right - lpLock->rArea.left, lpLock->rArea.bottom - lpLock->rArea.top)); 1072 // vboxVHWAFromRECTL(&pBody->u.in.rect, &lpLock->rArea); 1073 // pBody->u.in.rectValid = 1; 1074 // 1075 // } 1076 // else 1077 // { 1078 // pBody->u.in.rectValid = 0; 1079 // } 1080 Assert(pDesc->NonupdatedMemRegion.bValid); 1081 vboxVHWAFromRECTL(&pBody->u.in.rect, &pDesc->NonupdatedMemRegion.Rect); 1066 1082 pBody->u.in.rectValid = 1; 1067 1083 1068 pRect = &lpLock->rArea; 1069 1084 pBody->u.in.hSurf = pDesc->hHostHandle; 1085 1086 /* wait for the surface to be locked and memory buffer updated */ 1087 vboxVHWACommandSubmit(pDev, pCmd); 1088 vboxVHWACommandFree(pDev, pCmd); 1089 vboxVHWARegionClear(&pDesc->NonupdatedMemRegion); 1090 lpLock->ddRVal = DD_OK; 1070 1091 } 1071 1092 else 1072 1093 { 1073 pBody->u.in.rectValid = 0; 1074 1075 tmpRect.left=0; 1076 tmpRect.top=0; 1077 tmpRect.right=lpSurfaceGlobal->wWidth-1; 1078 tmpRect.bottom=lpSurfaceGlobal->wHeight-1; 1079 pRect = &tmpRect; 1094 lpLock->ddRVal = DDERR_GENERIC; 1080 1095 } 1081 1082 pBody->u.in.hSurf = pDesc->hHostHandle;1083 1084 if(VBOXDD_CHECKFLAG(lpLock->dwFlags, DDLOCK_DISCARDCONTENTS))1085 {1086 pBody->u.in.flags |= VBOXVHWA_LOCK_DISCARDCONTENTS;1087 1088 if(vboxVHWARegionIncluded(&pDesc->DirtyRegion, pRect))1089 {1090 vboxVHWARegionClear(&pDesc->DirtyRegion);1091 }1092 // }1093 // else if(vboxVHWARegionInterse)1094 /* we're not interested in completion, just send the command */1095 vboxVHWACommandSubmitAsynch(pDev, pCmd, vboxVHWAFreeCmdCompletion, NULL);1096 }1097 else if(!vboxVHWARegionIntersects(&pDesc->DirtyRegion, pRect))1098 {1099 vboxVHWACommandSubmitAsynch(pDev, pCmd, vboxVHWAFreeCmdCompletion, NULL);1100 }1101 else1102 {1103 /* wait for the surface to be locked and memory buffer updated */1104 vboxVHWACommandSubmit(pDev, pCmd);1105 vboxVHWACommandFree(pDev, pCmd);1106 vboxVHWARegionClear(&pDesc->DirtyRegion);1107 }1108 1109 lpLock->ddRVal = DD_OK;1110 }1111 else1112 {1113 lpLock->ddRVal = DDERR_GENERIC;1114 1096 } 1115 1097 return DDHAL_DRIVER_NOTHANDLED; … … 1174 1156 DD_SURFACE_GLOBAL* lpSurfaceGlobal = lpSurfaceLocal->lpGbl; 1175 1157 PVBOXVHWASURFDESC pDesc = (PVBOXVHWASURFDESC)lpSurfaceGlobal->dwReserved1; 1176 VBOXVHWACMD* pCmd;1177 1158 1178 1159 //TODO: hadle vrdp properly … … 1186 1167 } 1187 1168 1188 /* ensure we have host cmds processed to update pending blits and flips */ 1189 vboxVHWACommandCheckHostCmds(pDev); 1190 1191 pCmd = vboxVHWACommandCreate (pDev, VBOXVHWACMD_TYPE_SURF_UNLOCK, sizeof(VBOXVHWACMD_SURF_UNLOCK)); 1192 // int rc = VERR_GENERAL_FAILURE; 1193 if(pCmd) 1194 { 1195 VBOXVHWACMD_SURF_UNLOCK * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_UNLOCK); 1196 memset(pBody, 0, sizeof(VBOXVHWACMD_SURF_UNLOCK)); 1197 1198 pBody->u.in.hSurf = pDesc->hHostHandle; 1199 1200 vboxVHWACommandSubmitAsynch(pDev, pCmd, vboxVHWAFreeCmdCompletion, NULL); 1201 1202 lpUnlock->ddRVal = DD_OK; 1203 } 1204 else 1205 { 1206 lpUnlock->ddRVal = DDERR_GENERIC; 1169 // /* ensure we have host cmds processed to update pending blits and flips */ 1170 // vboxVHWACommandCheckHostCmds(pDev); 1171 1172 if(lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_VISIBLE 1173 || ( 1174 !(lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_COMPLEX) 1175 && ( 1176 lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE 1177 || ( 1178 (lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_OVERLAY) 1179 && !pDesc->bHidden 1180 ) 1181 ) 1182 ) 1183 ) 1184 { 1185 VBOXVHWACMD* pCmd = vboxVHWACommandCreate (pDev, VBOXVHWACMD_TYPE_SURF_UNLOCK, sizeof(VBOXVHWACMD_SURF_UNLOCK)); 1186 // int rc = VERR_GENERAL_FAILURE; 1187 if(pCmd) 1188 { 1189 VBOXVHWACMD_SURF_UNLOCK * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_UNLOCK); 1190 memset(pBody, 0, sizeof(VBOXVHWACMD_SURF_UNLOCK)); 1191 1192 pBody->u.in.hSurf = pDesc->hHostHandle; 1193 if(pDesc->UpdatedMemRegion.bValid) 1194 { 1195 pBody->u.in.xUpdatedMemValid = 1; 1196 vboxVHWAFromRECTL(&pBody->u.in.xUpdatedMemRect, &pDesc->UpdatedMemRegion.Rect); 1197 vboxVHWARegionClear(&pDesc->UpdatedMemRegion); 1198 } 1199 1200 vboxVHWACommandSubmitAsynchAndComplete(pDev, pCmd); 1201 1202 lpUnlock->ddRVal = DD_OK; 1203 } 1204 else 1205 { 1206 lpUnlock->ddRVal = DDERR_GENERIC; 1207 } 1207 1208 } 1208 1209 … … 1308 1309 1309 1310 /* we're not interested in completion, just send the command */ 1310 vboxVHWACommandSubmitAsynch (pDev, pCmd, vboxVHWAFreeCmdCompletion, NULL);1311 vboxVHWACommandSubmitAsynchAndComplete(pDev, pCmd); 1311 1312 1312 1313 vboxVHWASurfDescFree(pDesc); … … 1406 1407 1407 1408 #ifdef VBOX_WITH_VIDEOHWACCEL 1409 #if 1 1408 1410 DWORD APIENTRY DdSetColorKey(PDD_SETCOLORKEYDATA lpSetColorKey) 1409 1411 { … … 1428 1430 vboxVHWAFromDDCOLORKEY(&pBody->u.in.CKey, &lpSetColorKey->ckNew); 1429 1431 1430 vboxVHWACommandSubmitAsynch (pDev, pCmd, vboxVHWAFreeCmdCompletion, NULL);1432 vboxVHWACommandSubmitAsynchAndComplete(pDev, pCmd); 1431 1433 lpSetColorKey->ddRVal = DD_OK; 1432 1434 } … … 1482 1484 ASMAtomicIncU32(&pDestDesc->cPendingBltsDst); 1483 1485 1484 vboxVHWARegionAdd(&pDestDesc->DirtyRegion, &lpBlt->rDest); 1486 vboxVHWARegionAdd(&pDestDesc->NonupdatedMemRegion, &lpBlt->rDest); 1487 vboxVHWARegionTrySubstitute(&pDestDesc->UpdatedMemRegion, &lpBlt->rDest); 1488 1489 if(pSrcDesc->UpdatedMemRegion.bValid) 1490 { 1491 pBody->u.in.xUpdatedSrcMemValid = 1; 1492 vboxVHWAFromRECTL(&pBody->u.in.xUpdatedSrcMemRect, &pSrcDesc->UpdatedMemRegion.Rect); 1493 vboxVHWARegionClear(&pSrcDesc->UpdatedMemRegion); 1494 } 1495 1485 1496 vboxVHWACommandSubmitAsynch(pDev, pCmd, vboxVHWASurfBltCompletion, NULL); 1486 1497 … … 1516 1527 DISPDBG((0, "%s\n", __FUNCTION__)); 1517 1528 1518 /* ensure we have host cmds processed to update pending blits and flips */ 1519 vboxVHWACommandCheckHostCmds(pDev); 1520 1521 // if(VBOXDD_CHECKFLAG(lpLock, DDLOCK_DONOTWAIT)) 1522 { 1523 if( 1529 if( 1524 1530 // ASMAtomicUoReadU32(&pDesc->cPendingBltsSrc) 1525 1531 // || ASMAtomicUoReadU32(&pDesc->cPendingBltsDst) 1526 1532 // || 1527 ASMAtomicUoReadU32(&pCurrDesc->cPendingFlipsTarg) 1528 || ASMAtomicUoReadU32(&pCurrDesc->cPendingFlipsCurr) 1529 || ASMAtomicUoReadU32(&pTargDesc->cPendingFlipsTarg) 1530 || ASMAtomicUoReadU32(&pTargDesc->cPendingFlipsCurr)) 1533 ASMAtomicUoReadU32(&pCurrDesc->cPendingFlipsTarg) 1534 || ASMAtomicUoReadU32(&pCurrDesc->cPendingFlipsCurr) 1535 || ASMAtomicUoReadU32(&pTargDesc->cPendingFlipsTarg) 1536 || ASMAtomicUoReadU32(&pTargDesc->cPendingFlipsCurr)) 1537 { 1538 /* ensure we have host cmds processed to update pending blits and flips */ 1539 vboxVHWACommandCheckHostCmds(pDev); 1540 if( 1541 // ASMAtomicUoReadU32(&pDesc->cPendingBltsSrc) 1542 // || ASMAtomicUoReadU32(&pDesc->cPendingBltsDst) 1543 // || 1544 ASMAtomicUoReadU32(&pCurrDesc->cPendingFlipsTarg) 1545 || ASMAtomicUoReadU32(&pCurrDesc->cPendingFlipsCurr) 1546 || ASMAtomicUoReadU32(&pTargDesc->cPendingFlipsTarg) 1547 || ASMAtomicUoReadU32(&pTargDesc->cPendingFlipsCurr)) 1531 1548 { 1532 1549 lpFlip->ddRVal = DDERR_WASSTILLDRAWING; … … 1534 1551 } 1535 1552 } 1553 1536 1554 1537 1555 pCmd = vboxVHWACommandCreate (pDev, VBOXVHWACMD_TYPE_SURF_FLIP, sizeof(VBOXVHWACMD_SURF_FLIP)); … … 1556 1574 ASMAtomicIncU32(&pTargDesc->cPendingFlipsTarg); 1557 1575 1576 if(pTargDesc->UpdatedMemRegion.bValid) 1577 { 1578 pBody->u.in.xUpdatedTargMemValid = 1; 1579 vboxVHWAFromRECTL(&pBody->u.in.xUpdatedTargMemRect, &pTargDesc->UpdatedMemRegion.Rect); 1580 vboxVHWARegionClear(&pTargDesc->UpdatedMemRegion); 1581 } 1582 1558 1583 vboxVHWACommandSubmitAsynch(pDev, pCmd, vboxVHWASurfFlipCompletion, NULL); 1559 1584 … … 1582 1607 DD_SURFACE_GLOBAL* lpSurfaceGlobal = lpSurfaceLocal->lpGbl; 1583 1608 PVBOXVHWASURFDESC pDesc = (PVBOXVHWASURFDESC)lpSurfaceGlobal->dwReserved1; 1584 1585 /* ensure we have host cmds processed to update pending blits and flips */1586 vboxVHWACommandCheckHostCmds(pDev);1587 1609 1588 1610 if( … … 1593 1615 ) 1594 1616 { 1595 lpGetBltStatus->ddRVal = DDERR_WASSTILLDRAWING; 1617 /* ensure we have host cmds processed to update pending blits and flips */ 1618 vboxVHWACommandCheckHostCmds(pDev); 1619 1620 if( 1621 ASMAtomicUoReadU32(&pDesc->cPendingBltsSrc) 1622 || ASMAtomicUoReadU32(&pDesc->cPendingBltsDst) 1623 // || ASMAtomicUoReadU32(&pDesc->cPendingFlipsTarg) 1624 // || ASMAtomicUoReadU32(&pDesc->cPendingFlipsCurr) 1625 ) 1626 { 1627 lpGetBltStatus->ddRVal = DDERR_WASSTILLDRAWING; 1628 } 1629 else 1630 { 1631 lpGetBltStatus->ddRVal = DD_OK; 1632 } 1596 1633 } 1597 1634 else … … 1612 1649 1613 1650 DISPDBG((0, "%s\n", __FUNCTION__)); 1614 1615 /* ensure we have host cmds processed to update pending blits and flips */1616 vboxVHWACommandCheckHostCmds(pDev);1617 1651 1618 1652 if( … … 1624 1658 ) 1625 1659 { 1626 lpGetFlipStatus->ddRVal = DDERR_WASSTILLDRAWING; 1660 /* ensure we have host cmds processed to update pending blits and flips */ 1661 vboxVHWACommandCheckHostCmds(pDev); 1662 1663 if( 1664 // ASMAtomicUoReadU32(&pDesc->cPendingBltsSrc) 1665 // || ASMAtomicUoReadU32(&pDesc->cPendingBltsDst) 1666 // || 1667 ASMAtomicUoReadU32(&pDesc->cPendingFlipsTarg) 1668 || ASMAtomicUoReadU32(&pDesc->cPendingFlipsCurr) 1669 ) 1670 { 1671 lpGetFlipStatus->ddRVal = DDERR_WASSTILLDRAWING; 1672 } 1673 else 1674 { 1675 lpGetFlipStatus->ddRVal = DD_OK; 1676 } 1627 1677 } 1628 1678 else … … 1679 1729 pBody->u.in.yPos = lpSetOverlayPosition->lYPos; 1680 1730 1681 vboxVHWACommandSubmitAsynch (pDev, pCmd, vboxVHWAFreeCmdCompletion, NULL);1731 vboxVHWACommandSubmitAsynchAndComplete(pDev, pCmd); 1682 1732 lpSetOverlayPosition->ddRVal = DD_OK; 1683 1733 } … … 1728 1778 { 1729 1779 pSrcDesc->bHidden = false; 1780 if(pSrcDesc->UpdatedMemRegion.bValid) 1781 { 1782 pBody->u.in.xUpdatedSrcMemValid = 1; 1783 vboxVHWAFromRECTL(&pBody->u.in.xUpdatedSrcMemRect, &pSrcDesc->UpdatedMemRegion.Rect); 1784 vboxVHWARegionClear(&pSrcDesc->UpdatedMemRegion); 1785 } 1730 1786 } 1731 1787 … … 1738 1794 } 1739 1795 1740 vboxVHWACommandSubmitAsynch (pDev, pCmd, vboxVHWAFreeCmdCompletion, NULL);1796 vboxVHWACommandSubmitAsynchAndComplete(pDev, pCmd); 1741 1797 lpUpdateOverlay->ddRVal = DD_OK; 1742 1798 } … … 1744 1800 return DDHAL_DRIVER_HANDLED; 1745 1801 } 1802 #else 1803 DWORD APIENTRY DdSetColorKey(PDD_SETCOLORKEYDATA lpSetColorKey) 1804 { 1805 DISPDBG((0, "%s\n", __FUNCTION__)); 1806 lpSetColorKey->ddRVal = DD_OK; 1807 return DDHAL_DRIVER_HANDLED; 1808 } 1809 1810 DWORD APIENTRY DdAddAttachedSurface(PDD_ADDATTACHEDSURFACEDATA lpAddAttachedSurface) 1811 { 1812 DISPDBG((0, "%s\n", __FUNCTION__)); 1813 lpAddAttachedSurface->ddRVal = DD_OK; 1814 return DDHAL_DRIVER_HANDLED; 1815 } 1816 1817 DWORD APIENTRY DdBlt(PDD_BLTDATA lpBlt) 1818 { 1819 DISPDBG((0, "%s\n", __FUNCTION__)); 1820 lpBlt->ddRVal = DD_OK; 1821 return DDHAL_DRIVER_HANDLED; 1822 } 1823 1824 //DWORD APIENTRY DdDestroySurface(PDD_DESTROYSURFACEDATA lpDestroySurface) 1825 //{ 1826 // DISPDBG((0, "%s\n", __FUNCTION__)); 1827 // lpDestroySurface->ddRVal = DD_OK; 1828 // return DDHAL_DRIVER_HANDLED; 1829 //} 1830 1831 DWORD APIENTRY DdFlip(PDD_FLIPDATA lpFlip) 1832 { 1833 DISPDBG((0, "%s\n", __FUNCTION__)); 1834 lpFlip->ddRVal = DD_OK; 1835 return DDHAL_DRIVER_HANDLED; 1836 } 1837 1838 DWORD APIENTRY DdGetBltStatus(PDD_GETBLTSTATUSDATA lpGetBltStatus) 1839 { 1840 DISPDBG((0, "%s\n", __FUNCTION__)); 1841 1842 if(lpGetBltStatus->dwFlags == DDGBS_CANBLT) 1843 { 1844 lpGetBltStatus->ddRVal = DD_OK; 1845 } 1846 else 1847 { 1848 lpGetBltStatus->ddRVal = DD_OK; 1849 } 1850 1851 return DDHAL_DRIVER_HANDLED; 1852 } 1853 1854 DWORD APIENTRY DdGetFlipStatus(PDD_GETFLIPSTATUSDATA lpGetFlipStatus) 1855 { 1856 DISPDBG((0, "%s\n", __FUNCTION__)); 1857 if(lpGetFlipStatus->dwFlags == DDGFS_CANFLIP) 1858 { 1859 lpGetFlipStatus->ddRVal = DD_OK; 1860 } 1861 else 1862 { 1863 lpGetFlipStatus->ddRVal = DD_OK; 1864 } 1865 1866 return DDHAL_DRIVER_HANDLED; 1867 } 1868 1869 DWORD APIENTRY DdSetOverlayPosition(PDD_SETOVERLAYPOSITIONDATA lpSetOverlayPosition) 1870 { 1871 DISPDBG((0, "%s\n", __FUNCTION__)); 1872 1873 lpSetOverlayPosition->ddRVal = DD_OK; 1874 return DDHAL_DRIVER_HANDLED; 1875 } 1876 1877 DWORD APIENTRY DdUpdateOverlay(PDD_UPDATEOVERLAYDATA lpUpdateOverlay) 1878 { 1879 DISPDBG((0, "%s\n", __FUNCTION__)); 1880 1881 lpUpdateOverlay->ddRVal = DD_OK; 1882 return DDHAL_DRIVER_HANDLED; 1883 } 1884 1885 #endif 1746 1886 1747 1887 //----------------------------------------------------------------------------- … … 1813 1953 static DWORD rops[DD_ROP_SPACE] = { 0 }; 1814 1954 1955 #if 1 1815 1956 static bool 1816 1957 getDDHALInfo( … … 1831 1972 rops, 1832 1973 sizeof(ropListNT)/sizeof(ropListNT[0])); 1974 1975 // 1976 // ROPS supported 1977 // 1978 for( i=0;i<DD_ROP_SPACE;i++ ) 1979 { 1980 pHALInfo->ddCaps.dwRops[i] = rops[i]; 1981 } 1833 1982 } 1834 1983 … … 1861 2010 // We need to flag we can run in windowed mode, otherwise we 1862 2011 // might get restricted by apps to run in fullscreen only 1863 pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANRENDERWINDOWED;2012 // pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANRENDERWINDOWED; 1864 2013 1865 2014 // Also permit surfaces wider than the display buffer. 1866 pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_WIDESURFACES;2015 // pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_WIDESURFACES; 1867 2016 //#endif 1868 2017 … … 1931 2080 } 1932 2081 1933 if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT)1934 && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLTFOURCC))1935 {1936 pHALInfo->ddCaps.dwCaps |= DDCAPS_BLTFOURCC;1937 1938 // Enable copy blts between Four CC formats for DShow acceleration1939 pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_COPYFOURCC;1940 }1941 1942 if((VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT) || VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_OVERLAY))1943 && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_COLORKEY))2082 // if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT) 2083 // && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLTFOURCC)) 2084 // { 2085 // pHALInfo->ddCaps.dwCaps |= DDCAPS_BLTFOURCC; 2086 // 2087 // // Enable copy blts between Four CC formats for DShow acceleration 2088 // pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_COPYFOURCC; 2089 // } 2090 2091 // if((VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT) || VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_OVERLAY)) 2092 // && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_COLORKEY)) 1944 2093 { 1945 2094 pHALInfo->ddCaps.dwCKeyCaps = vboxVHWAToDDCKEYCAPS(pDev->vhwaInfo.colorKeyCaps); … … 2055 2204 // DDBD_8; 2056 2205 2057 //2058 // ROPS supported2059 //2060 for( i=0;i<DD_ROP_SPACE;i++ )2061 {2062 pHALInfo->ddCaps.dwRops[i] = rops[i];2063 }2064 2206 2065 2207 //Reenable: // For DX5 and beyond we support this new informational callback. … … 2075 2217 return true; 2076 2218 } // getDDHALInfo 2077 2078 static DECLCALLBACK(void) vboxVHWAFreeCmdCompletion(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext) 2079 { 2080 vboxVHWACommandFree(ppdev, pCmd); 2081 } 2219 #else 2220 bool 2221 getDDHALInfo2( 2222 PPDEV pDev, 2223 DD_HALINFO* pHALInfo) 2224 { 2225 int i; 2226 2227 #if 0 2228 /* TODO: only enable features supported by the host backend & host hw 2229 * for now this just combines all caps we might use */ 2230 2231 // Setup the ROPS we do. 2232 setupRops( ropListNT, 2233 rops, 2234 sizeof(ropListNT)/sizeof(ropListNT[0])); 2235 2236 // The most basic DirectDraw functionality 2237 pHALInfo->ddCaps.dwCaps |= DDCAPS_BLT 2238 | DDCAPS_BLTQUEUE 2239 | DDCAPS_BLTCOLORFILL 2240 // | DDCAPS_READSCANLINE 2241 ; 2242 #endif 2243 pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_OFFSCREENPLAIN 2244 | DDSCAPS_PRIMARYSURFACE 2245 | DDSCAPS_FLIP; 2246 #if 0 2247 pHALInfo->ddCaps.dwCaps |= DDCAPS_3D | 2248 DDCAPS_BLTDEPTHFILL; 2249 2250 pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_3DDEVICE | 2251 DDSCAPS_ZBUFFER | 2252 DDSCAPS_ALPHA; 2253 #endif 2254 pHALInfo->ddCaps.dwCaps2 = 0; 2255 2256 //#if DX7_TEXMANAGEMENT 2257 // We need to set this bit up in order to be able to do 2258 // out own texture management 2259 // pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANMANAGETEXTURE; 2260 //#if DX8_DDI 2261 // pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANMANAGERESOURCE; 2262 //#endif 2263 //#endif 2264 2265 //#if DX8_DDI 2266 // We need to flag we can run in windowed mode, otherwise we 2267 // might get restricted by apps to run in fullscreen only 2268 pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANRENDERWINDOWED; 2269 //#endif 2270 2271 //#if DX8_DDI 2272 // We need to flag we support dynamic textures. That is , apps can 2273 // lock with high frequency video memory textures without paying a 2274 // penalty for it. Since on this sample driver we only support 2275 // linear memory formats for textures we don't need to do anything 2276 // else for this support. Otherwise we would have to keep two surfaces 2277 // for textures created with the DDSCAPS2_HINTDYNAMIC hint in order 2278 // to efficiently do the linear<->swizzled transformation or keep the 2279 // texture permanantly in an unswizzled state. 2280 // pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_DYNAMICTEXTURES; 2281 #if DX9_DDI 2282 // Notice that dynamic textures MUST be supported in order to instantiate a DX9 device 2283 #endif // DX9_DDI 2284 //#endif 2285 2286 // pHALInfo->ddCaps.dwFXCaps = 0; 2287 2288 // P3RX can do: 2289 // 1. Stretching/Shrinking 2290 // 2. YUV->RGB conversion 2291 // 3. Mirroring in X and Y 2292 // 4. ColorKeying from a source color and a source color space 2293 pHALInfo->ddCaps.dwCaps |= 2294 #if 0 2295 DDCAPS_BLTSTRETCH 2296 | DDCAPS_BLTFOURCC 2297 | 2298 #endif 2299 DDCAPS_COLORKEY 2300 // | DDCAPS_CANBLTSYSMEM 2301 ; 2302 #if 0 2303 // Special effects caps 2304 pHALInfo->ddCaps.dwFXCaps |= DDFXCAPS_BLTSTRETCHY | 2305 DDFXCAPS_BLTSTRETCHX | 2306 DDFXCAPS_BLTSTRETCHYN | 2307 DDFXCAPS_BLTSTRETCHXN | 2308 DDFXCAPS_BLTSHRINKY | 2309 DDFXCAPS_BLTSHRINKX | 2310 DDFXCAPS_BLTSHRINKYN | 2311 DDFXCAPS_BLTSHRINKXN; 2312 2313 // ColorKey caps 2314 pHALInfo->ddCaps.dwCKeyCaps |= DDCKEYCAPS_SRCBLT | 2315 DDCKEYCAPS_SRCBLTCLRSPACE | 2316 DDCKEYCAPS_DESTBLT | 2317 DDCKEYCAPS_DESTBLTCLRSPACE; 2318 #endif 2319 // pHALInfo->ddCaps.dwSVBCaps = DDCAPS_BLT; 2320 2321 // // We can do a texture from sysmem to video mem. 2322 // pHALInfo->ddCaps.dwSVBCKeyCaps |= DDCKEYCAPS_DESTBLT | 2323 // DDCKEYCAPS_DESTBLTCLRSPACE; 2324 pHALInfo->ddCaps.dwSVBFXCaps = 0; 2325 2326 // // Fill in the sysmem->vidmem rops (only can copy); 2327 // for( i=0;i<DD_ROP_SPACE;i++ ) 2328 // { 2329 // pHALInfo->ddCaps.dwSVBRops[i] = rops[i]; 2330 // } 2331 #if 0 2332 //mirroring with blitting 2333 pHALInfo->ddCaps.dwFXCaps |= DDFXCAPS_BLTMIRRORUPDOWN | 2334 DDFXCAPS_BLTMIRRORLEFTRIGHT; 2335 2336 pHALInfo->ddCaps.dwCKeyCaps |= DDCKEYCAPS_SRCBLTCLRSPACEYUV; 2337 2338 pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_TEXTURE; 2339 #endif 2340 //#if DX7_STEREO 2341 // // Report the stereo capability back to runtime 2342 // pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_STEREO; 2343 // pHALInfo->ddCaps.dwSVCaps = DDSVCAPS_STEREOSEQUENTIAL; 2344 //#endif 2345 2346 // Z Buffer is only 16 Bits 2347 // pHALInfo->ddCaps.dwZBufferBitDepths = DDBD_16; 2348 // pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_MIPMAP; 2349 2350 pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM; 2351 2352 { 2353 //#ifdef SUPPORT_VIDEOPORT 2354 // // We support 1 video port. Must set CurrVideoPorts to 0 2355 // // We can't do interleaved bobbing yet - maybe in the future. 2356 // pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_VIDEOPORT | 2357 // DDCAPS2_CANBOBNONINTERLEAVED; 2358 // 2359 // pHALInfo->ddCaps.dwMaxVideoPorts = 1; 2360 // pHALInfo->ddCaps.dwCurrVideoPorts = 0; 2361 // 2362 // 2363 //#endif // SUPPORT_VIDEOPORT 2364 2365 2366 { 2367 // Overlay is free to use. 2368 pHALInfo->ddCaps.dwMaxVisibleOverlays = 1; 2369 pHALInfo->ddCaps.dwCurrVisibleOverlays = 0; 2370 2371 pHALInfo->ddCaps.dwCaps |= DDCAPS_OVERLAY | 2372 DDCAPS_OVERLAYFOURCC | 2373 DDCAPS_OVERLAYSTRETCH | 2374 DDCAPS_COLORKEYHWASSIST | 2375 DDCAPS_OVERLAYCANTCLIP; 2376 2377 pHALInfo->ddCaps.dwCKeyCaps |= DDCKEYCAPS_SRCOVERLAY | 2378 DDCKEYCAPS_SRCOVERLAYONEACTIVE | 2379 DDCKEYCAPS_SRCOVERLAYYUV | 2380 DDCKEYCAPS_DESTOVERLAY | 2381 DDCKEYCAPS_DESTOVERLAYONEACTIVE | 2382 DDCKEYCAPS_DESTOVERLAYYUV; 2383 2384 pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_OVERLAY; 2385 2386 pHALInfo->ddCaps.dwFXCaps |= DDFXCAPS_OVERLAYSHRINKX | 2387 DDFXCAPS_OVERLAYSHRINKXN | 2388 DDFXCAPS_OVERLAYSHRINKY | 2389 DDFXCAPS_OVERLAYSHRINKYN | 2390 DDFXCAPS_OVERLAYSTRETCHX | 2391 DDFXCAPS_OVERLAYSTRETCHXN | 2392 DDFXCAPS_OVERLAYSTRETCHY | 2393 DDFXCAPS_OVERLAYSTRETCHYN; 2394 2395 // Indicates that Perm3 has no stretch ratio limitation 2396 pHALInfo->ddCaps.dwMinOverlayStretch = 1; 2397 pHALInfo->ddCaps.dwMaxOverlayStretch = 32000; 2398 } 2399 } 2400 2401 //#ifdef W95_DDRAW 2402 //#ifdef USE_DD_CONTROL_COLOR 2403 // // Enable colour control asc brightness, contrast, gamma. 2404 // pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_COLORCONTROLPRIMARY; 2405 //#endif 2406 //#endif 2407 2408 // Also permit surfaces wider than the display buffer. 2409 pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_WIDESURFACES; 2410 #if 0 2411 // Enable copy blts betweemn Four CC formats for DShow acceleration 2412 pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_COPYFOURCC; 2413 #endif 2414 // Won't do Video-Sys mem Blits. 2415 pHALInfo->ddCaps.dwVSBCaps = 0; 2416 pHALInfo->ddCaps.dwVSBCKeyCaps = 0; 2417 pHALInfo->ddCaps.dwVSBFXCaps = 0; 2418 for( i=0;i<DD_ROP_SPACE;i++ ) 2419 { 2420 pHALInfo->ddCaps.dwVSBRops[i] = 0; 2421 } 2422 2423 // Won't do Sys-Sys mem Blits 2424 pHALInfo->ddCaps.dwSSBCaps = 0; 2425 pHALInfo->ddCaps.dwSSBCKeyCaps = 0; 2426 pHALInfo->ddCaps.dwSSBFXCaps = 0; 2427 for( i=0;i<DD_ROP_SPACE;i++ ) 2428 { 2429 pHALInfo->ddCaps.dwSSBRops[i] = 0; 2430 } 2431 2432 // 2433 // bit depths supported for alpha and Z 2434 // 2435 // pHALInfo->ddCaps.dwAlphaBltConstBitDepths = DDBD_2 | 2436 // DDBD_4 | 2437 // DDBD_8; 2438 // 2439 // pHALInfo->ddCaps.dwAlphaBltPixelBitDepths = DDBD_1 | 2440 // DDBD_8; 2441 // pHALInfo->ddCaps.dwAlphaBltSurfaceBitDepths = DDBD_1 | 2442 // DDBD_2 | 2443 // DDBD_4 | 2444 // DDBD_8; 2445 #if 0 2446 // No alpha blending for overlays, so I'm not sure what these should be. 2447 // Because we support 32bpp overlays, it's just that you can't use the 2448 // alpha bits for blending. Pass. 2449 pHALInfo->ddCaps.dwAlphaBltConstBitDepths = DDBD_2 | 2450 DDBD_4 | 2451 DDBD_8; 2452 2453 pHALInfo->ddCaps.dwAlphaBltPixelBitDepths = DDBD_1 | 2454 DDBD_8; 2455 2456 pHALInfo->ddCaps.dwAlphaBltSurfaceBitDepths = DDBD_1 | 2457 DDBD_2 | 2458 DDBD_4 | 2459 DDBD_8; 2460 2461 // 2462 // ROPS supported 2463 // 2464 for( i=0;i<DD_ROP_SPACE;i++ ) 2465 { 2466 pHALInfo->ddCaps.dwRops[i] = rops[i]; 2467 } 2468 #endif 2469 //Reenable: // For DX5 and beyond we support this new informational callback. 2470 // pHALInfo->GetDriverInfo = DdGetDriverInfo; 2471 // pHALInfo->dwFlags |= DDHALINFO_GETDRIVERINFOSET; 2472 // 2473 //#if DX8_DDI 2474 // // Flag our support for a new class of GUIDs that may come through 2475 // // GetDriverInfo for DX8 drivers. (This support will be compulsory) 2476 // pHALInfo->dwFlags |= DDHALINFO_GETDRIVERINFO2; 2477 //#endif DX8_DDI 2478 2479 return true; 2480 } // getDDHALInfo 2481 2482 #endif 2082 2483 2083 2484 static DECLCALLBACK(void) vboxVHWASurfBltCompletion(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext) -
trunk/src/VBox/Additions/WINNT/Graphics/Display/driver.h
r21611 r21939 110 110 uint32_t cBitsPerPixel; 111 111 bool bHidden; 112 VBOXVHWAREGION DirtyRegion; 112 VBOXVHWAREGION UpdatedMemRegion; 113 VBOXVHWAREGION NonupdatedMemRegion; 113 114 }VBOXVHWASURFDESC, *PVBOXVHWASURFDESC; 114 115 … … 307 308 void vboxVHWARegionInit(PVBOXVHWAREGION pReg); 308 309 void vboxVHWARegionClear(PVBOXVHWAREGION pReg); 310 bool vboxVHWARegionValid(PVBOXVHWAREGION pReg); 311 void vboxVHWARegionTrySubstitute(PVBOXVHWAREGION pReg, const RECTL *pRect); 309 312 310 313 VBOXVHWACMD* vboxVHWACommandCreate (PPDEV ppdev, VBOXVHWACMD_TYPE enmCmd, VBOXVHWACMD_LENGTH cbCmd); … … 314 317 void vboxVHWACommandSubmitAsynchByEvent (PPDEV ppdev, VBOXVHWACMD* pCmd, PEVENT pEvent); 315 318 void vboxVHWACommandCheckHostCmds(PPDEV ppdev); 319 void vboxVHWACommandSubmitAsynchAndComplete (PPDEV ppdev, VBOXVHWACMD* pCmd); 316 320 317 321 int vboxVHWAInitHostInfo1(PPDEV ppdev); -
trunk/src/VBox/Additions/WINNT/Graphics/Display/vbox.c
r21609 r21939 782 782 783 783 /* complete it asynchronously by setting event */ 784 pCmd->Flags |= VBOXVHWACMD_FLAG_ ASYNCH_EVENT;784 pCmd->Flags |= VBOXVHWACMD_FLAG_GH_ASYNCH_EVENT; 785 785 vboxHGSMIBufferSubmit (ppdev, pCmd); 786 786 787 if(!(ASMAtomicReadU32((volatile uint32_t *)&pCmd->Flags) & VBOXVHWACMD_FLAG_ ASYNCH))787 if(!(ASMAtomicReadU32((volatile uint32_t *)&pCmd->Flags) & VBOXVHWACMD_FLAG_HG_ASYNCH)) 788 788 { 789 789 /* the command is completed */ … … 800 800 if(brc) 801 801 { 802 pCmd->Flags = VBOXVHWACMD_FLAG_ASYNCH_IRQ;802 pCmd->Flags |= VBOXVHWACMD_FLAG_GH_ASYNCH_IRQ; 803 803 vboxVHWACommandSubmitAsynchByEvent (ppdev, pCmd, pEvent); 804 804 … … 822 822 pCmd->GuestVBVAReserved2 = (uintptr_t)pContext; 823 823 824 pCmd->Flags = 0;825 824 vboxHGSMIBufferSubmit (ppdev, pCmd); 826 825 827 if(!(pCmd->Flags & VBOXVHWACMD_FLAG_ASYNCH))826 if(!(pCmd->Flags & VBOXVHWACMD_FLAG_HG_ASYNCH)) 828 827 { 829 828 /* the command is completed */ 830 829 pfnCompletion(ppdev, pCmd, pContext); 830 } 831 } 832 833 static DECLCALLBACK(void) vboxVHWAFreeCmdCompletion(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext) 834 { 835 vboxVHWACommandFree(ppdev, pCmd); 836 } 837 838 void vboxVHWACommandSubmitAsynchAndComplete (PPDEV ppdev, VBOXVHWACMD* pCmd) 839 { 840 // Assert(0); 841 pCmd->GuestVBVAReserved1 = (uintptr_t)vboxVHWAFreeCmdCompletion; 842 843 pCmd->Flags |= VBOXVHWACMD_FLAG_GH_ASYNCH_NOCOMPLETION; 844 845 vboxHGSMIBufferSubmit (ppdev, pCmd); 846 847 if(!(pCmd->Flags & VBOXVHWACMD_FLAG_HG_ASYNCH) 848 || pCmd->Flags & VBOXVHWACMD_FLAG_HG_ASYNCH_RETURNED) 849 { 850 /* the command is completed */ 851 vboxVHWAFreeCmdCompletion(ppdev, pCmd, NULL); 831 852 } 832 853 } … … 919 940 int rc = VINF_SUCCESS; 920 941 921 if(pInfo) 942 Assert(pInfo); 943 if(!pInfo) 922 944 return VERR_OUT_OF_RESOURCES; 923 945 -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
r21596 r21939 1327 1327 { 1328 1328 /* schedule a DPC*/ 1329 BOOLEAN bResult = VideoPortQueueDpc(PrimaryExtension, VBoxVideoHGSMIDpc, NULL);1329 BOOLEAN bResult = VideoPortQueueDpc(PrimaryExtension, VBoxVideoHGSMIDpc, (PVOID)1); 1330 1330 Assert(bResult); 1331 1331 } -
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r21307 r21939 476 476 VirtualBox_SOURCES += $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc 477 477 $(VBOX_VIRTUALBOX4_OUT_DIR)/VirtualBoxBrand.qrc_RCCFLAGS = -name BRAND 478 478 ifdef VBOX_WITH_VIDEOHWACCEL 479 VirtualBox_SOURCES += VirtualBoxShaders.qrc 480 VirtualBoxShaders.qrc_RCCFLAGS = -name SHADERS 481 endif 482 479 483 # Import the translation source from VBoxUI.pro and add the qt_xx_YY counterparts 480 484 VirtualBox_QT_TRANSLATIONS := $(TRANSLATIONS) \ -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h
r21938 r21939 129 129 AddVDMUrlsEventType, 130 130 ChangeDockIconUpdateEventType 131 #ifdef VBOX_ WITH_VIDEOHWACCEL131 #ifdef VBOX_GUI_USE_QGL 132 132 , 133 133 VHWACommandProcessType -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxFrameBuffer.h
r21553 r21939 117 117 }; 118 118 119 #ifdef VBOX_WITH_VIDEOHWACCEL 119 #ifdef VBOX_GUI_USE_QGL 120 typedef enum 121 { 122 VBOXVHWA_PIPECMD_PAINT = 1, 123 VBOXVHWA_PIPECMD_VHWA, 124 125 }VBOXVHWA_PIPECMD_TYPE; 126 class VBoxVHWACommandElement 127 { 128 public: 129 void setVHWACmd(struct _VBOXVHWACMD * pCmd) 130 { 131 mType = VBOXVHWA_PIPECMD_VHWA; 132 mpCmd = pCmd; 133 } 134 135 void setPaintCmd(const QRect & aRect) 136 { 137 mType = VBOXVHWA_PIPECMD_PAINT; 138 mRect = aRect; 139 } 140 141 void setData(VBOXVHWA_PIPECMD_TYPE aType, void * pvData) 142 { 143 switch(aType) 144 { 145 case VBOXVHWA_PIPECMD_PAINT: 146 setPaintCmd(*((QRect*)pvData)); 147 break; 148 case VBOXVHWA_PIPECMD_VHWA: 149 setVHWACmd((struct _VBOXVHWACMD *)pvData); 150 break; 151 } 152 } 153 154 VBOXVHWA_PIPECMD_TYPE type() const {return mType;} 155 const QRect & rect() const {return mRect;} 156 struct _VBOXVHWACMD * vhwaCmd() const {return mpCmd;} 157 158 private: 159 VBoxVHWACommandElement * mpNext; 160 VBOXVHWA_PIPECMD_TYPE mType; 161 struct _VBOXVHWACMD * mpCmd; 162 QRect mRect; 163 164 friend class VBoxVHWACommandElementPipe; 165 friend class VBoxVHWACommandElementStack; 166 friend class VBoxGLWidget; 167 }; 168 169 class VBoxVHWACommandElementPipe 170 { 171 public: 172 VBoxVHWACommandElementPipe() : 173 mpFirst(NULL), 174 mpLast(NULL) 175 {} 176 177 void put(VBoxVHWACommandElement *pCmd) 178 { 179 if(mpLast) 180 { 181 Assert(mpFirst); 182 mpLast->mpNext = pCmd; 183 mpLast = pCmd; 184 } 185 else 186 { 187 Assert(!mpFirst); 188 mpFirst = pCmd; 189 mpLast = pCmd; 190 } 191 pCmd->mpNext= NULL; 192 193 } 194 195 VBoxVHWACommandElement * detachList() 196 { 197 if(mpLast) 198 { 199 VBoxVHWACommandElement * pHead = mpFirst; 200 mpFirst = NULL; 201 mpLast = NULL; 202 return pHead; 203 } 204 return NULL; 205 } 206 private: 207 VBoxVHWACommandElement *mpFirst; 208 VBoxVHWACommandElement *mpLast; 209 }; 210 211 class VBoxVHWACommandElementStack 212 { 213 public: 214 VBoxVHWACommandElementStack() : 215 mpFirst(NULL) {} 216 217 void push(VBoxVHWACommandElement *pCmd) 218 { 219 pCmd->mpNext = mpFirst; 220 mpFirst = pCmd; 221 } 222 223 void pusha(VBoxVHWACommandElement *pFirst, VBoxVHWACommandElement *pLast) 224 { 225 pLast->mpNext = mpFirst; 226 mpFirst = pFirst; 227 } 228 229 VBoxVHWACommandElement * pop() 230 { 231 if(mpFirst) 232 { 233 VBoxVHWACommandElement * ret = mpFirst; 234 mpFirst = ret->mpNext; 235 return ret; 236 } 237 return NULL; 238 } 239 private: 240 VBoxVHWACommandElement *mpFirst; 241 }; 242 120 243 class VBoxVHWACommandProcessEvent : public QEvent 121 244 { 122 245 public: 123 VBoxVHWACommandProcessEvent ( struct _VBOXVHWACMD * pCmd)246 VBoxVHWACommandProcessEvent (VBoxVHWACommandElement *pEl) 124 247 : QEvent ((QEvent::Type) VBoxDefs::VHWACommandProcessType) 125 , mpCmd (pCmd) {} 126 struct _VBOXVHWACMD * command() { return mpCmd; } 127 private: 128 struct _VBOXVHWACMD * mpCmd; 248 { 249 mCmdPipe.put(pEl); 250 } 251 VBoxVHWACommandElementPipe & pipe() { return mCmdPipe; } 252 private: 253 VBoxVHWACommandElementPipe mCmdPipe; 254 VBoxVHWACommandProcessEvent *mpNext; 255 256 friend class VBoxGLWidget; 129 257 }; 130 258 … … 251 379 virtual void moveEvent (QMoveEvent * /*me*/ ) {} 252 380 253 #ifdef VBOX_ WITH_VIDEOHWACCEL381 #ifdef VBOX_GUI_USE_QGL 254 382 /* this method is called from the GUI thread 255 383 * to perform the actual Video HW Acceleration command processing */ 256 virtual void doProcessVHWACommand( struct _VBOXVHWACMD * pCommand);384 virtual void doProcessVHWACommand(VBoxVHWACommandProcessEvent * pEvent); 257 385 #endif 258 386 … … 307 435 308 436 #if defined (VBOX_GUI_USE_QGL) 437 438 #ifdef DEBUG 439 #include "iprt/stream.h" 440 #define VBOXQGLLOG(_m) RTPrintf _m 441 #else 442 #define VBOXQGLLOG(_m) 443 #endif 444 #define VBOXQGLLOG_ENTER(_m) 445 //do{VBOXQGLLOG(("==>[%s]:", __FUNCTION__)); VBOXQGLLOG(_m);}while(0) 446 #define VBOXQGLLOG_EXIT(_m) 447 //do{VBOXQGLLOG(("<==[%s]:", __FUNCTION__)); VBOXQGLLOG(_m);}while(0) 448 #ifdef DEBUG 449 #define VBOXQGL_ASSERTNOERR() \ 450 do { GLenum err = glGetError(); \ 451 if(err != GL_NO_ERROR) VBOXQGLLOG(("gl error ocured (0x%x)\n", err)); \ 452 Assert(err == GL_NO_ERROR); \ 453 }while(0) 454 455 #define VBOXQGL_CHECKERR(_op) \ 456 do { \ 457 glGetError(); \ 458 _op \ 459 VBOXQGL_ASSERTNOERR(); \ 460 }while(0) 461 #else 462 #define VBOXQGL_ASSERTNOERR() \ 463 do {}while(0) 464 465 #define VBOXQGL_CHECKERR(_op) \ 466 do { \ 467 _op \ 468 }while(0) 469 #endif 470 471 #ifdef DEBUG 472 #include <iprt/time.h> 473 474 #define VBOXGETTIME() RTTimeNanoTS() 475 476 #define VBOXPRINTDIF(_nano, _m) do{\ 477 uint64_t cur = VBOXGETTIME(); \ 478 VBOXQGLLOG(_m); \ 479 VBOXQGLLOG(("(%Lu)\n", cur - (_nano))); \ 480 }while(0) 481 482 class VBoxVHWADbgTimeCounter 483 { 484 public: 485 VBoxVHWADbgTimeCounter(const char* msg) {mTime = VBOXGETTIME(); mMsg=msg;} 486 ~VBoxVHWADbgTimeCounter() {VBOXPRINTDIF(mTime, (mMsg));} 487 private: 488 uint64_t mTime; 489 const char* mMsg; 490 }; 491 492 #define VBOXQGLLOG_METHODTIME(_m) VBoxVHWADbgTimeCounter _dbgTimeCounter(_m) 493 #else 494 #define VBOXQGLLOG_METHODTIME(_m) 495 #endif 496 497 #define VBOXQGLLOG_QRECT(_p, _pr, _s) do{\ 498 VBOXQGLLOG((_p " x(%d), y(%d), w(%d), h(%d)" _s, (_pr)->x(), (_pr)->y(), (_pr)->width(), (_pr)->height()));\ 499 }while(0) 500 501 #define VBOXQGLLOG_CKEY(_p, _pck, _s) do{\ 502 VBOXQGLLOG((_p " l(%d), u(%d)" _s, (_pck)->lower(), (_pck)->upper()));\ 503 }while(0) 504 309 505 class VBoxVHWADirtyRect 310 506 { … … 398 594 uint32_t mLower; 399 595 }; 400 401 //class VBoxVHWAColorKeyRef402 //{403 //public:404 // VBoxVHWAColorKeyRef() : mValid(false){}405 //406 // bool isValid() {return mValid; }407 //408 // VBoxVHWAColorKey * ckey() { isVreturn mpCKey; }409 // const VBoxVHWAColorKey * constckey() const { return mpCKey; }410 //411 // void invalidate() { mValid = false; }412 // void set(VBoxVHWAColorKey * pKey) { mValid = false; }413 //414 //private:415 // VBoxVHWAColorKey * mpCKey;416 // bool mValid;417 //};418 596 419 597 class VBoxVHWAColorComponent … … 448 626 // VBoxVHWAColorFormat(GLint aInternalFormat, GLenum aFormat, GLenum aType, uint32_t aDataFormat); 449 627 VBoxVHWAColorFormat(uint32_t bitsPerPixel, uint32_t r, uint32_t g, uint32_t b); 450 628 VBoxVHWAColorFormat(uint32_t fourcc); 629 VBoxVHWAColorFormat(){} 451 630 GLint internalFormat() const {return mInternalFormat; } 452 631 GLenum format() const {return mFormat; } 453 632 GLenum type() const {return mType; } 454 633 bool isValid() const {return mBitsPerPixel != 0; } 455 uint32_t dataFormat() const {return mDataFormat;}634 uint32_t fourcc() const {return mDataFormat;} 456 635 uint32_t bitsPerPixel() const { return mBitsPerPixel; } 636 uint32_t bitsPerPixelDd() const { return mBitsPerPixelDd; } 457 637 void pixel2Normalized(uint32_t pix, float *r, float *g, float *b) const; 638 uint32_t widthCompression() const {return mWidthCompression;} 639 uint32_t heightCompression() const {return mHeightCompression;} 458 640 // uint32_t r(uint32_t pix); 459 641 // uint32_t g(uint32_t pix); … … 462 644 private: 463 645 void VBoxVHWAColorFormat::init(uint32_t bitsPerPixel, uint32_t r, uint32_t g, uint32_t b); 646 void VBoxVHWAColorFormat::init(uint32_t fourcc); 464 647 465 648 GLint mInternalFormat; … … 469 652 470 653 uint32_t mBitsPerPixel; 471 654 uint32_t mBitsPerPixelDd; 655 uint32_t mWidthCompression; 656 uint32_t mHeightCompression; 472 657 VBoxVHWAColorComponent mR; 473 658 VBoxVHWAColorComponent mG; 474 659 VBoxVHWAColorComponent mB; 660 VBoxVHWAColorComponent mA; 661 }; 662 663 class VBoxVHWATexture 664 { 665 public: 666 VBoxVHWATexture() {} 667 VBoxVHWATexture(const QRect * pRect, const VBoxVHWAColorFormat *pFormat); 668 void init(uchar *pvMem); 669 void setAddress(uchar *pvMem) {mAddress = pvMem;} 670 void uninit(); 671 void update(const QRect * pRect); 672 GLuint texture() {return mTexture;} 673 const QRect & texRect() {return mTexRect;} 674 const QRect & rect() {return mRect;} 675 uchar * address(){ return mAddress; } 676 uchar * pointAddress(int x, int y) 677 { 678 x = toXTex(x); 679 y = toYTex(y); 680 return pointAddressTex(x, y); 681 } 682 uchar * pointAddressTex(int x, int y) { return mAddress + y*mBytesPerLine + x*mBytesPerPixel; } 683 int toXTex(int x) {return x/mColorFormat.widthCompression();} 684 int toYTex(int y) {return y/mColorFormat.heightCompression();} 685 ulong memSize(){ return mBytesPerLine * mRect.height()/mColorFormat.heightCompression(); } 686 private: 687 uchar * mAddress; 688 GLuint mTexture; 689 uint32_t mBytesPerPixel; 690 uint32_t mBytesPerLine; 691 QRect mTexRect; /* texture size */ 692 QRect mRect; /* img size */ 693 VBoxVHWAColorFormat mColorFormat; 475 694 }; 476 695 … … 498 717 { 499 718 public: 500 VBoxVHWASurfaceBase(class VBoxVHWAGlContextState *aState, bool aIsYInverted, const QSize * aSize, const QSize * aTargetSize, 719 VBoxVHWASurfaceBase( 720 class VBoxGLWidget *mWidget, 721 #if 0 722 class VBoxVHWAGlContextState *aState, 723 bool aIsYInverted, 724 #endif 725 const QSize * aSize, const QSize * aTargetSize, 501 726 VBoxVHWAColorFormat & aColorFormat, 502 727 VBoxVHWAColorKey * pSrcBltCKey, VBoxVHWAColorKey * pDstBltCKey, … … 505 730 virtual ~VBoxVHWASurfaceBase(); 506 731 507 virtual void init(uchar *pvMem); 508 509 virtual void uninit(); 732 void init(VBoxVHWASurfaceBase * pPrimary, uchar *pvMem); 733 void setupMatricies(VBoxVHWASurfaceBase *pPrimary); 734 735 void uninit(); 510 736 511 737 static void globalInit(); 512 738 513 int blt(const QRect * aDstRect, VBoxVHWASurfaceBase * aSrtSurface, const QRect * aSrcRect, const VBoxVHWAColorKey * pDstCKeyOverride, const VBoxVHWAColorKey * pSrcCKeyOverride);514 int overlay(VBoxVHWASurfaceBase * aOverlaySurface);515 516 virtualint lock(const QRect * pRect, uint32_t flags);517 518 virtualint unlock();739 // int blt(const QRect * aDstRect, VBoxVHWASurfaceBase * aSrtSurface, const QRect * aSrcRect, const VBoxVHWAColorKey * pDstCKeyOverride, const VBoxVHWAColorKey * pSrcCKeyOverride); 740 // int overlay(VBoxVHWASurfaceBase * aOverlaySurface); 741 742 int lock(const QRect * pRect, uint32_t flags); 743 744 int unlock(); 519 745 520 746 void updatedMem(const QRect * aRect); 521 747 522 void performDisplay( );523 524 void setRects( const QRect * aTargRect, const QRect * aSrcRect);525 void setTargetRectPosition( const QPoint * aPoint);748 void performDisplay(VBoxVHWASurfaceBase *pPrimary); 749 750 void setRects(VBoxVHWASurfaceBase *pPrimary, const QRect * aTargRect, const QRect * aSrcRect); 751 void setTargetRectPosition(VBoxVHWASurfaceBase *pPrimary, const QPoint * aPoint); 526 752 527 753 static ulong calcBytesPerPixel(GLenum format, GLenum type); … … 531 757 bool addressAlocated() const { return mFreeAddress; } 532 758 uchar * address(){ return mAddress; } 533 uchar * pointAddress(int x, int y) { return mAddress + y*mBytesPerLine + x*mBytesPerPixel; } 534 ulong memSize() { return mBytesPerLine * mRect.height(); }759 760 ulong memSize(); 535 761 536 762 ulong width() { return mRect.width(); } … … 540 766 GLint internalFormat() { return mColorFormat.internalFormat(); } 541 767 GLenum type() { return mColorFormat.type(); } 542 uint32_t dataFormat() {return mColorFormat.dataFormat(); }768 uint32_t fourcc() {return mColorFormat.fourcc(); } 543 769 544 770 ulong bytesPerPixel() { return mBytesPerPixel; } 545 771 ulong bitsPerPixel() { return mColorFormat.bitsPerPixel(); } 772 ulong bitsPerPixelDd() { return mColorFormat.bitsPerPixelDd(); } 546 773 ulong bytesPerLine() { return mBytesPerLine; } 547 774 … … 633 860 } 634 861 862 const VBoxVHWAColorKey * getActiveSrcOverlayCKey() 863 { 864 return mpSrcOverlayCKey; 865 } 866 867 const VBoxVHWAColorKey * getActiveDstOverlayCKey(VBoxVHWASurfaceBase * pPrimary) 868 { 869 return mpDstOverlayCKey ? mpDefaultDstOverlayCKey : pPrimary->mpDstOverlayCKey; 870 } 635 871 636 872 const VBoxVHWAColorFormat & colorFormat() {return mColorFormat; } 637 873 638 874 /* clients should treat the returned texture as read-only */ 639 GLuint textureSynched(const QRect * aRect) { synchTex(aRect);return mTexture; }875 // GLuint textureSynched(const QRect * aRect) { /*synchTex(aRect); */synchTexMem(aRect); return mTexture; } 640 876 641 877 void setAddress(uchar * addr); 642 878 643 879 const QRect& rect() {return mRect;} 880 const QRect& texRect() {return mTexRect;} 644 881 645 882 // /* surface currently being displayed in a flip chain */ … … 647 884 // /* surface representing the main framebuffer. */ 648 885 // virtual bool isMainFramebuffer() = 0; 886 #if 0 649 887 virtual void makeCurrent() = 0; 650 888 virtual void makeYInvertedCurrent() = 0; 651 652 889 bool isYInverted() {return mIsYInverted; } 653 890 654 bool isHidden() {return mIsHidden; } 655 void setHidden(bool hidden) { mIsHidden = hidden; } 656 891 bool isHidden() {return mIsYInverted; } 892 void setHidden(bool hidden) 893 { 894 if(hidden == mIsYInverted) 895 return; 896 897 invert(); 898 } 657 899 int invert(); 658 900 659 901 bool isFrontBuffer() {return !mIsYInverted; } 902 #endif 903 904 class VBoxVHWASurfList * getComplexList() {return mComplexList; } 660 905 661 906 // bool isOverlay() { return mIsOverlay; } 662 907 663 908 #ifdef VBOX_WITH_VIDEOHWACCEL 664 virtual class VBoxVHWAGlProgramMngr * getGlProgramMngr() = 0; 665 static int setCKey(class VBoxVHWAGlProgramVHWA * pProgram, const VBoxVHWAColorFormat * pFormat, const VBoxVHWAColorKey * pCKey); 666 #endif 667 private: 668 void initDisplay(); 909 class VBoxVHWAGlProgramMngr * getGlProgramMngr(); 910 static int setCKey(class VBoxVHWAGlProgramVHWA * pProgram, const VBoxVHWAColorFormat * pFormat, const VBoxVHWAColorKey * pCKey, bool bDst); 911 #endif 912 private: 913 void setComplexList(VBoxVHWASurfList *aComplexList) { mComplexList = aComplexList; } 914 void initDisplay(VBoxVHWASurfaceBase *pPrimary); 669 915 void deleteDisplay(); 670 void initDisplay(bool bInverted); 671 void deleteDisplay(bool bInverted); 672 GLuint createDisplay(bool bInverted); 916 // void initDisplay(bool bInverted); 917 // void deleteDisplay(bool bInverted); 918 GLuint createDisplay(VBoxVHWASurfaceBase *pPrimary 919 #if 0 920 bool bInverted 921 #endif 922 ); 923 void doDisplay(VBoxVHWASurfaceBase *pPrimary, VBoxVHWAGlProgramVHWA * pProgram, bool bBindDst); 924 void synchTexMem(const QRect * aRect); 925 #if 0 673 926 void synchTex(const QRect * aRect); 674 void synchTexMem(const QRect * aRect);675 927 void synchTexFB(const QRect * aRect); 676 928 void synchMem(const QRect * aRect); 677 929 void synchFB(const QRect * aRect); 678 930 void synch(const QRect * aRect); 679 931 #endif 680 932 int performBlt(const QRect * pDstRect, VBoxVHWASurfaceBase * pSrcSurface, const QRect * pSrcRect, const VBoxVHWAColorKey * pDstCKey, const VBoxVHWAColorKey * pSrcCKey, bool blt); 681 933 682 934 // void doTex2FB(const QRect * aRect); 683 935 void doTex2FB(const QRect * pDstRect, const QRect * pSrcRect); 684 685 void doSetupMatrix(const QSize * pSize, bool bInverted); 936 void doMultiTex2FB(const QRect * pDstRect, const QRect * pDstTexSize, const QRect * pSrcRect, int cSrcTex); 937 void doMultiTex2FB(const QRect * pDstRect, const QRect * pSrcRect, int cSrcTex); 938 // void doMultiTex2FB(GLenum tex, const QRect * pDstRect, const QRect * pSrcRect); 939 940 void doSetupMatrix(const QSize * pSize , bool bInverted); 686 941 687 942 QRect mRect; /* == Inv FB size */ … … 691 946 QRect mTargRect; /* == Vis FB size */ 692 947 QRect mTargSize; 693 948 #if 0 694 949 GLuint mYInvertedDisplay; 950 #endif 695 951 GLuint mVisibleDisplay; 696 952 #if 0 697 953 bool mYInvertedDisplayInitialized; 954 #endif 698 955 bool mVisibleDisplayInitialized; 699 956 700 957 uchar * mAddress; 701 GLuint mTexture;958 VBoxVHWATexture mTex[3]; 702 959 703 960 VBoxVHWAColorFormat mColorFormat; … … 730 987 /* memory buffer not reflected in fm and texture, e.g if memory buffer is replaced or in case of lock/unlock */ 731 988 VBoxVHWADirtyRect mUpdateMem2TexRect; 989 #if 0 732 990 /* memory buffer not reflected in fm and texture, e.g if memory buffer is replaced or in case of lock/unlock */ 733 991 VBoxVHWADirtyRect mUpdateTex2FBRect; … … 736 994 /*in case of blit the memory buffer does not get updated until we need it, e.g. for paint or lock operations */ 737 995 VBoxVHWADirtyRect mUpdateFB2MemRect; 738 739 /* flag for lazy invert post-processing */ 740 bool mInverted; 996 #endif 741 997 742 998 bool mFreeAddress; 743 999 #if 0 744 1000 bool mIsYInverted; 745 746 bool mIsHidden; 747 748 // bool mIsOverlay; 749 1001 #endif 1002 1003 class VBoxVHWASurfList *mComplexList; 1004 1005 class VBoxGLWidget *mWidget; 750 1006 protected: 1007 #if 0 751 1008 virtual void init(uchar *pvMem, bool bInverted); 752 753 1009 class VBoxVHWAGlContextState *mState; 754 1010 #endif 1011 1012 friend class VBoxVHWASurfList; 1013 1014 }; 1015 1016 typedef std::list <VBoxVHWASurfaceBase*> SurfList; 1017 1018 class VBoxVHWASurfList 1019 { 1020 public: 1021 1022 VBoxVHWASurfList() : mCurrent(NULL) {} 1023 void add(VBoxVHWASurfaceBase *pSurf) 1024 { 1025 VBoxVHWASurfList * pOld = pSurf->getComplexList(); 1026 if(pOld) 1027 { 1028 pOld->remove(pSurf); 1029 } 1030 mSurfaces.push_back(pSurf); 1031 pSurf->setComplexList(this); 1032 } 1033 1034 void clear() 1035 { 1036 for (SurfList::iterator it = mSurfaces.begin(); 1037 it != mSurfaces.end(); ++ it) 1038 { 1039 (*it)->setComplexList(NULL); 1040 } 1041 mSurfaces.clear(); 1042 mCurrent = NULL; 1043 } 1044 1045 void remove(VBoxVHWASurfaceBase *pSurf) 1046 { 1047 mSurfaces.remove(pSurf); 1048 pSurf->setComplexList(NULL); 1049 if(mCurrent == pSurf) 1050 mCurrent = NULL; 1051 } 1052 1053 bool empty() { return mSurfaces.empty(); } 1054 1055 void setCurrentVisible(VBoxVHWASurfaceBase *pSurf) 1056 { 1057 mCurrent = pSurf; 1058 } 1059 1060 VBoxVHWASurfaceBase * current() { return mCurrent; } 1061 const SurfList & surfaces() const {return mSurfaces;} 1062 1063 private: 1064 1065 SurfList mSurfaces; 1066 VBoxVHWASurfaceBase* mCurrent; 755 1067 }; 756 1068 … … 759 1071 public: 760 1072 VBoxVHWADisplay() : 761 mSurfVGA(NULL), 762 mSurfPrimary(NULL) 1073 mSurfVGA(NULL) 1074 // , 1075 // mSurfPrimary(NULL) 763 1076 {} 764 1077 … … 767 1080 VBoxVHWASurfaceBase * old = mSurfVGA; 768 1081 mSurfVGA = pVga; 769 mSurfPrimary = pVga; 1082 mPrimary.clear(); 1083 if(pVga) 1084 { 1085 mPrimary.add(pVga); 1086 mPrimary.setCurrentVisible(pVga); 1087 } 1088 // mSurfPrimary = pVga; 770 1089 mOverlays.clear(); 771 1090 return old; … … 779 1098 VBoxVHWASurfaceBase * getPrimary() 780 1099 { 781 return m SurfPrimary;782 } 783 784 void setPrimary(VBoxVHWASurfaceBase* pSurf)785 {786 mSurfPrimary = pSurf;787 }788 789 void addOverlay(VBoxVHWASurf aceBase* pSurf)1100 return mPrimary.current(); 1101 } 1102 // 1103 // void setPrimary(VBoxVHWASurfList * pSurf) 1104 // { 1105 // mSurfPrimary = pSurf; 1106 // } 1107 1108 void addOverlay(VBoxVHWASurfList * pSurf) 790 1109 { 791 1110 mOverlays.push_back(pSurf); 792 1111 } 793 1112 794 void checkAddOverlay(VBoxVHWASurf aceBase* pSurf)1113 void checkAddOverlay(VBoxVHWASurfList * pSurf) 795 1114 { 796 1115 if(!hasOverlay(pSurf)) … … 798 1117 } 799 1118 800 bool hasOverlay(VBoxVHWASurf aceBase* pSurf)1119 bool hasOverlay(VBoxVHWASurfList * pSurf) 801 1120 { 802 1121 for (OverlayList::iterator it = mOverlays.begin(); … … 811 1130 } 812 1131 813 void removeOverlay(VBoxVHWASurf aceBase* pSurf)1132 void removeOverlay(VBoxVHWASurfList * pSurf) 814 1133 { 815 1134 mOverlays.remove(pSurf); 816 1135 } 817 1136 818 void flip(VBoxVHWASurfaceBase * pTarg, VBoxVHWASurfaceBase * pCurr)819 {820 pCurr->invert();821 pTarg->invert();822 if(pCurr == mSurfPrimary) /* flip of the primary surface */823 {824 mSurfPrimary = pTarg;825 }826 else /* flip of the overlay */827 {828 for (OverlayList::iterator it = mOverlays.begin();829 it != mOverlays.end(); ++ it)830 {831 if((*it) == pCurr)832 {833 (*it) = pTarg;834 pCurr->setHidden(false);835 break;836 }837 }838 }839 }840 1137 841 1138 void performDisplay() 842 1139 { 843 mSurfPrimary->performDisplay(); 1140 VBoxVHWASurfaceBase * pPrimary = mPrimary.current(); 1141 pPrimary->performDisplay(NULL); 844 1142 845 1143 for (OverlayList::const_iterator it = mOverlays.begin(); 846 1144 it != mOverlays.end(); ++ it) 847 1145 { 848 mSurfPrimary->overlay(*it); 1146 VBoxVHWASurfaceBase * pOverlay = (*it)->current(); 1147 if(pOverlay) 1148 { 1149 pOverlay->performDisplay(pPrimary); 1150 // pPrimary->overlay(pOverlay); 1151 } 849 1152 } 850 1153 } … … 852 1155 private: 853 1156 VBoxVHWASurfaceBase *mSurfVGA; 854 VBoxVHWASurf aceBase *mSurfPrimary;855 856 typedef std::list <VBoxVHWASurf aceBase*> OverlayList;1157 VBoxVHWASurfList mPrimary; 1158 1159 typedef std::list <VBoxVHWASurfList*> OverlayList; 857 1160 858 1161 OverlayList mOverlays; 859 1162 }; 860 1163 861 862 863 class VBoxVHWAGlContextState864 {865 public:866 VBoxVHWAGlContextState() : mContext(NULL), mInverted(false) {}867 868 void assertCurrent(class VBoxVHWASurfaceBase *aContext, bool bInverted)869 {870 mContext = aContext;871 if(aContext && aContext->isYInverted())872 {873 mInverted = true;874 }875 else876 {877 mInverted = bInverted;878 }879 }880 881 void makeYInvertedCurrent(class VBoxVHWASurfaceBase *aContext)882 {883 if(mContext != aContext)884 {885 // aContext->makeCurrent();886 aContext->makeYInvertedCurrent();887 assertCurrent(aContext, true);888 }889 else890 {891 if(!aContext->isYInverted() && !mInverted)892 {893 // aContext->makeCurrent();894 aContext->makeYInvertedCurrent();895 mInverted = true;896 }897 }898 }899 900 void makeCurrent(class VBoxVHWASurfaceBase *aContext)901 {902 if(mContext != aContext)903 {904 aContext->makeCurrent();905 assertCurrent(aContext, false);906 }907 else908 {909 if(!aContext->isYInverted() && mInverted)910 {911 aContext->makeCurrent();912 mInverted = false;913 }914 }915 }916 917 void makeCurrent(class VBoxVHWASurfaceBase *aContext, bool mInverted)918 {919 if(mInverted)920 {921 makeYInvertedCurrent(aContext);922 }923 else924 {925 makeCurrent(aContext);926 }927 }928 929 class VBoxVHWASurfaceBase * getCurrent() {return mContext; }930 bool isCurrentYInverted() {return mInverted; }931 932 private:933 934 class VBoxVHWASurfaceBase *mContext;935 bool mInverted;936 };937 938 class VBoxVHWASurfaceQGL : public VBoxVHWASurfaceBase939 {940 public:941 VBoxVHWASurfaceQGL(class VBoxVHWAGlContextState *aState, const QSize * aSize, const QSize * aTargetSize,942 VBoxVHWAColorFormat & aColorFormat,943 VBoxVHWAColorKey * pSrcBltCKey, VBoxVHWAColorKey * pDstBltCKey,944 VBoxVHWAColorKey * pSrcOverlayCKey, VBoxVHWAColorKey * pDstOverlayCKey,945 class VBoxGLWidget *pWidget,946 bool bInvisibleBuffer) :947 VBoxVHWASurfaceBase(aState, bInvisibleBuffer, aSize, aTargetSize,948 aColorFormat,949 pSrcBltCKey, pDstBltCKey, pSrcOverlayCKey, pDstOverlayCKey),950 mWidget(pWidget),951 mBuffer(NULL)952 {}953 954 ~VBoxVHWASurfaceQGL();955 956 void makeCurrent();957 void makeYInvertedCurrent();958 959 void init(uchar *pvMem);960 961 void uninit();962 963 // int unlock()964 // {965 // int rc = VBoxVHWASurfaceBase::unlock();966 // if(!mBuffer)967 // performDisplay();968 // return rc;969 // }970 #ifdef VBOX_WITH_VIDEOHWACCEL971 class VBoxVHWAGlProgramMngr * getGlProgramMngr();972 #endif973 private:974 class VBoxGLWidget *mWidget;975 class QGLPixelBuffer *mBuffer;976 protected:977 virtual void init(uchar *pvMem, bool bInverted);978 };979 980 1164 class VBoxGLWidget : public QGLWidget 981 1165 { 982 1166 public: 983 VBoxGLWidget ( QWidget *aParent);1167 VBoxGLWidget (VBoxConsoleView *aView, QWidget *aParent); 984 1168 ~VBoxGLWidget(); 985 1169 … … 1000 1184 void vboxTestSurfaces () {vboxPerformGLOp(&VBoxGLWidget::vboxDoTestSurfaces, NULL);} 1001 1185 #endif 1186 void vboxProcessVHWACommands(VBoxVHWACommandProcessEvent * pEvent) {vboxPerformGLOp(&VBoxGLWidget::vboxDoProcessVHWACommands, pEvent);} 1002 1187 #ifdef VBOX_WITH_VIDEOHWACCEL 1003 1188 void vboxVHWACmd (struct _VBOXVHWACMD * pCmd) {vboxPerformGLOp(&VBoxGLWidget::vboxDoVHWACmd, pCmd);} 1004 class VBoxVHWAGlProgramMngr * vboxVHWAGetGlProgramMngr() ;1189 class VBoxVHWAGlProgramMngr * vboxVHWAGetGlProgramMngr() { return mpMngr; } 1005 1190 #endif 1006 1191 1007 1192 VBoxVHWASurfaceBase * vboxGetVGASurface() { return mDisplay.getVGA(); } 1193 1194 void postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * pvData); 1008 1195 protected: 1009 1196 // void resizeGL (int height, int width); … … 1011 1198 void paintGL() 1012 1199 { 1013 Assert(mState.getCurrent() == NULL); 1014 /* we are called with QGLWidget context */ 1015 mState.assertCurrent(mDisplay.getVGA(), false); 1016 (this->*mpfnOp)(mOpContext); 1017 /* restore the context */ 1018 mState.makeCurrent(mDisplay.getVGA()); 1019 /* clear*/ 1020 mState.assertCurrent(NULL, false); 1200 // Assert(mState.getCurrent() == NULL); 1201 // /* we are called with QGLWidget context */ 1202 // mState.assertCurrent(mDisplay.getVGA(), false); 1203 if(mpfnOp) 1204 { 1205 (this->*mpfnOp)(mOpContext); 1206 mpfnOp = NULL; 1207 } 1208 else 1209 { 1210 mDisplay.performDisplay(); 1211 } 1212 // /* restore the context */ 1213 // mState.makeCurrent(mDisplay.getVGA()); 1214 // /* clear*/ 1215 // mState.assertCurrent(NULL, false); 1021 1216 } 1022 1217 1023 1218 void initializeGL(); 1024 1025 1219 private: 1026 1220 // void vboxDoInitDisplay(); … … 1029 1223 void vboxDoResize(void *re); 1030 1224 void vboxDoPaint(void *rec); 1225 1226 void vboxDoUpdateRect(const QRect * pRect); 1031 1227 #ifdef DEBUG_misha 1032 1228 void vboxDoTestSurfaces(void *context); … … 1057 1253 int vhwaQueryInfo1(struct _VBOXVHWACMD_QUERYINFO1 *pCmd); 1058 1254 int vhwaQueryInfo2(struct _VBOXVHWACMD_QUERYINFO2 *pCmd); 1059 #endif 1255 1256 void vhwaDoSurfaceOverlayUpdate(VBoxVHWASurfaceBase *pDstSurf, VBoxVHWASurfaceBase *pSrcSurf, struct _VBOXVHWACMD_SURF_OVERLAY_UPDATE *pCmd); 1257 #endif 1258 static const QGLFormat & vboxGLFormat(); 1060 1259 1061 1260 // VBoxVHWASurfaceQGL * pDisplay; … … 1067 1266 void vboxPerformGLOp(PFNVBOXQGLOP pfn, void* pContext) {mpfnOp = pfn; mOpContext = pContext; updateGL();} 1068 1267 1268 void cmdPipeInit(); 1269 void cmdPipeDelete(); 1270 void vboxDoProcessVHWACommands(void *pContext); 1271 1272 VBoxVHWACommandElement * detachCmdList(VBoxVHWACommandElement * pFirst2Free, VBoxVHWACommandElement * pLast2Free); 1273 VBoxVHWACommandElement * processCmdList(VBoxVHWACommandElement * pCmd); 1274 1069 1275 PFNVBOXQGLOP mpfnOp; 1070 1276 void *mOpContext; … … 1073 1279 ulong mPixelFormat; 1074 1280 bool mUsesGuestVRAM; 1075 1281 #if 0 1076 1282 VBoxVHWAGlContextState mState; 1283 #endif 1284 1285 RTCRITSECT mCritSect; 1286 VBoxVHWACommandProcessEvent *mpFirstEvent; 1287 VBoxVHWACommandProcessEvent *mpLastEvent; 1288 bool mbNewEvent; 1289 VBoxVHWACommandElementStack mFreeElements; 1290 VBoxVHWACommandElement mElementsBuffer[2048]; 1291 1292 VBoxConsoleView *mView; 1293 1294 VBoxVHWASurfList *mConstructingList; 1295 int32_t mcRemaining2Contruct; 1077 1296 1078 1297 #ifdef VBOX_WITH_VIDEOHWACCEL … … 1090 1309 STDMETHOD(NotifyUpdate) (ULONG aX, ULONG aY, 1091 1310 ULONG aW, ULONG aH); 1311 #ifdef VBOXQGL_PROF_BASE 1312 STDMETHOD(RequestResize) (ULONG aScreenId, ULONG aPixelFormat, 1313 BYTE *aVRAM, ULONG aBitsPerPixel, ULONG aBytesPerLine, 1314 ULONG aWidth, ULONG aHeight, 1315 BOOL *aFinished); 1316 #endif 1092 1317 1093 1318 #ifdef VBOX_WITH_VIDEOHWACCEL … … 1104 1329 void paintEvent (QPaintEvent *pe); 1105 1330 void resizeEvent (VBoxResizeEvent *re); 1106 #ifdef VBOX_WITH_VIDEOHWACCEL 1107 void doProcessVHWACommand(struct _VBOXVHWACMD * pCommand); 1108 #endif 1331 void doProcessVHWACommand(VBoxVHWACommandProcessEvent * pEvent); 1109 1332 1110 1333 private: -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
r21772 r21939 772 772 setFrameStyle (QFrame::NoFrame); 773 773 774 #ifndef VBOX_WITH_VIDEOHWACCEL 774 #ifdef VBOX_GUI_USE_QGL 775 QWidget *pViewport; 776 switch (mode) 777 { 778 case VBoxDefs::QGLMode: 779 pViewport = new VBoxGLWidget (this, this); 780 break; 781 default: 782 pViewport = new VBoxViewport (this); 783 } 784 #else 775 785 VBoxViewport *pViewport = new VBoxViewport (this); 776 #else777 // /* TODO: temporary always use VBoxGLWidget for debugging */778 VBoxGLWidget *pViewport = new VBoxGLWidget (this);779 786 #endif 780 787 setViewport (pViewport); … … 1325 1332 return true; 1326 1333 } 1334 1335 #ifdef VBOX_GUI_USE_QGL 1336 case VBoxDefs::VHWACommandProcessType: 1337 { 1338 VBoxVHWACommandProcessEvent *cmde = (VBoxVHWACommandProcessEvent *)e; 1339 mFrameBuf->doProcessVHWACommand(cmde); 1340 return true; 1341 } 1342 #endif 1327 1343 1328 1344 case VBoxDefs::SetRegionEventType: … … 1689 1705 } 1690 1706 #endif 1691 #ifdef VBOX_WITH_VIDEOHWACCEL1692 case VBoxDefs::VHWACommandProcessType:1693 {1694 VBoxVHWACommandProcessEvent *cmde = (VBoxVHWACommandProcessEvent *)e;1695 mFrameBuf->doProcessVHWACommand(cmde->command());1696 return true;1697 }1698 #endif1699 1707 default: 1700 1708 break; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFrameBuffer.cpp
r21520 r21939 30 30 #include <QPainter> 31 31 32 #ifdef VBOX_WITH_VIDEOHWACCEL33 #include <VBox/VBoxVideo.h>34 #endif35 36 32 // 37 33 // VBoxFrameBuffer class … … 272 268 } 273 269 274 #ifdef VBOX_ WITH_VIDEOHWACCEL275 void VBoxFrameBuffer::doProcessVHWACommand( struct _VBOXVHWACMD * pCommand)276 { 277 pCommand->rc = VERR_NOT_IMPLEMENTED;278 CDisplay display = mView->console().GetDisplay();279 Assert (!display.isNull());280 281 display.CompleteVHWACommand((BYTE*)pCommand);270 #ifdef VBOX_GUI_USE_QGL 271 void VBoxFrameBuffer::doProcessVHWACommand(VBoxVHWACommandProcessEvent * pEvent) 272 { 273 // pCommand->rc = VERR_NOT_IMPLEMENTED; 274 // CDisplay display = mView->console().GetDisplay(); 275 // Assert (!display.isNull()); 276 // 277 // display.CompleteVHWACommand((BYTE*)pCommand); 282 278 } 283 279 #endif
Note:
See TracChangeset
for help on using the changeset viewer.