VirtualBox

儲存庫 vbox 的更動 42151


忽略:
時間撮記:
2012-7-13 下午04:45:06 (12 年 以前)
作者:
vboxsync
訊息:

wddm: gdi rendering, etc. fixes

位置:
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp
檔案:
修改 3 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.cpp

    r42060 r42151  
    3232 * to simplify things we just insert breaks for the case of intensive debugging WDDM driver*/
    3333#ifndef VBOX_WDDM_WIN8
    34 bool g_bVBoxVDbgBreakF = false;
    35 bool g_bVBoxVDbgBreakFv = false;
     34int g_bVBoxVDbgBreakF = false;
     35int g_bVBoxVDbgBreakFv = false;
    3636#else
    37 bool g_bVBoxVDbgBreakF = true;
    38 bool g_bVBoxVDbgBreakFv = true;
     37int g_bVBoxVDbgBreakF = false;
     38int g_bVBoxVDbgBreakFv = false;
    3939#endif
    4040#endif
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.h

    r38765 r42151  
    126126 * windbg seems to have some issues when there is a lot ( >~50) of sw breakpoints defined
    127127 * to simplify things we just insert breaks for the case of intensive debugging WDDM driver*/
    128 extern bool g_bVBoxVDbgBreakF;
    129 extern bool g_bVBoxVDbgBreakFv;
     128extern int g_bVBoxVDbgBreakF;
     129extern int g_bVBoxVDbgBreakFv;
    130130#define vboxVDbgBreakF() do { if (g_bVBoxVDbgBreakF) AssertBreakpoint(); } while (0)
    131131#define vboxVDbgBreakFv() do { if (g_bVBoxVDbgBreakFv) AssertBreakpoint(); } while (0)
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r42146 r42151  
    272272}
    273273
    274 NTSTATUS vboxWddmGhDisplaySetInfo(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_SOURCE pSource, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId)
    275 {
    276     NTSTATUS Status = vboxWddmGhDisplaySetMode(pDevExt, &pSource->AllocData);
     274NTSTATUS vboxWddmGhDisplaySetInfo(PVBOXMP_DEVEXT pDevExt, const PVBOXWDDM_ALLOC_DATA pAllocData, const POINT * pVScreenPos)
     275{
     276    NTSTATUS Status = vboxWddmGhDisplaySetMode(pDevExt, pAllocData);
    277277    Assert(Status == STATUS_SUCCESS);
    278278    if (Status == STATUS_SUCCESS)
    279279    {
    280         Status = vboxWddmGhDisplayPostInfoView(pDevExt, &pSource->AllocData);
     280        Status = vboxWddmGhDisplayPostInfoView(pDevExt, pAllocData);
    281281        Assert(Status == STATUS_SUCCESS);
    282282        if (Status == STATUS_SUCCESS)
    283283        {
    284             Status = vboxWddmGhDisplayPostInfoScreen(pDevExt, &pSource->AllocData, &pSource->VScreenPos);
     284            Status = vboxWddmGhDisplayPostInfoScreen(pDevExt, pAllocData, pVScreenPos);
    285285            Assert(Status == STATUS_SUCCESS);
    286             if (Status == STATUS_SUCCESS)
    287                 pSource->bGhSynced = TRUE;
    288             else
     286            if (!NT_SUCCESS(Status))
    289287                WARN(("vboxWddmGhDisplayPostInfoScreen failed"));
    290288        }
     
    296294
    297295    return Status;
     296}
     297
     298bool vboxWddmGhDisplayCheckSetInfoFromSource(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_SOURCE pSource)
     299{
     300    Assert(VBOXVIDEOOFFSET_VOID != pSource->AllocData.Addr.offVram);
     301
     302    if (pSource->bGhSynced)
     303        return false;
     304
     305    PVBOXWDDM_ALLOCATION pFbAlloc = VBOXWDDM_FB_ALLOCATION(pDevExt, pSource);
     306
     307#ifdef VBOX_WDDM_WIN8
     308    Assert(!g_VBoxDisplayOnly == !!pFbAlloc);
     309#else
     310    Assert(pFbAlloc);
     311#endif
     312#ifndef VBOXWDDM_RENDER_FROM_SHADOW
     313    Assert(!pFbAlloc || pFbAlloc->AllocData.Addr.offVram == pSource->AllocData.Addr.offVram);
     314#endif
     315    Assert(!pFbAlloc || pFbAlloc->AllocData.Addr.SegmentId == pSource->AllocData.Addr.SegmentId);
     316
     317    NTSTATUS Status = vboxWddmGhDisplaySetInfo(pDevExt, pFbAlloc ? &pFbAlloc->AllocData : &pSource->AllocData, &pSource->VScreenPos);
     318    if (NT_SUCCESS(Status))
     319        pSource->bGhSynced = TRUE;
     320    else
     321        WARN(("vboxWddmGhDisplaySetInfo failed, Status (0x%x)", Status));
     322
     323    return true;
    298324}
    299325
     
    375401
    376402#ifdef VBOXWDDM_RENDER_FROM_SHADOW
    377 bool vboxWddmCheckUpdateFramebufferAddress(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_SOURCE pSource, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId)
     403bool vboxWddmCheckUpdateFramebufferAddress(PVBOXMP_DEVEXT pDevExt, PVBOXWDDM_SOURCE pSource)
    378404{
    379405    if (pSource->pPrimaryAllocation->enmType == VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC)
     
    383409    }
    384410
    385     Assert(VBOXVIDEOOFFSET_VOID != pSource->AllocData.Addr.offVram);
    386 
    387     if (pSource->bGhSynced)
    388         return false;
    389 
    390     NTSTATUS Status = vboxWddmGhDisplaySetInfo(pDevExt, pSource, VidPnSourceId);
    391     if (!NT_SUCCESS(Status))
    392         WARN(("vboxWddmGhDisplaySetInfo failed, Status (0x%x)", Status));
    393 
    394     return true;
     411    return vboxWddmGhDisplayCheckSetInfoFromSource(pDevExt, pSource);
    395412}
    396413#endif
     
    29642981            vboxWddmAssignShadow(pDevExt, pSource, pSrcAlloc, pS2P->Shadow2Primary.VidPnSourceId);
    29652982            fRenderFromSharedDisabled = vboxWddmModeRenderFromShadowCheckOnSubmitCommand(pDevExt, NULL);
    2966             vboxWddmCheckUpdateFramebufferAddress(pDevExt, pSource, pS2P->Shadow2Primary.VidPnSourceId);
     2983            vboxWddmCheckUpdateFramebufferAddress(pDevExt, pSource);
    29672984            uint32_t cUnlockedVBVADisabled = ASMAtomicReadU32(&pDevExt->cUnlockedVBVADisabled);
    29682985            if (!cUnlockedVBVADisabled)
     
    30073024                if(pContext->enmType != VBOXWDDM_CONTEXT_TYPE_CUSTOM_3D
    30083025                        || pDstAlloc->enmType !=VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC)
    3009                     vboxWddmCheckUpdateFramebufferAddress(pDevExt, pSource, pDstAlloc->AllocData.SurfDesc.VidPnSourceId);
     3026                    vboxWddmCheckUpdateFramebufferAddress(pDevExt, pSource);
    30103027            }
    30113028            else if (pSrcAlloc->bAssigned &&
     
    30193036                if(pContext->enmType != VBOXWDDM_CONTEXT_TYPE_CUSTOM_3D
    30203037                        || pSrcAlloc->enmType !=VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC)
    3021                     vboxWddmCheckUpdateFramebufferAddress(pDevExt, pSource, pSrcAlloc->AllocData.SurfDesc.VidPnSourceId);
     3038                    vboxWddmCheckUpdateFramebufferAddress(pDevExt, pSource);
    30223039            }
    30233040
     
    46274644    pSource->bGhSynced = FALSE; /* force guest->host notification */
    46284645
    4629 #if defined(VBOXWDDM_RENDER_FROM_SHADOW) && defined(VBOX_WDDM_WIN8)
    4630     if (g_VBoxDisplayOnly && !pSource->bGhSynced && pSource->bVisible)
    4631     {
    4632         Status = vboxWddmGhDisplaySetInfo(pDevExt, pSource, pSetVidPnSourceAddress->VidPnSourceId);
    4633         if (!NT_SUCCESS(Status))
    4634         {
    4635             WARN(("vboxWddmGhDisplaySetInfo failed, Status (0x%x)", Status));
    4636         }
    4637     }
    4638 #endif
     4646    if (pSource->bVisible
     4647#if defined(VBOXWDDM_RENDER_FROM_SHADOW)
     4648            && (
     4649# if defined(VBOX_WDDM_WIN8)
     4650            g_VBoxDisplayOnly
     4651                    ||
     4652# endif
     4653                    pDevExt->fRenderToShadowDisabled
     4654                    )
     4655#endif
     4656            )
     4657    {
     4658        vboxWddmGhDisplayCheckSetInfoFromSource(pDevExt, pSource);
     4659    }
    46394660
    46404661    LOGF(("LEAVE, status(0x%x), context(0x%x)", Status, hAdapter));
     
    46794700    {
    46804701        pSource->bVisible = pSetVidPnSourceVisibility->Visible;
    4681 #if defined(VBOXWDDM_RENDER_FROM_SHADOW) && defined(VBOX_WDDM_WIN8)
    4682         if (g_VBoxDisplayOnly && pSource->bVisible)
    4683         {
    4684             Status = vboxWddmGhDisplaySetInfo(pDevExt, pSource, pSetVidPnSourceVisibility->VidPnSourceId);
    4685             if (!NT_SUCCESS(Status))
    4686             {
    4687                 WARN(("vboxWddmGhDisplaySetInfo failed, Status (0x%x)", Status));
    4688             }
    4689         }
    4690 #endif
     4702        if (pSource->bVisible
     4703#if defined(VBOXWDDM_RENDER_FROM_SHADOW)
     4704                && (
     4705# if defined(VBOX_WDDM_WIN8)
     4706                g_VBoxDisplayOnly
     4707                        ||
     4708# endif
     4709                        pDevExt->fRenderToShadowDisabled
     4710                        )
     4711#endif
     4712                )
     4713        {
     4714            vboxWddmGhDisplayCheckSetInfoFromSource(pDevExt, pSource);
     4715        }
    46914716    }
    46924717
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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