VirtualBox

Ignore:
Timestamp:
Jun 18, 2010 12:11:00 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62855
Message:

wddm/2d: bugfixing

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

Legend:

Unmodified
Added
Removed
  • 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.

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