VirtualBox

vbox的更動 63051 路徑 trunk/src


忽略:
時間撮記:
2016-8-5 下午03:21:48 (8 年 以前)
作者:
vboxsync
訊息:

GA/NT/Graphics: warnings

檔案:
修改 1 筆資料

圖例:

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

    r62522 r63051  
    184184}
    185185
    186 static void vboxVidPnPopulateSourceModeInfo(D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo,
    187         const RTRECTSIZE *pSize)
    188 {
    189     NTSTATUS Status = STATUS_SUCCESS;
     186static void vboxVidPnPopulateSourceModeInfo(D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, const RTRECTSIZE *pSize)
     187{
    190188    /* this is a graphics mode */
    191189    pNewVidPnSourceModeInfo->Type = D3DKMDT_RMT_GRAPHICS;
     
    203201}
    204202
    205 static void vboxVidPnPopulateMonitorModeInfo(D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSourceMode,
    206         const RTRECTSIZE *pResolution)
     203static void vboxVidPnPopulateMonitorModeInfo(D3DKMDT_MONITOR_SOURCE_MODE *pMonitorSourceMode, const RTRECTSIZE *pResolution)
    207204{
    208205    vboxVidPnPopulateVideoSignalInfo(&pMonitorSourceMode->VideoSignalInfo, pResolution, 60 /* ULONG VSync */);
     
    224221void VBoxVidPnStTargetCleanup(PVBOXWDDM_SOURCE paSources, uint32_t cScreens, PVBOXWDDM_TARGET pTarget)
    225222{
     223    RT_NOREF(cScreens);
    226224    if (pTarget->VidPnSourceId == D3DDDI_ID_UNINITIALIZED)
    227225        return;
     
    439437        pSize->cx = pPinnedVidPnTargetModeInfo->VideoSignalInfo.ActiveSize.cx;
    440438        pSize->cy = pPinnedVidPnTargetModeInfo->VideoSignalInfo.ActiveSize.cy;
    441         NTSTATUS tmpStatus = pCurVidPnTargetModeSetInterface->pfnReleaseModeInfo(hCurVidPnTargetModeSet, pPinnedVidPnTargetModeInfo);
    442         Assert(NT_SUCCESS(tmpStatus));
    443     }
    444 
    445     NTSTATUS tmpStatus = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hCurVidPnTargetModeSet);
    446     Assert(tmpStatus == STATUS_SUCCESS);
     439        NTSTATUS rcNt2 = pCurVidPnTargetModeSetInterface->pfnReleaseModeInfo(hCurVidPnTargetModeSet, pPinnedVidPnTargetModeInfo);
     440        AssertNtStatus(rcNt2);
     441    }
     442
     443    NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hCurVidPnTargetModeSet);
     444    AssertNtStatusSuccess(rcNt2);
    447445
    448446    return Status;
     
    482480        pSize->cx = pPinnedVidPnSourceModeInfo->Format.Graphics.VisibleRegionSize.cx;
    483481        pSize->cy = pPinnedVidPnSourceModeInfo->Format.Graphics.VisibleRegionSize.cy;
    484         NTSTATUS tmpStatus = pCurVidPnSourceModeSetInterface->pfnReleaseModeInfo(hCurVidPnSourceModeSet, pPinnedVidPnSourceModeInfo);
    485         Assert(NT_SUCCESS(tmpStatus));
    486     }
    487 
    488     NTSTATUS tmpStatus = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hCurVidPnSourceModeSet);
    489     Assert(tmpStatus == STATUS_SUCCESS);
     482        NTSTATUS rcNt2 = pCurVidPnSourceModeSetInterface->pfnReleaseModeInfo(hCurVidPnSourceModeSet, pPinnedVidPnSourceModeInfo);
     483        AssertNtStatus(rcNt2);
     484    }
     485
     486    NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hCurVidPnSourceModeSet);
     487    AssertNtStatusSuccess(rcNt2);
    490488
    491489    return Status;
     
    543541            WARN(("pfnAddMode failed, Status 0x%x", Status));
    544542            VBoxVidPnDumpSourceMode("SourceMode: ", pVidPnModeInfo, "\n");
    545             NTSTATUS tmpStatus = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);
    546             Assert(tmpStatus == STATUS_SUCCESS);
     543            NTSTATUS rcNt2 = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);
     544            AssertNtStatusSuccess(rcNt2);
    547545            return Status;
    548546        }
     
    603601            WARN(("pfnAddMode failed, Status 0x%x", Status));
    604602            VBoxVidPnDumpTargetMode("TargetMode: ", pVidPnModeInfo, "\n");
    605             NTSTATUS tmpStatus = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);
    606             Assert(tmpStatus == STATUS_SUCCESS);
     603            NTSTATUS rcNt2 = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);
     604            AssertNtStatusSuccess(rcNt2);
    607605            return Status;
    608606        }
     
    662660        {
    663661            WARN(("pfnAddMode (%d x %d) failed, Status 0x%x", size.cx, size.cy, Status));
    664             NTSTATUS tmpStatus = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);
    665             Assert(tmpStatus == STATUS_SUCCESS);
     662            NTSTATUS rcNt2 = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);
     663            AssertNtStatusSuccess(rcNt2);
    666664            continue;
    667665        }
     
    713711        }
    714712
    715         NTSTATUS tmpStatus = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);
    716         Assert(tmpStatus == STATUS_SUCCESS);
     713        NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);
     714        AssertNtStatusSuccess(rcNt2);
    717715
    718716        if (!NT_SUCCESS(Status))
     
    833831        uint32_t *aAdjustedModeMap,
    834832        const CR_SORTARRAY *aModes,
    835         D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId)
    836 {
     833        D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId,
     834        D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId)
     835{
     836    RT_NOREF(aAdjustedModeMap, VidPnSourceId);
    837837    Assert(ASMBitTest(aAdjustedModeMap, VidPnTargetId));
    838838
     
    872872        vboxVidPnDumpVidPn("\nVidPn: ---------\n", pDevExt, hVidPn, pVidPnInterface, "\n------\n");
    873873        VBoxVidPnDumpMonitorModeSet("MonModeSet: --------\n", pDevExt, VidPnTargetId, "\n------\n");
    874         NTSTATUS tmpStatus = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);
    875         Assert(tmpStatus == STATUS_SUCCESS);
     874        NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);
     875        AssertNtStatusSuccess(rcNt2);
    876876        return Status;
    877877    }
     
    883883        vboxVidPnDumpVidPn("\nVidPn: ---------\n", pDevExt, hVidPn, pVidPnInterface, "\n------\n");
    884884        VBoxVidPnDumpMonitorModeSet("MonModeSet: --------\n", pDevExt, VidPnTargetId, "\n------\n");
    885         NTSTATUS tmpStatus = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);
    886         Assert(tmpStatus == STATUS_SUCCESS);
     885        NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);
     886        AssertNtStatusSuccess(rcNt2);
    887887        return Status;
    888888    }
     
    907907        D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId)
    908908{
     909    RT_NOREF(aAdjustedModeMap);
    909910    Assert(ASMBitTest(aAdjustedModeMap, VidPnTargetId));
    910911
     
    944945        vboxVidPnDumpVidPn("\nVidPn: ---------\n", pDevExt, hVidPn, pVidPnInterface, "\n------\n");
    945946        VBoxVidPnDumpMonitorModeSet("MonModeSet: --------\n", pDevExt, VidPnTargetId, "\n------\n");
    946         NTSTATUS tmpStatus = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);
    947         Assert(tmpStatus == STATUS_SUCCESS);
     947        NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);
     948        AssertNtStatusSuccess(rcNt2);
    948949        return Status;
    949950    }
     
    955956        vboxVidPnDumpVidPn("\nVidPn: ---------\n", pDevExt, hVidPn, pVidPnInterface, "\n------\n");
    956957        VBoxVidPnDumpMonitorModeSet("MonModeSet: --------\n", pDevExt, VidPnTargetId, "\n------\n");
    957         NTSTATUS tmpStatus = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);
    958         Assert(tmpStatus == STATUS_SUCCESS);
     958        NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);
     959        AssertNtStatusSuccess(rcNt2);
    959960        return Status;
    960961    }
     
    10031004        }
    10041005
    1005         NTSTATUS tmpStatus = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);
    1006         Assert(tmpStatus == STATUS_SUCCESS);
     1006        NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);
     1007        AssertNtStatusSuccess(rcNt2);
    10071008
    10081009        if (!NT_SUCCESS(Status))
     
    12041205
    12051206done:
    1206     NTSTATUS tmpStatus = pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hVidPnModeSet);
    1207     if (!NT_SUCCESS(tmpStatus))
    1208         WARN(("pfnReleaseMonitorSourceModeSet failed tmpStatus(0x%x)", tmpStatus));
     1207    NTSTATUS rcNt2 = pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hVidPnModeSet);
     1208    if (!NT_SUCCESS(rcNt2))
     1209        WARN(("pfnReleaseMonitorSourceModeSet failed rcNt2(0x%x)", rcNt2));
    12091210
    12101211    CrSaCleanup(&DiffModes);
     
    12701271    {
    12711272        AssertFailed();
    1272         NTSTATUS tmpStatus = pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo);
    1273         Assert(NT_SUCCESS(tmpStatus));
     1273        NTSTATUS rcNt2 = pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo);
     1274        AssertNtStatus(rcNt2);
    12741275    }
    12751276
     
    13661367        }
    13671368
    1368         if (!pDevExt->fComplexTopologiesEnabled && iSource != i)
     1369        if (!pDevExt->fComplexTopologiesEnabled && iSource != (int32_t)i)
    13691370        {
    13701371            WARN(("complex topologies not supported!"));
     
    14511452                    if (pVidPnModeInfo)
    14521453                    {
    1453                         NTSTATUS tmpStatus = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);
    1454                         Assert(tmpStatus == STATUS_SUCCESS);
     1454                        NTSTATUS rcNt2 = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);
     1455                        AssertNtStatusSuccess(rcNt2);
    14551456                    }
    14561457                }
     
    14581459                    WARN(("pfnCreateNewTargetModeSet failed %#x", Status));
    14591460
    1460                 NTSTATUS tmpStatus = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);
    1461                 Assert(tmpStatus == STATUS_SUCCESS);
     1461                NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hVidPnModeSet);
     1462                AssertNtStatusSuccess(rcNt2);
    14621463            }
    14631464            else
     
    15151516                        if (pVidPnModeInfo)
    15161517                        {
    1517                             NTSTATUS tmpStatus = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);
    1518                             Assert(tmpStatus == STATUS_SUCCESS);
     1518                            NTSTATUS rcNt2 = pVidPnModeSetInterface->pfnReleaseModeInfo(hVidPnModeSet, pVidPnModeInfo);
     1519                            AssertNtStatusSuccess(rcNt2);
    15191520                        }
    15201521                    }
     
    15221523                        WARN(("pfnCreateNewSourceModeSet failed %#x", Status));
    15231524
    1524                     NTSTATUS tmpStatus = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);
    1525                     Assert(tmpStatus == STATUS_SUCCESS);
     1525                    NTSTATUS rcNt2 = pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hVidPnModeSet);
     1526                    AssertNtStatusSuccess(rcNt2);
    15261527                }
    15271528                else
     
    21882189}
    21892190
    2190 NTSTATUS vboxVidPnSetupSourceInfo(PVBOXMP_DEVEXT pDevExt, CONST D3DKMDT_VIDPN_SOURCE_MODE* pVidPnSourceModeInfo, PVBOXWDDM_ALLOCATION pAllocation,
    2191         D3DDDI_VIDEO_PRESENT_SOURCE_ID  VidPnSourceId, VBOXWDDM_SOURCE *paSources)
    2192 {
     2191NTSTATUS vboxVidPnSetupSourceInfo(PVBOXMP_DEVEXT pDevExt, CONST D3DKMDT_VIDPN_SOURCE_MODE* pVidPnSourceModeInfo,
     2192                                  PVBOXWDDM_ALLOCATION pAllocation, D3DDDI_VIDEO_PRESENT_SOURCE_ID  VidPnSourceId,
     2193                                  VBOXWDDM_SOURCE *paSources)
     2194{
     2195    RT_NOREF(pDevExt);
    21932196    PVBOXWDDM_SOURCE pSource = &paSources[VidPnSourceId];
    21942197    /* pVidPnSourceModeInfo could be null if STATUS_GRAPHICS_MODE_NOT_PINNED,
     
    22792282} VBOXVIDPNCOMMITTARGETMODE;
    22802283
    2281 DECLCALLBACK(BOOLEAN) vboxVidPnCommitTargetModeEnum(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
    2282         CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId, SIZE_T cTgtPaths, PVOID pContext)
    2283 {
     2284DECLCALLBACK(BOOLEAN) vboxVidPnCommitTargetModeEnum(PVBOXMP_DEVEXT pDevExt, D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology,
     2285                                                    const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface,
     2286                                                    CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId,
     2287                                                    D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId, SIZE_T cTgtPaths,
     2288                                                    PVOID pContext)
     2289{
     2290    RT_NOREF(hVidPnTopology, pVidPnTopologyInterface, cTgtPaths);
    22842291    VBOXVIDPNCOMMITTARGETMODE *pInfo = (VBOXVIDPNCOMMITTARGETMODE*)pContext;
    22852292    Assert(cTgtPaths <= (SIZE_T)VBoxCommonFromDeviceExt(pDevExt)->cDisplays);
     
    29062913    }
    29072914
    2908     NTSTATUS tmpStatus = pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hVidPnModeSet);
    2909     if (!NT_SUCCESS(tmpStatus))
    2910         WARN(("pfnReleaseMonitorSourceModeSet failed tmpStatus(0x%x)", tmpStatus));
     2915    NTSTATUS rcNt2 = pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hVidPnModeSet);
     2916    if (!NT_SUCCESS(rcNt2))
     2917        WARN(("pfnReleaseMonitorSourceModeSet failed rcNt2(0x%x)", rcNt2));
    29112918
    29122919    LOGREL_EXACT(("%s", pSuffix));
     
    29532960
    29542961
    2955 DECLCALLBACK(BOOLEAN) vboxVidPnDumpSourceModeSetEnum(D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
    2956         const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext)
    2957 {
     2962DECLCALLBACK(BOOLEAN) vboxVidPnDumpSourceModeSetEnum(D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet,
     2963                                                     const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface,
     2964                                                     const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext)
     2965{
     2966
     2967    RT_NOREF(hNewVidPnSourceModeSet, pVidPnSourceModeSetInterface, pNewVidPnSourceModeInfo, pContext);
    29582968    VBoxVidPnDumpSourceMode("SourceMode: ", pNewVidPnSourceModeInfo, "\n");
    29592969    return TRUE;
    29602970}
    29612971
    2962 void vboxVidPnDumpSourceModeSet(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId)
    2963 {
     2972void vboxVidPnDumpSourceModeSet(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
     2973                                D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId)
     2974{
     2975    RT_NOREF(pDevExt);
    29642976    LOGREL_EXACT(("  >>>+++SourceMode Set for Source(%d)+++\n", VidPnSourceId));
    29652977    D3DKMDT_HVIDPNSOURCEMODESET hCurVidPnSourceModeSet;
     
    29913003}
    29923004
    2993 DECLCALLBACK(BOOLEAN) vboxVidPnDumpTargetModeSetEnum(D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
    2994         const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext)
    2995 {
     3005DECLCALLBACK(BOOLEAN) vboxVidPnDumpTargetModeSetEnum(D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet,
     3006                                                     const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface,
     3007                                                     const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext)
     3008{
     3009    RT_NOREF(hNewVidPnTargetModeSet, pVidPnTargetModeSetInterface, pNewVidPnTargetModeInfo, pContext);
    29963010    VBoxVidPnDumpTargetMode("TargetMode: ", pNewVidPnTargetModeInfo, "\n");
    29973011    return TRUE;
    29983012}
    29993013
    3000 void vboxVidPnDumpTargetModeSet(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId)
    3001 {
     3014void vboxVidPnDumpTargetModeSet(PVBOXMP_DEVEXT pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface,
     3015                                D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId)
     3016{
     3017    RT_NOREF(pDevExt);
    30023018    LOGREL_EXACT(("  >>>---TargetMode Set for Target(%d)---\n", VidPnTargetId));
    30033019    D3DKMDT_HVIDPNTARGETMODESET hCurVidPnTargetModeSet;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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