Changeset 81651 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Nov 4, 2019 12:52:17 PM (5 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/Makefile.kmk
r80876 r81651 102 102 VBoxWddm_SOURCES = \ 103 103 wddm/VBoxMPWddm.cpp \ 104 wddm/VBoxMPLegacy.cpp \ 104 105 wddm/VBoxMPVidPn.cpp \ 105 106 wddm/VBoxMPVdma.cpp \ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPDevExt.h
r80876 r81651 133 133 VBOXVIDEOCM_ALLOC_MGR AllocMgr; 134 134 /* mutex for context list operations */ 135 VBOXVDMADDI_NODE aNodes[VBOXWDDM_NUM_NODES]; 136 LIST_ENTRY DpcCmdQueue; 135 137 KSPIN_LOCK ContextLock; 136 138 KSPIN_LOCK SynchLock; … … 195 197 #ifdef VBOX_WDDM_MINIPORT 196 198 VBOXVDMAINFO Vdma; 199 UINT uLastCompletedPagingBufferCmdFenceId; /* Legacy */ 197 200 # ifdef VBOXVDMA_WITH_VBVA 198 201 VBOXVBVAINFO Vbva; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPTypes.h
r81594 r81651 59 59 #define VBOXWDDM_C_POINTER_MAX_HEIGHT_LEGACY 64 60 60 #endif 61 62 #define VBOXWDDM_DUMMY_DMABUFFER_SIZE 4 61 63 62 64 #define VBOXWDDM_POINTER_ATTRIBUTES_SIZE VBOXWDDM_ROUNDBOUND( \ … … 274 276 } VBOXWDDM_VMODES; 275 277 278 typedef struct VBOXVDMADDI_CMD_QUEUE 279 { 280 volatile uint32_t cQueuedCmds; 281 LIST_ENTRY CmdQueue; 282 } VBOXVDMADDI_CMD_QUEUE, *PVBOXVDMADDI_CMD_QUEUE; 283 284 typedef struct VBOXVDMADDI_NODE 285 { 286 VBOXVDMADDI_CMD_QUEUE CmdQueue; 287 UINT uLastCompletedFenceId; 288 } VBOXVDMADDI_NODE, *PVBOXVDMADDI_NODE; 289 276 290 #endif /* !GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_wddm_VBoxMPTypes_h */ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVdma.cpp
r80876 r81651 24 24 #include <iprt/asm.h> 25 25 #include <iprt/mem.h> 26 27 NTSTATUS vboxVdmaGgDmaBltPerform(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_ALLOC_DATA pSrcAlloc, RECT* pSrcRect,28 PVBOXWDDM_ALLOC_DATA pDstAlloc, RECT* pDstRect)29 {30 uint8_t* pvVramBase = pDevExt->pvVisibleVram;31 /* we do not support stretching */32 uint32_t srcWidth = pSrcRect->right - pSrcRect->left;33 uint32_t srcHeight = pSrcRect->bottom - pSrcRect->top;34 uint32_t dstWidth = pDstRect->right - pDstRect->left;35 uint32_t dstHeight = pDstRect->bottom - pDstRect->top;36 Assert(srcHeight == dstHeight);37 Assert(dstWidth == srcWidth);38 Assert(pDstAlloc->Addr.offVram != VBOXVIDEOOFFSET_VOID);39 Assert(pSrcAlloc->Addr.offVram != VBOXVIDEOOFFSET_VOID);40 D3DDDIFORMAT enmSrcFormat, enmDstFormat;41 42 enmSrcFormat = pSrcAlloc->SurfDesc.format;43 enmDstFormat = pDstAlloc->SurfDesc.format;44 45 if (pDstAlloc->Addr.SegmentId && pDstAlloc->Addr.SegmentId != 1)46 {47 WARN(("request to collor blit invalid allocation"));48 return STATUS_INVALID_PARAMETER;49 }50 51 if (pSrcAlloc->Addr.SegmentId && pSrcAlloc->Addr.SegmentId != 1)52 {53 WARN(("request to collor blit invalid allocation"));54 return STATUS_INVALID_PARAMETER;55 }56 57 if (enmSrcFormat != enmDstFormat)58 {59 /* just ignore the alpha component60 * this is ok since our software-based stuff can not handle alpha channel in any way */61 enmSrcFormat = vboxWddmFmtNoAlphaFormat(enmSrcFormat);62 enmDstFormat = vboxWddmFmtNoAlphaFormat(enmDstFormat);63 if (enmSrcFormat != enmDstFormat)64 {65 WARN(("color conversion src(%d), dst(%d) not supported!", pSrcAlloc->SurfDesc.format, pDstAlloc->SurfDesc.format));66 return STATUS_INVALID_PARAMETER;67 }68 }69 if (srcHeight != dstHeight)70 return STATUS_INVALID_PARAMETER;71 if (srcWidth != dstWidth)72 return STATUS_INVALID_PARAMETER;73 if (pDstAlloc->Addr.offVram == VBOXVIDEOOFFSET_VOID)74 return STATUS_INVALID_PARAMETER;75 if (pSrcAlloc->Addr.offVram == VBOXVIDEOOFFSET_VOID)76 return STATUS_INVALID_PARAMETER;77 78 uint8_t *pvDstSurf = pDstAlloc->Addr.SegmentId ? pvVramBase + pDstAlloc->Addr.offVram : (uint8_t*)pDstAlloc->Addr.pvMem;79 uint8_t *pvSrcSurf = pSrcAlloc->Addr.SegmentId ? pvVramBase + pSrcAlloc->Addr.offVram : (uint8_t*)pSrcAlloc->Addr.pvMem;80 81 if (pDstAlloc->SurfDesc.width == dstWidth82 && pSrcAlloc->SurfDesc.width == srcWidth83 && pSrcAlloc->SurfDesc.width == pDstAlloc->SurfDesc.width)84 {85 Assert(!pDstRect->left);86 Assert(!pSrcRect->left);87 uint32_t cbDstOff = vboxWddmCalcOffXYrd(0 /* x */, pDstRect->top, pDstAlloc->SurfDesc.pitch, pDstAlloc->SurfDesc.format);88 uint32_t cbSrcOff = vboxWddmCalcOffXYrd(0 /* x */, pSrcRect->top, pSrcAlloc->SurfDesc.pitch, pSrcAlloc->SurfDesc.format);89 uint32_t cbSize = vboxWddmCalcSize(pDstAlloc->SurfDesc.pitch, dstHeight, pDstAlloc->SurfDesc.format);90 memcpy(pvDstSurf + cbDstOff, pvSrcSurf + cbSrcOff, cbSize);91 }92 else93 {94 uint32_t cbDstLine = vboxWddmCalcRowSize(pDstRect->left, pDstRect->right, pDstAlloc->SurfDesc.format);95 uint32_t offDstStart = vboxWddmCalcOffXYrd(pDstRect->left, pDstRect->top, pDstAlloc->SurfDesc.pitch, pDstAlloc->SurfDesc.format);96 Assert(cbDstLine <= pDstAlloc->SurfDesc.pitch);97 uint32_t cbDstSkip = pDstAlloc->SurfDesc.pitch;98 uint8_t * pvDstStart = pvDstSurf + offDstStart;99 100 uint32_t cbSrcLine = vboxWddmCalcRowSize(pSrcRect->left, pSrcRect->right, pSrcAlloc->SurfDesc.format);101 uint32_t offSrcStart = vboxWddmCalcOffXYrd(pSrcRect->left, pSrcRect->top, pSrcAlloc->SurfDesc.pitch, pSrcAlloc->SurfDesc.format);102 Assert(cbSrcLine <= pSrcAlloc->SurfDesc.pitch); NOREF(cbSrcLine);103 uint32_t cbSrcSkip = pSrcAlloc->SurfDesc.pitch;104 const uint8_t * pvSrcStart = pvSrcSurf + offSrcStart;105 106 uint32_t cRows = vboxWddmCalcNumRows(pDstRect->top, pDstRect->bottom, pDstAlloc->SurfDesc.format);107 108 Assert(cbDstLine == cbSrcLine);109 110 for (uint32_t i = 0; i < cRows; ++i)111 {112 memcpy(pvDstStart, pvSrcStart, cbDstLine);113 pvDstStart += cbDstSkip;114 pvSrcStart += cbSrcSkip;115 }116 }117 return STATUS_SUCCESS;118 }119 26 120 27 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVdma.h
r80876 r81651 41 41 int vboxVdmaDestroy(PVBOXMP_DEVEXT pDevExt, PVBOXVDMAINFO pInfo); 42 42 43 NTSTATUS vboxVdmaGgDmaBltPerform(PVBOXMP_DEVEXT pDevExt, struct VBOXWDDM_ALLOC_DATA * pSrcAlloc, RECT* pSrcRect,44 struct VBOXWDDM_ALLOC_DATA *pDstAlloc, RECT* pDstRect);45 46 43 #endif /* !GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_wddm_VBoxMPVdma_h */ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r81632 r81651 23 23 #endif 24 24 #include "VBoxMPVidPn.h" 25 #include "VBoxMPLegacy.h" 25 26 26 27 #include <iprt/alloc.h> … … 42 43 43 44 #include <stdio.h> 44 45 #define VBOXWDDM_DUMMY_DMABUFFER_SIZE (sizeof(VBOXCMDVBVA_HDR) / 2)46 45 47 46 #ifdef DEBUG … … 186 185 } 187 186 188 DECLINLINE(PVBOXWDDM_ALLOCATION) vboxWddmGetAllocationFromAllocList(DXGK_ALLOCATIONLIST *pAllocList)189 {190 PVBOXWDDM_OPENALLOCATION pOa = (PVBOXWDDM_OPENALLOCATION)pAllocList->hDeviceSpecificAllocation;191 return pOa->pAllocation;192 }193 194 187 int vboxWddmGhDisplayPostInfoScreen(PVBOXMP_DEVEXT pDevExt, const VBOXWDDM_ALLOC_DATA *pAllocData, const POINT * pVScreenPos, uint16_t fFlags) 195 188 { … … 630 623 return &VBoxCommonFromDeviceExt(pDevExt)->guestCtx.heapCtx; 631 624 return NULL; 632 }633 634 typedef enum635 {636 VBOXWDDM_HGSMICMD_TYPE_UNDEFINED = 0,637 VBOXWDDM_HGSMICMD_TYPE_CTL = 1,638 } VBOXWDDM_HGSMICMD_TYPE;639 640 VBOXWDDM_HGSMICMD_TYPE vboxWddmHgsmiGetCmdTypeFromOffset(PVBOXMP_DEVEXT pDevExt, HGSMIOFFSET offCmd)641 {642 if (HGSMIAreaContainsOffset(&VBoxCommonFromDeviceExt(pDevExt)->guestCtx.heapCtx.Heap.area, offCmd))643 return VBOXWDDM_HGSMICMD_TYPE_CTL;644 return VBOXWDDM_HGSMICMD_TYPE_UNDEFINED;645 625 } 646 626 … … 1084 1064 LOG(("sources(%d), children(%d)", *NumberOfVideoPresentSources, *NumberOfChildren)); 1085 1065 1066 vboxVdmaDdiNodesInit(pDevExt); 1086 1067 vboxVideoCmInit(&pDevExt->CmMgr); 1087 1068 vboxVideoCmInit(&pDevExt->SeamlessCtxMgr); … … 1403 1384 } 1404 1385 1405 static BOOLEAN DxgkDdiInterruptRoutineLegacy(1406 IN CONST PVOID MiniportDeviceContext,1407 IN ULONG MessageNumber1408 )1409 {1410 RT_NOREF(MessageNumber);1411 // LOGF(("ENTER, context(0x%p), msg(0x%x)", MiniportDeviceContext, MessageNumber));1412 1413 vboxVDbgBreakFv();1414 1415 PVBOXMP_DEVEXT pDevExt = (PVBOXMP_DEVEXT)MiniportDeviceContext;1416 BOOLEAN bOur = FALSE;1417 BOOLEAN bNeedDpc = FALSE;1418 if (VBoxCommonFromDeviceExt(pDevExt)->hostCtx.pfHostFlags) /* If HGSMI is enabled at all. */1419 {1420 VBOXVTLIST CtlList;1421 vboxVtListInit(&CtlList);1422 1423 #ifdef VBOX_WITH_VIDEOHWACCEL1424 VBOXVTLIST VhwaCmdList;1425 vboxVtListInit(&VhwaCmdList);1426 #endif1427 1428 uint32_t flags = VBoxCommonFromDeviceExt(pDevExt)->hostCtx.pfHostFlags->u32HostFlags;1429 bOur = (flags & HGSMIHOSTFLAGS_IRQ);1430 1431 if (bOur)1432 VBoxHGSMIClearIrq(&VBoxCommonFromDeviceExt(pDevExt)->hostCtx);1433 1434 do1435 {1436 if (flags & HGSMIHOSTFLAGS_GCOMMAND_COMPLETED)1437 {1438 /* read the command offset */1439 HGSMIOFFSET offCmd = VBVO_PORT_READ_U32(VBoxCommonFromDeviceExt(pDevExt)->guestCtx.port);1440 Assert(offCmd != HGSMIOFFSET_VOID);1441 if (offCmd != HGSMIOFFSET_VOID)1442 {1443 VBOXWDDM_HGSMICMD_TYPE enmType = vboxWddmHgsmiGetCmdTypeFromOffset(pDevExt, offCmd);1444 PVBOXVTLIST pList;1445 PVBOXSHGSMI pHeap;1446 switch (enmType)1447 {1448 case VBOXWDDM_HGSMICMD_TYPE_CTL:1449 pList = &CtlList;1450 pHeap = &VBoxCommonFromDeviceExt(pDevExt)->guestCtx.heapCtx;1451 break;1452 default:1453 AssertBreakpoint();1454 pList = NULL;1455 pHeap = NULL;1456 break;1457 }1458 1459 if (pHeap)1460 {1461 uint16_t chInfo;1462 uint8_t RT_UNTRUSTED_VOLATILE_GUEST *pvCmd =1463 HGSMIBufferDataAndChInfoFromOffset(&pHeap->Heap.area, offCmd, &chInfo);1464 Assert(pvCmd);1465 if (pvCmd)1466 {1467 switch (chInfo)1468 {1469 #ifdef VBOX_WITH_VIDEOHWACCEL1470 case VBVA_VHWA_CMD:1471 {1472 vboxVhwaPutList(&VhwaCmdList, (VBOXVHWACMD*)pvCmd);1473 break;1474 }1475 #endif /* # ifdef VBOX_WITH_VIDEOHWACCEL */1476 default:1477 AssertBreakpoint();1478 }1479 }1480 }1481 }1482 }1483 else if (flags & HGSMIHOSTFLAGS_COMMANDS_PENDING)1484 {1485 AssertBreakpoint();1486 /** @todo FIXME: implement !!! */1487 }1488 else1489 break;1490 1491 flags = VBoxCommonFromDeviceExt(pDevExt)->hostCtx.pfHostFlags->u32HostFlags;1492 } while (1);1493 1494 if (!vboxVtListIsEmpty(&CtlList))1495 {1496 vboxVtListCat(&pDevExt->CtlList, &CtlList);1497 bNeedDpc = TRUE;1498 }1499 #ifdef VBOX_WITH_VIDEOHWACCEL1500 if (!vboxVtListIsEmpty(&VhwaCmdList))1501 {1502 vboxVtListCat(&pDevExt->VhwaCmdList, &VhwaCmdList);1503 bNeedDpc = TRUE;1504 }1505 #endif1506 1507 if (pDevExt->bNotifyDxDpc)1508 {1509 bNeedDpc = TRUE;1510 }1511 1512 if (bOur)1513 {1514 if (flags & HGSMIHOSTFLAGS_VSYNC)1515 {1516 Assert(0);1517 DXGKARGCB_NOTIFY_INTERRUPT_DATA notify;1518 for (UINT i = 0; i < (UINT)VBoxCommonFromDeviceExt(pDevExt)->cDisplays; ++i)1519 {1520 PVBOXWDDM_TARGET pTarget = &pDevExt->aTargets[i];1521 if (pTarget->fConnected)1522 {1523 memset(¬ify, 0, sizeof(DXGKARGCB_NOTIFY_INTERRUPT_DATA));1524 notify.InterruptType = DXGK_INTERRUPT_CRTC_VSYNC;1525 notify.CrtcVsync.VidPnTargetId = i;1526 pDevExt->u.primary.DxgkInterface.DxgkCbNotifyInterrupt(pDevExt->u.primary.DxgkInterface.DeviceHandle, ¬ify);1527 bNeedDpc = TRUE;1528 }1529 }1530 }1531 1532 if (pDevExt->bNotifyDxDpc)1533 {1534 bNeedDpc = TRUE;1535 }1536 1537 #if 0 //def DEBUG_misha1538 /* this is not entirely correct since host may concurrently complete some commands and raise a new IRQ while we are here,1539 * still this allows to check that the host flags are correctly cleared after the ISR */1540 Assert(VBoxCommonFromDeviceExt(pDevExt)->hostCtx.pfHostFlags);1541 uint32_t flags = VBoxCommonFromDeviceExt(pDevExt)->hostCtx.pfHostFlags->u32HostFlags;1542 Assert(flags == 0);1543 #endif1544 }1545 1546 if (bNeedDpc)1547 {1548 pDevExt->u.primary.DxgkInterface.DxgkCbQueueDpc(pDevExt->u.primary.DxgkInterface.DeviceHandle);1549 }1550 }1551 1552 // LOGF(("LEAVE, context(0x%p), bOur(0x%x)", MiniportDeviceContext, (ULONG)bOur));1553 1554 return bOur;1555 }1556 1557 1558 typedef struct VBOXWDDM_DPCDATA1559 {1560 VBOXVTLIST CtlList;1561 #ifdef VBOX_WITH_VIDEOHWACCEL1562 VBOXVTLIST VhwaCmdList;1563 #endif1564 LIST_ENTRY CompletedDdiCmdQueue;1565 BOOL bNotifyDpc;1566 } VBOXWDDM_DPCDATA, *PVBOXWDDM_DPCDATA;1567 1568 typedef struct VBOXWDDM_GETDPCDATA_CONTEXT1569 {1570 PVBOXMP_DEVEXT pDevExt;1571 VBOXWDDM_DPCDATA data;1572 } VBOXWDDM_GETDPCDATA_CONTEXT, *PVBOXWDDM_GETDPCDATA_CONTEXT;1573 1574 BOOLEAN vboxWddmGetDPCDataCallback(PVOID Context)1575 {1576 PVBOXWDDM_GETDPCDATA_CONTEXT pdc = (PVBOXWDDM_GETDPCDATA_CONTEXT)Context;1577 PVBOXMP_DEVEXT pDevExt = pdc->pDevExt;1578 vboxVtListDetach2List(&pDevExt->CtlList, &pdc->data.CtlList);1579 #ifdef VBOX_WITH_VIDEOHWACCEL1580 vboxVtListDetach2List(&pDevExt->VhwaCmdList, &pdc->data.VhwaCmdList);1581 #endif1582 1583 pdc->data.bNotifyDpc = pDevExt->bNotifyDxDpc;1584 pDevExt->bNotifyDxDpc = FALSE;1585 1586 ASMAtomicWriteU32(&pDevExt->fCompletingCommands, 0);1587 1588 return TRUE;1589 }1590 1591 static VOID DxgkDdiDpcRoutineLegacy(1592 IN CONST PVOID MiniportDeviceContext1593 )1594 {1595 // LOGF(("ENTER, context(0x%p)", MiniportDeviceContext));1596 1597 vboxVDbgBreakFv();1598 1599 PVBOXMP_DEVEXT pDevExt = (PVBOXMP_DEVEXT)MiniportDeviceContext;1600 1601 VBOXWDDM_GETDPCDATA_CONTEXT context = {0};1602 BOOLEAN bRet;1603 1604 context.pDevExt = pDevExt;1605 1606 /* get DPC data at IRQL */1607 NTSTATUS Status = pDevExt->u.primary.DxgkInterface.DxgkCbSynchronizeExecution(1608 pDevExt->u.primary.DxgkInterface.DeviceHandle,1609 vboxWddmGetDPCDataCallback,1610 &context,1611 0, /* IN ULONG MessageNumber */1612 &bRet);1613 AssertNtStatusSuccess(Status); NOREF(Status);1614 1615 // if (context.data.bNotifyDpc)1616 pDevExt->u.primary.DxgkInterface.DxgkCbNotifyDpc(pDevExt->u.primary.DxgkInterface.DeviceHandle);1617 1618 if (!vboxVtListIsEmpty(&context.data.CtlList))1619 {1620 int rc = VBoxSHGSMICommandPostprocessCompletion (&VBoxCommonFromDeviceExt(pDevExt)->guestCtx.heapCtx, &context.data.CtlList);1621 AssertRC(rc);1622 }1623 #ifdef VBOX_WITH_VIDEOHWACCEL1624 if (!vboxVtListIsEmpty(&context.data.VhwaCmdList))1625 {1626 vboxVhwaCompletionListProcess(pDevExt, &context.data.VhwaCmdList);1627 }1628 #endif1629 1630 // LOGF(("LEAVE, context(0x%p)", MiniportDeviceContext));1631 }1632 1633 1386 NTSTATUS DxgkDdiQueryChildRelations( 1634 1387 IN CONST PVOID MiniportDeviceContext, … … 4858 4611 } 4859 4612 4860 static NTSTATUS vboxWddmInitDisplayOnlyDriver(IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING pRegistryPath )4613 static NTSTATUS vboxWddmInitDisplayOnlyDriver(IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING pRegistryPath, VBOXVIDEO_HWTYPE enmHwType) 4861 4614 { 4862 4615 KMDDOD_INITIALIZATION_DATA DriverInitializationData = {'\0'}; … … 4869 4622 DriverInitializationData.DxgkDdiRemoveDevice = DxgkDdiRemoveDevice; 4870 4623 DriverInitializationData.DxgkDdiDispatchIoRequest = DxgkDdiDispatchIoRequest; 4871 DriverInitializationData.DxgkDdiInterruptRoutine = DxgkDdiInterruptRoutineLegacy; 4872 DriverInitializationData.DxgkDdiDpcRoutine = DxgkDdiDpcRoutineLegacy; 4624 #ifdef VBOX_WITH_MESA3D 4625 if (enmHwType == VBOXVIDEO_HWTYPE_VMSVGA) 4626 { 4627 DriverInitializationData.DxgkDdiInterruptRoutine = GaDxgkDdiInterruptRoutine; 4628 DriverInitializationData.DxgkDdiDpcRoutine = GaDxgkDdiDpcRoutine; 4629 } 4630 else 4631 #endif 4632 { 4633 DriverInitializationData.DxgkDdiInterruptRoutine = DxgkDdiInterruptRoutineLegacy; 4634 DriverInitializationData.DxgkDdiDpcRoutine = DxgkDdiDpcRoutineLegacy; 4635 } 4873 4636 DriverInitializationData.DxgkDdiQueryChildRelations = DxgkDdiQueryChildRelations; 4874 4637 DriverInitializationData.DxgkDdiQueryChildStatus = DxgkDdiQueryChildStatus; … … 4920 4683 } 4921 4684 4922 static NTSTATUS vboxWddmInitFullGraphicsDriver(IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING pRegistryPath )4685 static NTSTATUS vboxWddmInitFullGraphicsDriver(IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING pRegistryPath, VBOXVIDEO_HWTYPE enmHwType) 4923 4686 { 4924 4687 DRIVER_INITIALIZATION_DATA DriverInitializationData = {'\0'}; … … 4937 4700 4938 4701 #ifdef VBOX_WITH_MESA3D 4939 DriverInitializationData.DxgkDdiInterruptRoutine = GaDxgkDdiInterruptRoutine; 4940 DriverInitializationData.DxgkDdiDpcRoutine = GaDxgkDdiDpcRoutine; 4941 DriverInitializationData.DxgkDdiPatch = GaDxgkDdiPatch; 4942 DriverInitializationData.DxgkDdiSubmitCommand = GaDxgkDdiSubmitCommand; 4943 DriverInitializationData.DxgkDdiPreemptCommand = GaDxgkDdiPreemptCommand; 4944 DriverInitializationData.DxgkDdiBuildPagingBuffer = GaDxgkDdiBuildPagingBuffer; 4945 DriverInitializationData.DxgkDdiQueryCurrentFence = GaDxgkDdiQueryCurrentFence; 4946 DriverInitializationData.DxgkDdiRender = GaDxgkDdiRender; 4947 DriverInitializationData.DxgkDdiPresent = GaDxgkDdiPresent; 4948 #endif 4702 if (enmHwType == VBOXVIDEO_HWTYPE_VMSVGA) 4703 { 4704 DriverInitializationData.DxgkDdiInterruptRoutine = GaDxgkDdiInterruptRoutine; 4705 DriverInitializationData.DxgkDdiDpcRoutine = GaDxgkDdiDpcRoutine; 4706 DriverInitializationData.DxgkDdiPatch = GaDxgkDdiPatch; 4707 DriverInitializationData.DxgkDdiSubmitCommand = GaDxgkDdiSubmitCommand; 4708 DriverInitializationData.DxgkDdiPreemptCommand = GaDxgkDdiPreemptCommand; 4709 DriverInitializationData.DxgkDdiBuildPagingBuffer = GaDxgkDdiBuildPagingBuffer; 4710 DriverInitializationData.DxgkDdiQueryCurrentFence = GaDxgkDdiQueryCurrentFence; 4711 DriverInitializationData.DxgkDdiRender = GaDxgkDdiRender; 4712 DriverInitializationData.DxgkDdiPresent = GaDxgkDdiPresent; 4713 } 4714 else 4715 #endif 4716 { 4717 DriverInitializationData.DxgkDdiInterruptRoutine = DxgkDdiInterruptRoutineLegacy; 4718 DriverInitializationData.DxgkDdiDpcRoutine = DxgkDdiDpcRoutineLegacy; 4719 DriverInitializationData.DxgkDdiPatch = DxgkDdiPatchLegacy; 4720 DriverInitializationData.DxgkDdiSubmitCommand = DxgkDdiSubmitCommandLegacy; 4721 DriverInitializationData.DxgkDdiPreemptCommand = DxgkDdiPreemptCommandLegacy; 4722 DriverInitializationData.DxgkDdiBuildPagingBuffer = DxgkDdiBuildPagingBufferLegacy; 4723 DriverInitializationData.DxgkDdiQueryCurrentFence = DxgkDdiQueryCurrentFenceLegacy; 4724 DriverInitializationData.DxgkDdiRender = DxgkDdiRenderLegacy; 4725 DriverInitializationData.DxgkDdiPresent = DxgkDdiPresentLegacy; 4726 } 4949 4727 4950 4728 DriverInitializationData.DxgkDdiQueryChildRelations = DxgkDdiQueryChildRelations; … … 5170 4948 if (g_VBoxDisplayOnly) 5171 4949 { 5172 Status = vboxWddmInitDisplayOnlyDriver(DriverObject, RegistryPath );4950 Status = vboxWddmInitDisplayOnlyDriver(DriverObject, RegistryPath, enmHwType); 5173 4951 } 5174 4952 else 5175 4953 { 5176 Assert(enmHwType == VBOXVIDEO_HWTYPE_VMSVGA); 5177 Status = vboxWddmInitFullGraphicsDriver(DriverObject, RegistryPath); 4954 Status = vboxWddmInitFullGraphicsDriver(DriverObject, RegistryPath, enmHwType); 5178 4955 } 5179 4956 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.h
r80483 r81651 210 210 } while (0) 211 211 212 DECLINLINE(PVBOXWDDM_ALLOCATION) vboxWddmGetAllocationFromAllocList(DXGK_ALLOCATIONLIST *pAllocList) 213 { 214 PVBOXWDDM_OPENALLOCATION pOa = (PVBOXWDDM_OPENALLOCATION)pAllocList->hDeviceSpecificAllocation; 215 return pOa->pAllocation; 216 } 217 212 218 #endif /* !GA_INCLUDED_SRC_WINNT_Graphics_Video_mp_wddm_VBoxMPWddm_h */ 213 219
Note:
See TracChangeset
for help on using the changeset viewer.