VirtualBox

Changeset 30308 in vbox for trunk/src


Ignore:
Timestamp:
Jun 18, 2010 12:11:00 PM (15 years ago)
Author:
vboxsync
Message:

wddm/2d: bugfixing

Location:
trunk/src/VBox/Additions/WINNT/Graphics
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp

    r30216 r30308  
    11511151                    DDRAW_CAPS *pCaps = (DDRAW_CAPS*)pData->pData;
    11521152                    pCaps->Caps |= DDRAW_CAPS_COLORKEY;
    1153                     pCaps->Caps2 |= DDRAW_CAPS2_FLIPNOVSYNC;
     1153//                    pCaps->Caps2 |= DDRAW_CAPS2_FLIPNOVSYNC;
    11541154                }
    11551155#endif
     
    25632563}
    25642564
     2565static D3DDDICB_ALLOCATE* vboxWddmRequestAllocAlloc(D3DDDIARG_CREATERESOURCE* pResource)
     2566{
     2567    /* allocate buffer for D3DDDICB_ALLOCATE + D3DDDI_ALLOCATIONINFO * numAllocs + PVBOXWDDM_RCINFO with aAllocInfos[numAllocs] */
     2568    uint32_t cbBuf = sizeof (D3DDDICB_ALLOCATE);
     2569    uint32_t offDdiAllocInfos = (cbBuf + 7) & ~3;
     2570    uint32_t cbDdiAllocInfos = sizeof (D3DDDI_ALLOCATIONINFO) * pResource->SurfCount;
     2571    cbBuf = offDdiAllocInfos + cbDdiAllocInfos;
     2572    uint32_t offRcInfo = (cbBuf + 7) & ~3;
     2573    uint32_t cbRcInfo = sizeof (VBOXWDDM_RCINFO);
     2574    cbBuf = offRcInfo + cbRcInfo;
     2575    uint32_t offAllocInfos = (cbBuf + 7) & ~3;
     2576    uint32_t cbAllocInfos = sizeof (VBOXWDDM_ALLOCINFO) * pResource->SurfCount;
     2577    cbBuf = offAllocInfos + cbAllocInfos;
     2578    uint8_t *pvBuf = (uint8_t*)RTMemAllocZ(cbBuf);
     2579    Assert(pvBuf);
     2580    if (pvBuf)
     2581    {
     2582        D3DDDICB_ALLOCATE* pAlloc = (D3DDDICB_ALLOCATE*)pvBuf;
     2583        pAlloc->NumAllocations = pResource->SurfCount;
     2584        pAlloc->pAllocationInfo = (D3DDDI_ALLOCATIONINFO*)(pvBuf + offDdiAllocInfos);
     2585        PVBOXWDDM_RCINFO pRcInfo = (PVBOXWDDM_RCINFO)(pvBuf + offRcInfo);
     2586        pAlloc->PrivateDriverDataSize = cbRcInfo;
     2587        pAlloc->pPrivateDriverData = pRcInfo;
     2588        pAlloc->hResource = pResource->hResource;
     2589        PVBOXWDDM_ALLOCINFO pAllocInfos = (PVBOXWDDM_ALLOCINFO)(pvBuf + offAllocInfos);
     2590        for (UINT i = 0; i < pResource->SurfCount; ++i)
     2591        {
     2592            D3DDDI_ALLOCATIONINFO* pDdiAllocInfo = &pAlloc->pAllocationInfo[i];
     2593            PVBOXWDDM_ALLOCINFO pAllocInfo = &pAllocInfos[i];
     2594            pDdiAllocInfo->pPrivateDriverData = pAllocInfo;
     2595            pDdiAllocInfo->PrivateDriverDataSize = sizeof (VBOXWDDM_ALLOCINFO);
     2596        }
     2597        return pAlloc;
     2598    }
     2599    return NULL;
     2600}
    25652601static HRESULT APIENTRY vboxWddmDDevCreateResource(HANDLE hDevice, D3DDDIARG_CREATERESOURCE* pResource)
    25662602{
     
    29242960    else
    29252961    {
    2926         /* allocate buffer for D3DDDICB_ALLOCATE + D3DDDI_ALLOCATIONINFO * numAllocs + PVBOXWDDM_RCINFO with aAllocInfos[numAllocs] */
    2927         uint32_t cbBuf = sizeof (D3DDDICB_ALLOCATE);
    2928         uint32_t offDdiAllocInfos = (cbBuf + 7) & ~3;
    2929         uint32_t cbDdiAllocInfos = sizeof (D3DDDI_ALLOCATIONINFO) * pResource->SurfCount;
    2930         cbBuf = offDdiAllocInfos + cbDdiAllocInfos;
    2931         uint32_t offRcInfo = (cbBuf + 7) & ~3;
    2932         uint32_t cbRcInfo = sizeof (VBOXWDDM_RCINFO);
    2933         cbBuf = offRcInfo + cbRcInfo;
    2934         uint32_t offAllocInfos = (cbBuf + 7) & ~3;
    2935         uint32_t cbAllocInfos = sizeof (VBOXWDDM_ALLOCINFO) * pResource->SurfCount;
    2936         cbBuf = offAllocInfos + cbAllocInfos;
    2937         uint8_t *pvBuf = (uint8_t*)RTMemAllocZ(cbBuf);
    2938         if (pvBuf)
    2939         {
    2940             D3DDDICB_ALLOCATE *pAllocate = (D3DDDICB_ALLOCATE*)pvBuf;
    2941             D3DDDI_ALLOCATIONINFO* pDdiAllocInfos = (D3DDDI_ALLOCATIONINFO*)(pvBuf + offDdiAllocInfos);
    2942             PVBOXWDDM_RCINFO pRcInfo = (PVBOXWDDM_RCINFO)(pvBuf + offRcInfo);
    2943             PVBOXWDDM_ALLOCINFO pAllocInfos = (PVBOXWDDM_ALLOCINFO)(pvBuf + offAllocInfos);
    2944             pAllocate->pPrivateDriverData = pRcInfo;
    2945             pAllocate->PrivateDriverDataSize = cbRcInfo;
    2946             pAllocate->hResource = pResource->hResource;
    2947             pAllocate->hKMResource = NULL;
    2948             pAllocate->NumAllocations = pResource->SurfCount;
    2949             pAllocate->pAllocationInfo = pDdiAllocInfos;
    2950 
    2951             pRcInfo->fFlags = VBOXWDDM_RESOURCE_F_TYPE_GENERIC;
    2952             pRcInfo->RcDesc.fFlags = pResource->Flags;
    2953             pRcInfo->RcDesc.enmFormat = pResource->Format;
    2954             pRcInfo->RcDesc.enmPool = pResource->Pool;
    2955             pRcInfo->RcDesc.enmMultisampleType = pResource->MultisampleType;
    2956             pRcInfo->RcDesc.MultisampleQuality = pResource->MultisampleQuality;
    2957             pRcInfo->RcDesc.MipLevels = pResource->MipLevels;
    2958             pRcInfo->RcDesc.Fvf = pResource->Fvf;
    2959             pRcInfo->RcDesc.VidPnSourceId = pResource->VidPnSourceId;
    2960             pRcInfo->RcDesc.RefreshRate = pResource->RefreshRate;
    2961             pRcInfo->RcDesc.enmRotation = pResource->Rotation;
    2962             pRcInfo->cAllocInfos = pResource->SurfCount;
    2963 
    2964             for (UINT i = 0; i < pResource->SurfCount; ++i)
    2965             {
    2966                 PVBOXWDDM_ALLOCINFO pAllocInfo = &pAllocInfos[i];
    2967                 D3DDDI_ALLOCATIONINFO* pDdiAllocInfo = &pDdiAllocInfos[i];
    2968                 CONST D3DDDI_SURFACEINFO* pSurf = &pResource->pSurfList[i];
    2969                 pDdiAllocInfo->hAllocation = NULL;
    2970                 pDdiAllocInfo->pSystemMem = pSurf->pSysMem;
    2971                 Assert((!!(pSurf->pSysMem)) == (pResource->Pool == D3DDDIPOOL_SYSTEMMEM));
    2972                 pDdiAllocInfo->pPrivateDriverData = pAllocInfo;
    2973                 pDdiAllocInfo->PrivateDriverDataSize = sizeof (VBOXWDDM_ALLOCINFO);
    2974                 pDdiAllocInfo->VidPnSourceId = pResource->VidPnSourceId;
    2975                 pDdiAllocInfo->Flags.Value = 0;
    2976                 if (pResource->Flags.Primary)
    2977                     pDdiAllocInfo->Flags.Primary = 1;
    2978 
    2979                 pAllocInfo->enmType = VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC;
    2980                 pAllocInfo->SurfDesc.width = pSurf->Width;
    2981                 pAllocInfo->SurfDesc.height = pSurf->Height;
    2982                 pAllocInfo->SurfDesc.format = pResource->Format;
    2983                 pAllocInfo->SurfDesc.bpp = vboxWddmCalcBitsPerPixel(pResource->Format);
    2984 
    2985                 if (pSurf->SysMemPitch)
    2986                 {
    2987                     pAllocInfo->SurfDesc.pitch = pSurf->SysMemPitch;
     2962        PVBOXWDDMDISP_RESOURCE pRc = vboxResourceAlloc(pResource->SurfCount);
     2963        Assert(pRc);
     2964        if (pRc)
     2965        {
     2966            pRc->hResource = pResource->hResource;
     2967            pRc->hKMResource = NULL;
     2968            pRc->pDevice = pDevice;
     2969            pRc->fFlags = VBOXWDDM_RESOURCE_F_TYPE_GENERIC;
     2970            pRc->RcDesc.fFlags = pResource->Flags;
     2971            pRc->RcDesc.enmFormat = pResource->Format;
     2972            pRc->RcDesc.enmPool = pResource->Pool;
     2973            pRc->RcDesc.enmMultisampleType = pResource->MultisampleType;
     2974            pRc->RcDesc.MultisampleQuality = pResource->MultisampleQuality;
     2975            pRc->RcDesc.MipLevels = pResource->MipLevels;
     2976            pRc->RcDesc.Fvf = pResource->Fvf;
     2977            pRc->RcDesc.VidPnSourceId = pResource->VidPnSourceId;
     2978            pRc->RcDesc.RefreshRate = pResource->RefreshRate;
     2979            pRc->RcDesc.enmRotation = pResource->Rotation;
     2980            pRc->cAllocations = pResource->SurfCount;
     2981
     2982            D3DDDICB_ALLOCATE *pDdiAllocate = vboxWddmRequestAllocAlloc(pResource);
     2983            Assert(pDdiAllocate);
     2984            if (pDdiAllocate)
     2985            {
     2986                Assert(pDdiAllocate->pPrivateDriverData);
     2987                Assert(pDdiAllocate->PrivateDriverDataSize == sizeof (VBOXWDDM_RCINFO));
     2988                PVBOXWDDM_RCINFO pRcInfo = (PVBOXWDDM_RCINFO)pDdiAllocate->pPrivateDriverData;
     2989                pRcInfo->fFlags = VBOXWDDM_RESOURCE_F_TYPE_GENERIC;
     2990                pRcInfo->RcDesc = pRc->RcDesc;
     2991                pRcInfo->cAllocInfos = pResource->SurfCount;
     2992
     2993                for (UINT i = 0; i < pResource->SurfCount; ++i)
     2994                {
     2995                    D3DDDI_ALLOCATIONINFO *pDdiAllocI = &pDdiAllocate->pAllocationInfo[i];
     2996                    Assert(pDdiAllocI->pPrivateDriverData);
     2997                    Assert(pDdiAllocI->PrivateDriverDataSize == sizeof (VBOXWDDM_ALLOCINFO));
     2998                    PVBOXWDDM_ALLOCINFO pAllocInfo = (PVBOXWDDM_ALLOCINFO)pDdiAllocI->pPrivateDriverData;
     2999                    CONST D3DDDI_SURFACEINFO* pSurf = &pResource->pSurfList[i];
     3000                    pDdiAllocI->hAllocation = NULL;
     3001                    pDdiAllocI->pSystemMem = pSurf->pSysMem;
     3002                    Assert((!!(pSurf->pSysMem)) == (pResource->Pool == D3DDDIPOOL_SYSTEMMEM));
     3003                    pDdiAllocI->VidPnSourceId = pResource->VidPnSourceId;
     3004                    pDdiAllocI->Flags.Value = 0;
     3005                    if (pResource->Flags.Primary)
     3006                        pDdiAllocI->Flags.Primary = 1;
     3007
     3008                    pAllocInfo->enmType = VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC;
     3009                    pAllocInfo->fFlags = pResource->Flags;
     3010                    pAllocInfo->SurfDesc.width = pSurf->Width;
     3011                    pAllocInfo->SurfDesc.height = pSurf->Height;
     3012                    pAllocInfo->SurfDesc.format = pResource->Format;
     3013                    pAllocInfo->SurfDesc.bpp = vboxWddmCalcBitsPerPixel(pResource->Format);
     3014
     3015                    if (pSurf->SysMemPitch)
     3016                    {
     3017                        pAllocInfo->SurfDesc.pitch = pSurf->SysMemPitch;
    29883018#ifdef DEBUG
    2989                     UINT tst = vboxWddmCalcPitch(pSurf->Width, pAllocInfo->SurfDesc.bpp);
    2990                     Assert(tst == pSurf->SysMemPitch);
     3019                        UINT tst = vboxWddmCalcPitch(pSurf->Width, pAllocInfo->SurfDesc.bpp);
     3020                        Assert(tst == pSurf->SysMemPitch);
    29913021#endif
     3022                    }
     3023                    else
     3024                        pAllocInfo->SurfDesc.pitch = vboxWddmCalcPitch(pSurf->Width, pAllocInfo->SurfDesc.bpp);
     3025
     3026                    pAllocInfo->SurfDesc.cbSize = pAllocInfo->SurfDesc.pitch * pAllocInfo->SurfDesc.height;
     3027                    pAllocInfo->SurfDesc.depth = pSurf->Depth;
     3028                    pAllocInfo->SurfDesc.slicePitch = pSurf->SysMemSlicePitch;
     3029                    pAllocInfo->SurfDesc.VidPnSourceId = pResource->VidPnSourceId;
     3030                    pAllocInfo->SurfDesc.RefreshRate = pResource->RefreshRate;
    29923031                }
    2993                 else
    2994                     pAllocInfo->SurfDesc.pitch = vboxWddmCalcPitch(pSurf->Width, pAllocInfo->SurfDesc.bpp);
    2995 
    2996                 pAllocInfo->SurfDesc.cbSize = pAllocInfo->SurfDesc.pitch * pAllocInfo->SurfDesc.height;
    2997                 pAllocInfo->SurfDesc.depth = pSurf->Depth;
    2998                 pAllocInfo->SurfDesc.slicePitch = pSurf->SysMemSlicePitch;
    2999                 pAllocInfo->SurfDesc.VidPnSourceId = pResource->VidPnSourceId;
    3000                 pAllocInfo->SurfDesc.RefreshRate = pResource->RefreshRate;
    3001             }
    3002 
    3003             hr = pDevice->RtCallbacks.pfnAllocateCb(pDevice->hDevice, pAllocate);
    3004             Assert(hr == S_OK);
    3005             if (hr == S_OK)
    3006             {
    3007                 Assert(pAllocate->hKMResource);
    3008                 PVBOXWDDMDISP_RESOURCE pRc = vboxResourceAlloc(pResource->SurfCount);
    3009                 Assert(pRc);
    3010                 if (pRc)
    3011                 {
    3012                     pRc->hResource = pResource->hResource;
    3013                     pRc->hKMResource = pAllocate->hKMResource;
    3014                     pRc->pDevice = pDevice;
    3015                     pRc->fFlags = pRcInfo->fFlags;
    3016                     pRc->RcDesc = pRcInfo->RcDesc;
    3017                     pRc->cAllocations = pRcInfo->cAllocInfos;
    3018                     for (UINT i = 0; i < pRcInfo->cAllocInfos; ++i)
     3032
     3033                hr = pDevice->RtCallbacks.pfnAllocateCb(pDevice->hDevice, pDdiAllocate);
     3034                Assert(hr == S_OK);
     3035                Assert(pDdiAllocate->hKMResource);
     3036                if (hr == S_OK)
     3037                {
     3038                    for (UINT i = 0; i < pResource->SurfCount; ++i)
    30193039                    {
    30203040                        PVBOXWDDMDISP_ALLOCATION pAllocation = &pRc->aAllocations[i];
    3021                         D3DDDI_ALLOCATIONINFO* pDdiAllocInfo = &pDdiAllocInfos[i];
    3022                         PVBOXWDDM_ALLOCINFO pAllocInfo = &pAllocInfos[i];
     3041                        D3DDDI_ALLOCATIONINFO *pDdiAllocI = &pDdiAllocate->pAllocationInfo[i];
     3042                        PVBOXWDDM_ALLOCINFO pAllocInfo = (PVBOXWDDM_ALLOCINFO)pDdiAllocI->pPrivateDriverData;
    30233043                        CONST D3DDDI_SURFACEINFO* pSurf = &pResource->pSurfList[i];
    3024                         pAllocation->hAllocation = pDdiAllocInfo->hAllocation;
     3044                        pAllocation->hAllocation = pDdiAllocI->hAllocation;
    30253045                        pAllocation->enmType = VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC;
    30263046                        pAllocation->pvMem = (void*)pSurf->pSysMem;
    30273047                        pAllocation->SurfDesc = pAllocInfo->SurfDesc;
    30283048                    }
    3029 
    3030                     pResource->hResource = pRc;
    3031     //                vboxResourceFree(pRc);
    30323049                }
    3033                 else
    3034                 {
    3035                     hr = E_OUTOFMEMORY;
    3036                 }
    3037             }
    3038 
    3039             RTMemFree(pvBuf);
     3050            }
     3051            else
     3052            {
     3053                hr = E_OUTOFMEMORY;
     3054            }
     3055
     3056            if (hr == S_OK)
     3057                pResource->hResource = pRc;
     3058            else
     3059                vboxResourceFree(pRc);
    30403060        }
    30413061        else
     
    30913111            hr = pDevice->RtCallbacks.pfnDeallocateCb(pDevice->hDevice, &Dealloc);
    30923112            Assert(hr == S_OK);
     3113//            for (UINT j = 0; j < pRc->cAllocations; ++j)
     3114//            {
     3115//                D3DDDICB_DEALLOCATE Dealloc;
     3116//                Dealloc.hResource = NULL;
     3117//                Dealloc.NumAllocations = 1;
     3118//                Dealloc.HandleList = &pRc->aAllocations[j].hAllocation;
     3119//                HRESULT tmpHr = pDevice->RtCallbacks.pfnDeallocateCb(pDevice->hDevice, &Dealloc);
     3120//                Assert(tmpHr = S_OK);
     3121//            }
    30933122        }
    30943123    }
     
    36203649        OverInfo.VidPnSourceId = pData->VidPnSourceId;
    36213650        OverInfo.OverlayInfo.hAllocation = pAlloc->hAllocation;
     3651        Assert(pAlloc->hAllocation);
    36223652        OverInfo.OverlayInfo.DstRect = *(D3DDDIRECT*)((void*)&pData->OverlayInfo.DstRect);
    36233653        OverInfo.OverlayInfo.SrcRect = *(D3DDDIRECT*)((void*)&pData->OverlayInfo.SrcRect);
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoIf.h

    r30215 r30308  
    2626/* @todo: implement a check to ensure display & miniport versions match.
    2727 * One would increase this whenever definitions in this file are changed */
    28 #define VBOXVIDEOIF_VERSION 2
     28#define VBOXVIDEOIF_VERSION 3
    2929
    3030/* create allocation func */
     
    5858{
    5959    VBOXWDDM_ALLOC_TYPE enmType;
     60    D3DDDI_RESOURCEFLAGS fFlags;
    6061    VBOXWDDM_SURFACE_DESC SurfDesc;
    6162} VBOXWDDM_ALLOCINFO, *PVBOXWDDM_ALLOCINFO;
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVhwa.cpp

    r30264 r30308  
    814814            vboxVhwaCommandSubmitAsynchAndComplete(pOverlay->pDevExt, pCmd);
    815815
     816            pOverlay->pCurentAlloc = pAlloc;
     817
    816818            rc = VINF_SUCCESS;
    817819        }
     
    947949        {
    948950            PVBOXWDDM_ALLOCATION pCurAlloc = &pRc->aAllocations[i];
    949             rc = vboxVhwaHlpCreateSurface(pDevExt, pAlloc,
     951            rc = vboxVhwaHlpCreateSurface(pDevExt, pCurAlloc,
    950952                        0, pRc->cAllocations - 1, VBOXVHWA_SCAPS_OVERLAY | VBOXVHWA_SCAPS_VIDEOMEMORY | VBOXVHWA_SCAPS_LOCALVIDMEM | VBOXVHWA_SCAPS_COMPLEX,
    951953                        VidPnSourceId);
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r30264 r30308  
    15111511                    pAllocationInfo->SupportedWriteSegmentSet = 2;
    15121512#endif
    1513 #ifndef VBOXWDDM_RENDER_FROM_SHADOW
     1513//#ifndef VBOXWDDM_RENDER_FROM_SHADOW
    15141514                    pAllocationInfo->Flags.CpuVisible = 1;
    1515 #endif
     1515//#endif
    15161516                    break;
    15171517                case VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC:
    1518                     Assert(pResource);
    1519                     if (pResource)
     1518//                    Assert(pResource);
     1519//                    if (pResource)
    15201520                    {
    1521                         Assert(pResource->cAllocations);
    1522                         if (pResource->cAllocations)
     1521//                        Assert(pResource->cAllocations);
     1522//                        if (pResource->cAllocations)
    15231523                        {
    15241524#ifdef VBOX_WITH_VIDEOHWACCEL
    1525                             if (pResource->RcDesc.fFlags.Overlay)
     1525                            if (pAllocInfo->fFlags.Overlay)
    15261526                            {
    15271527                                /* actually we can not "properly" issue create overlay commands to the host here
     
    15361536                                    pAllocationInfo->Flags.CpuVisible = 1;
    15371537                                    pAllocationInfo->Size = pAllocation->SurfDesc.cbSize;
     1538
     1539                                    pAllocationInfo->AllocationPriority = D3DDDI_ALLOCATIONPRIORITY_HIGH;
    15381540                                }
    15391541                                else
     
    15421544#endif
    15431545                        }
    1544                         else
    1545                             Status = STATUS_INVALID_PARAMETER;
     1546//                        else
     1547//                            Status = STATUS_INVALID_PARAMETER;
    15461548                    }
    1547                     /* do not break to set CPU visibility flag */
     1549                    break;
    15481550                case VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE:
    15491551                case VBOXWDDM_ALLOC_TYPE_STD_STAGINGSURFACE:
    1550                     pAllocationInfo->Flags.Value = 0;
    15511552                    pAllocationInfo->Flags.CpuVisible = 1;
    15521553                    break;
     
    15581559            }
    15591560
    1560             if (Status != STATUS_SUCCESS)
     1561            if (Status == STATUS_SUCCESS)
     1562            {
     1563                pAllocation->UsageHint.Version = 0;
     1564                pAllocation->UsageHint.v1.Flags.Value = 0;
     1565                pAllocation->UsageHint.v1.Format = pAllocInfo->SurfDesc.format;
     1566                pAllocation->UsageHint.v1.SwizzledFormat = 0;
     1567                pAllocation->UsageHint.v1.ByteOffset = 0;
     1568                pAllocation->UsageHint.v1.Width = pAllocation->SurfDesc.width;
     1569                pAllocation->UsageHint.v1.Height = pAllocation->SurfDesc.height;
     1570                pAllocation->UsageHint.v1.Pitch = pAllocation->SurfDesc.pitch;
     1571                pAllocation->UsageHint.v1.Depth = 0;
     1572                pAllocation->UsageHint.v1.SlicePitch = 0;
     1573
     1574                Assert(!pAllocationInfo->pAllocationUsageHint);
     1575                pAllocationInfo->pAllocationUsageHint = &pAllocation->UsageHint;
     1576            }
     1577            else
    15611578                vboxWddmAllocationDeleteFromResource(pResource, pAllocation);
    15621579        }
     
    32633280        int rc = vboxVhwaHlpOverlayCreate(pDevExt, pCreateOverlay->VidPnSourceId, &pCreateOverlay->OverlayInfo, pOverlay);
    32643281        AssertRC(rc);
    3265         if (RT_FAILURE(rc))
     3282        if (RT_SUCCESS(rc))
     3283        {
     3284            pCreateOverlay->hOverlay = pOverlay;;
     3285        }
     3286        else
     3287        {
     3288            vboxWddmMemFree(pOverlay);
    32663289            Status = STATUS_UNSUCCESSFUL;
     3290        }
    32673291    }
    32683292    else
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.h

    r30239 r30308  
    6363    VBOXWDDM_SURFACE_DESC SurfDesc;
    6464    struct VBOXWDDM_RESOURCE *pResource;
     65    /* to return to the Runtime on DxgkDdiCreateAllocation */
     66    DXGK_ALLOCATIONUSAGEHINT UsageHint;
    6567    uint32_t iIndex;
    6668} VBOXWDDM_ALLOCATION, *PVBOXWDDM_ALLOCATION;
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