VirtualBox

Ignore:
Timestamp:
Feb 19, 2010 5:49:14 PM (15 years ago)
Author:
vboxsync
Message:

wddm: more impl

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r26661 r26667  
    11871187        switch (pAllocInfo->enmType)
    11881188        {
    1189             case VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE:
     1189            case VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE:
    11901190            {
    11911191                Assert(pAllocationInfo->PrivateDriverDataSize >= VBOXWDDM_ALLOCINFO_SIZE(VBOXWDDM_ALLOCINFO_SHAREDPRIMARYSURFACE));
     
    11981198                        if (pAllocation)
    11991199                        {
    1200                             pAllocation->enmType = VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE;
     1200                            pAllocation->enmType = VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE;
    12011201                            pAllocation->u.SurfInfo = pAllocInfo->u.SurfInfo;
    12021202                            PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE pAlloc = VBOXWDDM_ALLOCATION_BODY(pAllocInfo, VBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE);
     
    12381238                else
    12391239                {
    1240                     drprintf((__FUNCTION__ ": ERROR: PrivateDriverDataSize(%d) less than VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE cmd size(%d)\n", pAllocationInfo->PrivateDriverDataSize, VBOXWDDM_ALLOCINFO_SIZE(VBOXWDDM_ALLOCINFO_SHAREDPRIMARYSURFACE)));
     1240                    drprintf((__FUNCTION__ ": ERROR: PrivateDriverDataSize(%d) less than VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE cmd size(%d)\n", pAllocationInfo->PrivateDriverDataSize, VBOXWDDM_ALLOCINFO_SIZE(VBOXWDDM_ALLOCINFO_SHAREDPRIMARYSURFACE)));
    12411241                    Status = STATUS_INVALID_PARAMETER;
    12421242                }
    12431243                break;
    12441244            }
    1245             case VBOXWDDM_ALLOC_STD_SHADOWSURFACE:
    1246             case VBOXWDDM_ALLOC_STD_STAGINGSURFACE:
     1245            case VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE:
     1246            case VBOXWDDM_ALLOC_TYPE_STD_STAGINGSURFACE:
    12471247            {
    12481248                Assert(pAllocationInfo->PrivateDriverDataSize >= VBOXWDDM_ALLOCINFO_HEADSIZE());
     
    12811281                else
    12821282                {
    1283                     drprintf((__FUNCTION__ ": ERROR: PrivateDriverDataSize(%d) less than VBOXWDDM_ALLOC_STD_SHADOWSURFACE cmd size(%d)\n", pAllocationInfo->PrivateDriverDataSize, VBOXWDDM_ALLOCINFO_HEADSIZE()));
     1283                    drprintf((__FUNCTION__ ": ERROR: PrivateDriverDataSize(%d) less than cmd size(%d)\n", pAllocationInfo->PrivateDriverDataSize, VBOXWDDM_ALLOCINFO_HEADSIZE()));
    12841284                    Status = STATUS_INVALID_PARAMETER;
    12851285                }
     
    13891389            {
    13901390                pAllocInfo = (PVBOXWDDM_ALLOCINFO)pGetStandardAllocationDriverData->pAllocationPrivateDriverData;
    1391                 pAllocInfo->enmType = VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE;
     1391                pAllocInfo->enmType = VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE;
    13921392                pAllocInfo->u.SurfInfo.width = pGetStandardAllocationDriverData->pCreateSharedPrimarySurfaceData->Width;
    13931393                pAllocInfo->u.SurfInfo.height = pGetStandardAllocationDriverData->pCreateSharedPrimarySurfaceData->Height;
     
    14191419                {
    14201420                    pAllocInfo = (PVBOXWDDM_ALLOCINFO)pGetStandardAllocationDriverData->pAllocationPrivateDriverData;
    1421                     pAllocInfo->enmType = VBOXWDDM_ALLOC_STD_SHADOWSURFACE;
     1421                    pAllocInfo->enmType = VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE;
    14221422                    pAllocInfo->u.SurfInfo.width = pGetStandardAllocationDriverData->pCreateShadowSurfaceData->Width;
    14231423                    pAllocInfo->u.SurfInfo.height = pGetStandardAllocationDriverData->pCreateShadowSurfaceData->Height;
     
    14451445            {
    14461446                pAllocInfo = (PVBOXWDDM_ALLOCINFO)pGetStandardAllocationDriverData->pAllocationPrivateDriverData;
    1447                 pAllocInfo->enmType = VBOXWDDM_ALLOC_STD_STAGINGSURFACE;
     1447                pAllocInfo->enmType = VBOXWDDM_ALLOC_TYPE_STD_STAGINGSURFACE;
    14481448                pAllocInfo->u.SurfInfo.width = pGetStandardAllocationDriverData->pCreateStagingSurfaceData->Width;
    14491449                pAllocInfo->u.SurfInfo.height = pGetStandardAllocationDriverData->pCreateStagingSurfaceData->Height;
     
    15991599
    16001600    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
     1601
     1602    /* @todo: */
     1603    switch (pBuildPagingBuffer->Operation)
     1604    {
     1605        case DXGK_OPERATION_TRANSFER:
     1606        {
     1607            PVBOXWDDM_ALLOCATION pAllocation = (PVBOXWDDM_ALLOCATION)pBuildPagingBuffer->Transfer.hAllocation;
     1608            break;
     1609        }
     1610        case DXGK_OPERATION_FILL:
     1611            break;
     1612        case DXGK_OPERATION_DISCARD_CONTENT:
     1613            break;
     1614        default:
     1615            drprintf((__FUNCTION__": unsupported op (%d)\n", pBuildPagingBuffer->Operation));
     1616            AssertBreakpoint();
     1617            break;
     1618    }
    16011619
    16021620    dfprintf(("<== "__FUNCTION__ ", context(0x%x)\n", hAdapter));
     
    20332051    )
    20342052{
    2035     return STATUS_NOT_IMPLEMENTED;
     2053    /* The DxgkDdiSetVidPnSourceAddress function should be made pageable. */
     2054    PAGED_CODE();
     2055
     2056    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
     2057
     2058    NTSTATUS Status = STATUS_SUCCESS;
     2059    PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)hAdapter;
     2060    Assert(pDevExt->cSources > pSetVidPnSourceAddress->VidPnSourceId);
     2061    if (pDevExt->cSources > pSetVidPnSourceAddress->VidPnSourceId)
     2062    {
     2063        PVBOXWDDM_SOURCE pSource = &pDevExt->aSources[pSetVidPnSourceAddress->VidPnSourceId];
     2064        PVBOXWDDM_ALLOCATION pAllocation;
     2065        Assert(pSetVidPnSourceAddress->hAllocation);
     2066        Assert(pSetVidPnSourceAddress->hAllocation || pSource->pAllocation);
     2067        Assert (pSetVidPnSourceAddress->Flags.Value < 2); /* i.e. 0 or 1 (ModeChange) */
     2068        if (pSetVidPnSourceAddress->hAllocation)
     2069        {
     2070            pSource->pAllocation = (PVBOXWDDM_ALLOCATION)pSetVidPnSourceAddress->hAllocation;
     2071            pAllocation = (PVBOXWDDM_ALLOCATION)pSetVidPnSourceAddress->hAllocation;
     2072        }
     2073        else
     2074            pAllocation = pSource->pAllocation;
     2075
     2076        Assert(pAllocation);
     2077        if (pAllocation)
     2078        {
     2079            Assert(pAllocation->enmType == VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE);
     2080            PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE pPrimary = VBOXWDDM_ALLOCATION_BODY(pAllocation, VBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE);
     2081            pAllocation->phAddress = pSetVidPnSourceAddress->PrimaryAddress;
     2082            Assert (!pPrimary->bVisible);
     2083            if (pPrimary->bVisible)
     2084            {
     2085                /* @todo: should not generally happen, but still inform host*/
     2086            }
     2087        }
     2088        else
     2089        {
     2090            drprintf((__FUNCTION__": no allocation data available!!\n"));
     2091            Status = STATUS_INVALID_PARAMETER;
     2092        }
     2093    }
     2094    else
     2095    {
     2096        drprintf((__FUNCTION__": invalid VidPnSourceId (%d), should be smaller than (%d)\n", pSetVidPnSourceAddress->VidPnSourceId, pDevExt->cSources));
     2097        Status = STATUS_INVALID_PARAMETER;
     2098    }
     2099
     2100    dfprintf(("<== "__FUNCTION__ ", status(0x%x), context(0x%x)\n", Status, hAdapter));
     2101
     2102    return Status;
    20362103}
    20372104
     
    22422309DECLINLINE(PVBOXWDDM_ALLOCATION_SHAREDPRIMARYSURFACE) vboxWddmCheckForVisiblePrimary(PDEVICE_EXTENSION pDevExt, PVBOXWDDM_ALLOCATION pAllocation)
    22432310{
    2244     if (pAllocation->enmType != VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE)
     2311    if (pAllocation->enmType != VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE)
    22452312        return NULL;
    22462313
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.h

    r26661 r26667  
    2323typedef enum
    2424{
    25     VBOXWDDM_ALLOC_UNEFINED = 0,
    26     VBOXWDDM_ALLOC_STD_SHAREDPRIMARYSURFACE,
    27     VBOXWDDM_ALLOC_STD_SHADOWSURFACE,
    28     VBOXWDDM_ALLOC_STD_STAGINGSURFACE,
     25    VBOXWDDM_ALLOC_TYPE_UNEFINED = 0,
     26    VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE,
     27    VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE,
     28    VBOXWDDM_ALLOC_TYPE_STD_STAGINGSURFACE,
    2929    /* this one is win 7-specific and hence unused for now */
    30     VBOXWDDM_ALLOC_STD_GDISURFACE
     30    VBOXWDDM_ALLOC_TYPE_STD_GDISURFACE
    3131    /* custom allocation types requested from user-mode d3d module will go here */
    3232} VBOXWDDM_ALLOC_TYPE;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette