Changeset 50940 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
- Timestamp:
- Apr 1, 2014 11:22:34 AM (11 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPCr.cpp
r50913 r50940 16 16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 17 17 */ 18 #ifdef VBOX_WITH_CROGL 18 19 19 20 #include "VBoxMPWddm.h" … … 22 23 #include <VBox/HostServices/VBoxCrOpenGLSvc.h> 23 24 24 #ifdef VBOX_WITH_CROGL25 25 #include <cr_protocol.h> 26 26 … … 746 746 } 747 747 748 #endif749 750 748 static int vboxMpCrCtlAddRef(PVBOXMP_CRCTLCON pCrCtlCon) 751 749 { … … 1012 1010 g_VBoxMpCrHostCaps = 0; 1013 1011 1014 #ifdef VBOX_WITH_CROGL1015 1012 VBOXMP_CRCTLCON CrCtlCon = {0}; 1016 1013 uint32_t u32ClientID = 0; … … 1038 1035 if (RT_FAILURE(rc)) 1039 1036 WARN(("VBoxMpCrCtlConDisconnectHgcm failed rc (%d), ignoring..", rc)); 1040 #endif1041 1037 } 1042 1038 … … 1073 1069 } 1074 1070 1071 #endif -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPCr.h
r50859 r50940 18 18 #ifndef ___VBoxMPCr_h__ 19 19 #define ___VBoxMPCr_h__ 20 21 #ifdef VBOX_WITH_CROGL 20 22 21 23 #include <VBox/VBoxGuestLib.h> … … 216 218 #define VBOXMP_CRCMD_SIZE_DESTROYCONTEXT (12 + 4) 217 219 220 #endif /* #ifdef VBOX_WITH_CROGL */ 221 218 222 #endif /* #ifndef ___VBoxMPCr_h__ */ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp
r50927 r50940 180 180 return NULL; 181 181 } 182 182 #ifdef VBOX_WITH_CROGL 183 183 PVBOXWDDM_SWAPCHAIN vboxWddmSwapchainCreate(UINT w, UINT h) 184 184 { … … 572 572 vboxWddmHTableDestroy(&pContext->Swapchains); 573 573 } 574 574 #endif 575 575 NTSTATUS vboxWddmRegQueryDrvKeyName(PVBOXMP_DEVEXT pDevExt, ULONG cbBuf, PWCHAR pBuf, PULONG pcbResult) 576 576 { -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.h
r48070 r50940 70 70 PVOID vboxWddmHTableGet(PVBOXWDDM_HTABLE pTbl, VBOXWDDM_HANDLE hHandle); 71 71 72 72 #ifdef VBOX_WITH_CROGL 73 73 PVBOXWDDM_SWAPCHAIN vboxWddmSwapchainCreate(); 74 74 BOOLEAN vboxWddmSwapchainRetain(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_SWAPCHAIN pSwapchain); … … 84 84 NTSTATUS vboxWddmSwapchainCtxInit(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_CONTEXT pContext); 85 85 VOID vboxWddmSwapchainCtxTerm(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_CONTEXT pContext); 86 #endif 86 87 87 88 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPTypes.h
r50628 r50940 21 21 22 22 typedef struct _VBOXMP_DEVEXT *PVBOXMP_DEVEXT; 23 #ifdef VBOX_WITH_CROGL 23 24 typedef struct VBOXWDDM_SWAPCHAIN *PVBOXWDDM_SWAPCHAIN; 25 #endif 24 26 typedef struct VBOXWDDM_CONTEXT *PVBOXWDDM_CONTEXT; 25 27 typedef struct VBOXWDDM_ALLOCATION *PVBOXWDDM_ALLOCATION; … … 33 35 #include "VBoxMPCr.h" 34 36 37 #ifdef VBOX_WITH_CROGL 35 38 #include <cr_vreg.h> 39 #endif 36 40 37 41 #ifdef DEBUG_misha … … 126 130 uint8_t u8SyncState; 127 131 BOOLEAN bVisible; 132 #ifdef VBOX_WITH_CROGL 128 133 /* specifies whether the source has 3D overlay data visible */ 129 134 BOOLEAN fHas3DVrs; 130 135 VBOXVR_LIST VrList; 136 #endif 131 137 VBOXVBVAINFO Vbva; 132 138 #ifdef VBOX_WITH_VIDEOHWACCEL … … 231 237 #define VBOXWDDM_INVALID_COORD ((LONG)((~0UL) >> 1)) 232 238 239 #ifdef VBOX_WITH_CROGL 233 240 typedef struct VBOXWDDM_SWAPCHAIN 234 241 { … … 247 254 VBOXVR_LIST VisibleRegions; 248 255 }VBOXWDDM_SWAPCHAIN, *PVBOXWDDM_SWAPCHAIN; 256 #endif 249 257 250 258 typedef struct VBOXWDDM_CONTEXT … … 256 264 UINT EngineAffinity; 257 265 BOOLEAN fRenderFromShadowDisabled; 266 #ifdef VBOX_WITH_CROGL 258 267 int32_t hostID; 259 268 uint32_t u32CrConClientID; 260 269 VBOXMP_CRPACKER CrPacker; 261 270 VBOXWDDM_HTABLE Swapchains; 271 #endif 262 272 VBOXVIDEOCM_CTX CmContext; 263 273 VBOXVIDEOCM_ALLOC_CONTEXT AllocContext; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVbva.cpp
r50933 r50940 98 98 } 99 99 100 #ifdef VBOX_WITH_CROGL 100 101 /* command vbva ring buffer */ 101 102 … … 1287 1288 return pCmd->Hdr.i32Result; 1288 1289 } 1290 #endif -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVbva.h
r50859 r50940 59 59 60 60 61 #ifdef VBOX_WITH_CROGL 61 62 /* customized VBVA implementation */ 62 63 struct VBVAEXBUFFERCONTEXT; … … 232 233 int VBoxCmdVbvaConCmdSubmitAsync(PVBOXMP_DEVEXT pDevExt, VBOXCMDVBVA_CRCMD_CMD* pCmd, FNVBOXSHGSMICMDCOMPLETION pfnCompletion, void *pvCompletion); 233 234 int VBoxCmdVbvaConCmdCompletionData(void *pvCmd, VBOXCMDVBVA_CRCMD_CMD **ppCmd); 235 #endif /* #ifdef VBOX_WITH_CROGL */ 234 236 235 237 #endif /* #ifndef ___VBoxMPVbva_h___ */ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVdma.cpp
r50859 r50940 23 23 #include <iprt/asm.h> 24 24 #include "VBoxMPCr.h" 25 25 #include <iprt/mem.h> 26 27 #ifdef VBOX_WITH_CROGL 26 28 # include <packer.h> 29 #endif 27 30 28 31 NTSTATUS vboxVdmaPipeConstruct(PVBOXVDMAPIPE pPipe) … … 263 266 return true; 264 267 } 265 268 #ifdef VBOX_WITH_CROGL 266 269 NTSTATUS vboxVdmaPostHideSwapchain(PVBOXWDDM_SWAPCHAIN pSwapchain) 267 270 { … … 283 286 return STATUS_NO_MEMORY; 284 287 } 285 288 #endif 286 289 static VOID vboxWddmBltPipeRectsTranslate(VBOXVDMAPIPE_RECTS *pRects, int x, int y) 287 290 { … … 306 309 return pDup; 307 310 } 308 311 #ifdef VBOX_WITH_CROGL 309 312 typedef struct VBOXMP_VDMACR_WRITECOMPLETION 310 313 { … … 640 643 return Status; 641 644 } 645 #endif 642 646 643 647 static NTSTATUS vboxVdmaGgDmaColorFill(PVBOXMP_DEVEXT pDevExt, VBOXVDMA_CLRFILL *pCF) … … 845 849 } 846 850 851 #ifdef VBOX_WITH_CROGL 847 852 typedef struct VBOXVDMA_CRRXGENERICSYNC 848 853 { … … 1277 1282 } 1278 1283 } 1284 #endif 1279 1285 1280 1286 NTSTATUS vboxVdmaProcessBltCmd(PVBOXMP_DEVEXT pDevExt, VBOXWDDM_CONTEXT *pContext, VBOXWDDM_DMA_PRIVATEDATA_BLT *pBlt) … … 1285 1291 BOOLEAN fRenderFromSharedDisabled = pDevExt->fRenderToShadowDisabled; 1286 1292 BOOLEAN fVRAMUpdated = FALSE; 1287 1293 #ifdef VBOX_WITH_CROGL 1288 1294 if (!pDstAlloc->AllocData.hostID && !pSrcAlloc->AllocData.hostID) 1295 #endif 1289 1296 { 1290 1297 /* the allocations contain a real data in VRAM, do blitting */ … … 1293 1300 } 1294 1301 1302 #ifdef VBOX_WITH_CROGL 1295 1303 if (VBOXWDDM_IS_REAL_FB_ALLOCATION(pDevExt, pDstAlloc) 1296 1304 && pDstAlloc->bVisible) … … 1311 1319 } 1312 1320 } 1313 1321 #endif 1314 1322 return Status; 1315 1323 } … … 1321 1329 VBOXWDDM_SOURCE *pSource = &pDevExt->aSources[pAlloc->AllocData.SurfDesc.VidPnSourceId]; 1322 1330 vboxWddmAssignPrimary(pDevExt, pSource, pAlloc, pAlloc->AllocData.SurfDesc.VidPnSourceId); 1331 #ifdef VBOX_WITH_CROGL 1323 1332 if (pAlloc->AllocData.hostID) 1324 1333 { … … 1341 1350 } 1342 1351 else 1352 #endif 1353 { 1343 1354 WARN(("unexpected flip request")); 1355 } 1344 1356 1345 1357 return Status; … … 1350 1362 NTSTATUS Status = STATUS_SUCCESS; 1351 1363 PVBOXWDDM_ALLOCATION pAlloc = pCF->ClrFill.Alloc.pAlloc; 1352 1364 #ifdef VBOX_WITH_CROGL 1353 1365 if (!pAlloc->AllocData.hostID) 1366 #endif 1354 1367 { 1355 1368 Status = vboxVdmaGgDmaColorFill(pDevExt, &pCF->ClrFill); … … 1357 1370 WARN(("vboxVdmaGgDmaColorFill failed Status 0x%x", Status)); 1358 1371 } 1372 #ifdef VBOX_WITH_CROGL 1359 1373 else 1360 1374 WARN(("unexpected clrfill request")); 1375 #endif 1361 1376 1362 1377 return Status; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVdma.h
r47566 r50940 197 197 } VBOXVDMAPIPE_CMD_RECTSINFO, *PVBOXVDMAPIPE_CMD_RECTSINFO; 198 198 199 typedef struct VBOXVDMAPIPE_CMD_FINISH200 {201 VBOXVDMAPIPE_CMD_DR Hdr;202 PVBOXWDDM_CONTEXT pContext;203 PKEVENT pEvent;204 } VBOXVDMAPIPE_CMD_FINISH, *PVBOXVDMAPIPE_CMD_FINISH;205 206 typedef struct VBOXVDMAPIPE_CMD_CANCEL207 {208 VBOXVDMAPIPE_CMD_DR Hdr;209 PVBOXWDDM_CONTEXT pContext;210 PVBOXWDDM_SWAPCHAIN pSwapchain;211 PKEVENT pEvent;212 } VBOXVDMAPIPE_CMD_CANCEL, *PVBOXVDMAPIPE_CMD_CANCEL;213 214 199 typedef struct VBOXVDMAPIPE_CMD_DMACMD 215 200 { … … 316 301 317 302 #endif 318 303 #ifdef VBOX_WITH_CROGL 319 304 NTSTATUS vboxVdmaPostHideSwapchain(PVBOXWDDM_SWAPCHAIN pSwapchain); 305 #endif 320 306 321 307 NTSTATUS vboxVdmaGgCmdDmaNotifyCompleted(PVBOXMP_DEVEXT pDevExt, PVBOXVDMAPIPE_CMD_DMACMD pCmd, DXGK_INTERRUPT_TYPE enmComplType); … … 333 319 NTSTATUS vboxVdmaProcessFlipCmd(PVBOXMP_DEVEXT pDevExt, struct VBOXWDDM_CONTEXT *pContext, struct VBOXWDDM_DMA_PRIVATEDATA_FLIP *pFlip); 334 320 NTSTATUS vboxVdmaProcessClrFillCmd(PVBOXMP_DEVEXT pDevExt, struct VBOXWDDM_CONTEXT *pContext, struct VBOXWDDM_DMA_PRIVATEDATA_CLRFILL *pCF); 335 321 #ifdef VBOX_WITH_CROGL 336 322 NTSTATUS vboxVdmaTexPresentSetAlloc(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_ALLOCATION pRealFbAlloc); 323 #endif 337 324 338 325 #endif /* #ifndef ___VBoxMPVdma_h___ */ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r50929 r50940 347 347 { 348 348 NTSTATUS Status; 349 349 #ifdef VBOX_WITH_CROGL 350 350 if ((u8CurCyncState & VBOXWDDM_HGSYNC_F_CHANGED_LOCATION_ONLY) == VBOXWDDM_HGSYNC_F_CHANGED_LOCATION_ONLY 351 351 && pRealFbAlloc->AllocData.hostID) … … 356 356 return Status; 357 357 } 358 358 #endif 359 359 Status = vboxWddmGhDisplaySetMode(pDevExt, pAllocData); 360 360 if (NT_SUCCESS(Status)) … … 366 366 if (NT_SUCCESS(Status)) 367 367 { 368 #ifdef VBOX_WITH_CROGL 368 369 if (pDevExt->f3DEnabled) 369 370 { … … 374 375 WARN(("vboxVdmaTexPresentSetAlloc failed, Status 0x%x", Status)); 375 376 } 377 #else 378 return STATUS_SUCCESS; 379 #endif 376 380 } 377 381 else … … 769 773 } 770 774 } 771 775 #ifdef VBOX_WITH_CROGL 772 776 static NTSTATUS vboxWddmSetupDisplaysNew(PVBOXMP_DEVEXT pDevExt) 773 777 { … … 822 826 return STATUS_UNSUCCESSFUL; 823 827 } 824 828 #endif 825 829 static NTSTATUS vboxWddmSetupDisplays(PVBOXMP_DEVEXT pDevExt) 826 830 { 831 #ifdef VBOX_WITH_CROGL 827 832 if (pDevExt->fCmdVbvaEnabled) 828 833 { … … 832 837 return Status; 833 838 } 839 #endif 834 840 835 841 vboxWddmSetupDisplaysLegacy(pDevExt); … … 965 971 if (Status == STATUS_SUCCESS) 966 972 { 973 #ifdef VBOX_WITH_CROGL 967 974 pDevExt->f3DEnabled = VBoxMpCrCtlConIs3DSupported(); 968 975 … … 977 984 pDevExt->fCmdVbvaEnabled = FALSE; 978 985 } 986 #endif 979 987 980 988 /* Guest supports only HGSMI, the old VBVA via VMMDev is not supported. … … 1021 1029 VBoxWddmSlInit(pDevExt); 1022 1030 1031 #ifdef VBOX_WITH_CROGL 1023 1032 VBoxMpCrShgsmiTransportCreate(&pDevExt->CrHgsmiTransport, pDevExt); 1024 1033 #endif 1025 1034 1026 1035 for (UINT i = 0; i < (UINT)VBoxCommonFromDeviceExt(pDevExt)->cDisplays; ++i) … … 1028 1037 PVBOXWDDM_SOURCE pSource = &pDevExt->aSources[i]; 1029 1038 KeInitializeSpinLock(&pSource->AllocationLock); 1039 #ifdef VBOX_WITH_CROGL 1030 1040 VBoxVrListInit(&pSource->VrList); 1041 #endif 1031 1042 } 1032 1043 … … 1173 1184 NTSTATUS Status = STATUS_SUCCESS; 1174 1185 1186 #ifdef VBOX_WITH_CROGL 1175 1187 VBoxMpCrShgsmiTransportTerm(&pDevExt->CrHgsmiTransport); 1188 #endif 1176 1189 1177 1190 VBoxWddmSlTerm(pDevExt); … … 1298 1311 } 1299 1312 1300 1313 #ifdef VBOX_WITH_CROGL 1301 1314 BOOLEAN DxgkDdiInterruptRoutineNew( 1302 1315 IN CONST PVOID MiniportDeviceContext, … … 1437 1450 return bOur; 1438 1451 } 1439 1452 #endif 1440 1453 1441 1454 static BOOLEAN DxgkDdiInterruptRoutineLegacy( … … 1655 1668 vboxVtListDetach2List(&pDevExt->VhwaCmdList, &pdc->data.VhwaCmdList); 1656 1669 #endif 1670 #ifdef VBOX_WITH_CROGL 1657 1671 if (!pDevExt->fCmdVbvaEnabled) 1672 #endif 1673 { 1658 1674 vboxVdmaDdiCmdGetCompletedListIsr(pDevExt, &pdc->data.CompletedDdiCmdQueue); 1675 } 1659 1676 1660 1677 pdc->data.bNotifyDpc = pDevExt->bNotifyDxDpc; … … 1666 1683 } 1667 1684 1685 #ifdef VBOX_WITH_CROGL 1668 1686 static VOID DxgkDdiDpcRoutineNew( 1669 1687 IN CONST PVOID MiniportDeviceContext … … 1711 1729 // LOGF(("LEAVE, context(0x%p)", MiniportDeviceContext)); 1712 1730 } 1713 1731 #endif 1714 1732 1715 1733 static VOID DxgkDdiDpcRoutineLegacy( … … 1913 1931 VbglTerminate(); 1914 1932 1933 #ifdef VBOX_WITH_CROGL 1915 1934 VBoxVrTerm(); 1935 #endif 1916 1936 1917 1937 PRTLOGGER pLogger = RTLogRelSetDefaultInstance(NULL); … … 2113 2133 memset (pQi, 0, sizeof (VBOXWDDM_QI)); 2114 2134 pQi->u32Version = VBOXVIDEOIF_VERSION; 2135 #ifdef VBOX_WITH_CROGL 2115 2136 pQi->u32VBox3DCaps = VBoxMpCrGetHostCaps(); 2137 #endif 2116 2138 pQi->cInfos = VBoxCommonFromDeviceExt(pDevExt)->cDisplays; 2117 2139 #ifdef VBOX_WITH_VIDEOHWACCEL … … 2293 2315 break; 2294 2316 } 2295 2317 #ifdef VBOX_WITH_CROGL 2296 2318 PVBOXWDDM_SWAPCHAIN pSwapchain = vboxWddmSwapchainRetainByAlloc(pDevExt, pAllocation); 2297 2319 if (pSwapchain) … … 2300 2322 vboxWddmSwapchainRelease(pSwapchain); 2301 2323 } 2324 #endif 2302 2325 } 2303 2326 … … 2820 2843 } 2821 2844 2845 #ifdef VBOX_WITH_CROGL 2822 2846 static NTSTATUS 2823 2847 APIENTRY … … 2868 2892 return STATUS_SUCCESS; 2869 2893 } 2870 2894 #endif 2871 2895 2872 2896 static NTSTATUS … … 3039 3063 PVBOXWDDM_CALL_ISR pdc = (PVBOXWDDM_CALL_ISR)Context; 3040 3064 PVBOXMP_DEVEXT pDevExt = pdc->pDevExt; 3065 #ifdef VBOX_WITH_CROGL 3041 3066 if (pDevExt->fCmdVbvaEnabled) 3042 3067 return DxgkDdiInterruptRoutineNew(pDevExt, pdc->MessageNumber); 3068 #endif 3043 3069 return DxgkDdiInterruptRoutineLegacy(pDevExt, pdc->MessageNumber); 3044 3070 } … … 3071 3097 #endif 3072 3098 3099 #ifdef VBOX_WITH_CROGL 3073 3100 static NTSTATUS 3074 3101 APIENTRY … … 3162 3189 return STATUS_UNSUCCESSFUL; 3163 3190 } 3191 #endif 3164 3192 3165 3193 static NTSTATUS … … 3357 3385 } 3358 3386 3387 #ifdef VBOX_WITH_CROGL 3359 3388 static NTSTATUS 3360 3389 APIENTRY … … 3367 3396 PVBOXMP_DEVEXT pDevExt = (PVBOXMP_DEVEXT)hAdapter; 3368 3397 3398 vboxVDbgBreakF(); 3399 3369 3400 VBoxCmdVbvaPreempt(pDevExt, &pDevExt->CmdVbva, pPreemptCommand->PreemptionFenceId); 3370 3401 … … 3373 3404 return STATUS_SUCCESS; 3374 3405 } 3375 3406 #endif 3376 3407 3377 3408 static NTSTATUS … … 3391 3422 } 3392 3423 3424 #ifdef VBOX_WITH_CROGL 3393 3425 /* 3394 3426 * DxgkDdiBuildPagingBuffer … … 3544 3576 return STATUS_SUCCESS; 3545 3577 } 3546 3578 #endif 3547 3579 3548 3580 static NTSTATUS … … 4093 4125 break; 4094 4126 } 4095 #endif 4127 4096 4128 case VBOXESC_UHGSMI_ALLOCATE: 4097 4129 { … … 4134 4166 Status = vboxVideoAMgrCtxAllocDestroy(&pContext->AllocContext, pDealocate->hAlloc); 4135 4167 Assert(Status == STATUS_SUCCESS); 4136 }4137 else4138 Status = STATUS_BUFFER_TOO_SMALL;4139 4140 break;4141 }4142 4143 case VBOXESC_GETVBOXVIDEOCMCMD:4144 {4145 if (pDevExt->fCmdVbvaEnabled || pDevExt->fTexPresentEnabled)4146 {4147 WARN(("VBOXESC_GETVBOXVIDEOCMCMD not supported for CmdVbva or TexPresent mode"));4148 Status = STATUS_INVALID_PARAMETER;4149 break;4150 }4151 4152 /* get the list of r0->r3 commands (d3d window visible regions reporting )*/4153 PVBOXWDDM_CONTEXT pContext = (PVBOXWDDM_CONTEXT)pEscape->hContext;4154 PVBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD pRegions = (PVBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD)pEscapeHdr;4155 Assert(pEscape->PrivateDriverDataSize >= sizeof (VBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD));4156 if (pEscape->PrivateDriverDataSize >= sizeof (VBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD))4157 {4158 if (pContext->enmType == VBOXWDDM_CONTEXT_TYPE_CUSTOM_3D)4159 {4160 Status = vboxVideoCmEscape(&pContext->CmContext, pRegions, pEscape->PrivateDriverDataSize);4161 Assert(Status == STATUS_SUCCESS);4162 }4163 else4164 {4165 WARN(("VBOXESC_GETVBOXVIDEOCMCMD recieved invalid context type %d", pContext->enmType));4166 Status = STATUS_INVALID_PARAMETER;4167 }4168 4168 } 4169 4169 else … … 4220 4220 break; 4221 4221 } 4222 #endif 4222 4223 4223 4224 case VBOXESC_SETVISIBLEREGION: … … 4337 4338 break; 4338 4339 } 4340 #ifdef VBOX_WITH_CROGL 4339 4341 case VBOXESC_SETCTXHOSTID: 4340 4342 { … … 4382 4384 break; 4383 4385 } 4386 #endif 4384 4387 case VBOXESC_REINITVIDEOMODES: 4385 4388 { … … 4766 4769 } 4767 4770 4771 #ifdef VBOX_WITH_CROGL 4768 4772 static NTSTATUS 4769 4773 APIENTRY … … 4783 4787 return STATUS_SUCCESS; 4784 4788 } 4785 4789 #endif 4786 4790 4787 4791 static NTSTATUS … … 5765 5769 } 5766 5770 5771 #ifdef VBOX_WITH_CROGL 5767 5772 static NTSTATUS 5768 5773 APIENTRY … … 5932 5937 return STATUS_SUCCESS; 5933 5938 } 5939 #endif 5934 5940 5935 5941 static void vboxWddmPatchLocationInit(D3DDDI_PATCHLOCATIONLIST *pPatchLocationListOut, UINT idx, UINT offPatch) … … 6083 6089 } 6084 6090 6091 #ifdef VBOX_WITH_CROGL 6085 6092 /** 6086 6093 * DxgkDdiPresent … … 6362 6369 return STATUS_SUCCESS; 6363 6370 } 6371 #endif 6364 6372 6365 6373 /** … … 6682 6690 Assert(tmpStatus == STATUS_SUCCESS); 6683 6691 } 6684 6692 #ifdef VBOX_WITH_CROGL 6685 6693 if (!VBOXWDDM_IS_DISPLAYONLY() && pDevExt->f3DEnabled) 6686 6694 { … … 6690 6698 WARN(("VBoxMpCrCtlConConnect failed rc (%d), ignoring for system context", rc)); 6691 6699 } 6692 6700 #endif 6693 6701 Status = STATUS_SUCCESS; 6694 6702 } … … 6703 6711 switch (pInfo->enmType) 6704 6712 { 6713 #ifdef VBOX_WITH_CROGL 6705 6714 case VBOXWDDM_CONTEXT_TYPE_CUSTOM_3D: 6706 6715 { … … 6806 6815 break; 6807 6816 } 6817 #endif 6808 6818 case VBOXWDDM_CONTEXT_TYPE_CUSTOM_2D: 6809 6819 { … … 6915 6925 } 6916 6926 6927 #ifdef VBOX_WITH_CROGL 6917 6928 if (pContext->u32CrConClientID) 6918 6929 { 6919 6930 VBoxMpCrCtlConDisconnect(pDevExt, &pDevExt->CrCtlCon, pContext->u32CrConClientID); 6920 6931 } 6932 #endif 6921 6933 6922 6934 vboxWddmModeRenderFromShadowDisableUnregister(pDevExt, pContext); 6923 6935 6936 #ifdef VBOX_WITH_CROGL 6924 6937 /* first terminate the swapchain, this will also ensure 6925 6938 * all currently pending driver->user Cm commands 6926 6939 * (i.e. visible regions commands) are completed */ 6927 6940 vboxWddmSwapchainCtxTerm(pDevExt, pContext); 6941 #endif 6928 6942 6929 6943 Status = vboxVideoAMgrCtxDestroy(&pContext->AllocContext); … … 7240 7254 static NTSTATUS vboxWddmInitFullGraphicsDriver(IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING pRegistryPath, BOOLEAN fCmdVbva) 7241 7255 { 7256 #ifdef VBOX_WITH_CROGL 7242 7257 #define VBOXWDDM_CALLBACK_NAME(_base, _fCmdVbva) ((_fCmdVbva) ? _base##New : _base##Legacy) 7258 #else 7259 #define VBOXWDDM_CALLBACK_NAME(_base, _fCmdVbva) (_base##Legacy) 7260 #endif 7243 7261 7244 7262 DRIVER_INITIALIZATION_DATA DriverInitializationData = {'\0'}; … … 7401 7419 7402 7420 Status = STATUS_SUCCESS; 7403 7421 #ifdef VBOX_WITH_CROGL 7404 7422 VBoxMpCrCtlConInit(); 7405 7423 … … 7407 7425 LOG(("Doing the 3D check..")); 7408 7426 if (!VBoxMpCrCtlConIs3DSupported()) 7427 #endif 7409 7428 { 7410 7429 #ifdef VBOX_WDDM_WIN8 … … 7431 7450 if (NT_SUCCESS(Status)) 7432 7451 { 7452 #ifdef VBOX_WITH_CROGL 7433 7453 rc = VBoxVrInit(); 7434 7454 if (RT_SUCCESS(rc)) 7455 #endif 7435 7456 { 7436 7457 #ifdef VBOX_WDDM_WIN8 … … 7442 7463 #endif 7443 7464 { 7444 Status = vboxWddmInitFullGraphicsDriver(DriverObject, RegistryPath, !!(VBoxMpCrGetHostCaps() & CR_VBOX_CAP_CMDVBVA)); 7465 Status = vboxWddmInitFullGraphicsDriver(DriverObject, RegistryPath, 7466 #ifdef VBOX_WITH_CROGL 7467 !!(VBoxMpCrGetHostCaps() & CR_VBOX_CAP_CMDVBVA) 7468 #else 7469 FALSE 7470 #endif 7471 ); 7445 7472 } 7446 7473 7447 7474 if (NT_SUCCESS(Status)) 7448 7475 return Status; 7449 7476 #ifdef VBOX_WITH_CROGL 7450 7477 VBoxVrTerm(); 7451 } 7478 #endif 7479 } 7480 #ifdef VBOX_WITH_CROGL 7452 7481 else 7453 7482 { … … 7455 7484 Status = STATUS_UNSUCCESSFUL; 7456 7485 } 7486 #endif 7457 7487 } 7458 7488 else -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.h
r50628 r50940 128 128 DECLINLINE(void) vboxWddmAssignShadow(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_SOURCE pSource, PVBOXWDDM_ALLOCATION pAllocation, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId) 129 129 { 130 #ifdef VBOX_WITH_CROGL 130 131 if (pDevExt->fCmdVbvaEnabled) 131 132 { … … 133 134 return; 134 135 } 136 #endif 135 137 136 138 if (pSource->pShadowAllocation == pAllocation) … … 238 240 bool vboxWddmGhDisplayCheckSetInfoFromSource(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_SOURCE pSource); 239 241 242 #ifdef VBOX_WITH_CROGL 240 243 #define VBOXWDDMENTRY_2_SWAPCHAIN(_pE) ((PVBOXWDDM_SWAPCHAIN)((uint8_t*)(_pE) - RT_OFFSETOF(VBOXWDDM_SWAPCHAIN, DevExtListEntry))) 241 244 … … 244 247 IN ULONG MessageNumber 245 248 ); 249 #endif 246 250 247 251 #ifdef VBOX_WDDM_WIN8
Note:
See TracChangeset
for help on using the changeset viewer.