Changeset 51266 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
- Timestamp:
- May 15, 2014 6:25:40 PM (11 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVbva.cpp
r51260 r51266 868 868 PVBOXMP_DEVEXT pDevExt; 869 869 VBOXCMDVBVA *pVbva; 870 uint32_t u32FenceID; 870 /* last completted fence id */ 871 uint32_t u32FenceCompleted; 872 /* last submitted fence id */ 873 uint32_t u32FenceSubmitted; 871 874 } VBOXCMDVBVA_CHECK_COMPLETED_CB; 872 875 … … 876 879 BOOLEAN bRc = DxgkDdiInterruptRoutineNew(pCompleted->pDevExt, 0); 877 880 if (pCompleted->pVbva) 878 pCompleted->u32FenceID = pCompleted->pVbva->u32FenceCompleted; 881 { 882 pCompleted->u32FenceCompleted = pCompleted->pVbva->u32FenceCompleted; 883 pCompleted->u32FenceSubmitted = pCompleted->pVbva->u32FenceSubmitted; 884 } 885 else 886 { 887 WARN(("no vbva")); 888 pCompleted->u32FenceCompleted = 0; 889 pCompleted->u32FenceSubmitted = 0; 890 } 879 891 return bRc; 880 892 } 881 893 882 894 883 static uint32_t vboxCmdVbvaCheckCompleted(PVBOXMP_DEVEXT pDevExt, VBOXCMDVBVA *pVbva, bool fPingHost, HGSMIGUESTCOMMANDCONTEXT *pCtx, bool fBufferOverflow )895 static uint32_t vboxCmdVbvaCheckCompleted(PVBOXMP_DEVEXT pDevExt, VBOXCMDVBVA *pVbva, bool fPingHost, HGSMIGUESTCOMMANDCONTEXT *pCtx, bool fBufferOverflow, uint32_t *pu32FenceSubmitted) 884 896 { 885 897 if (fPingHost) … … 889 901 context.pDevExt = pDevExt; 890 902 context.pVbva = pVbva; 891 context.u32FenceID = 0; 903 context.u32FenceCompleted = 0; 904 context.u32FenceSubmitted = 0; 892 905 BOOLEAN bRet; 893 906 NTSTATUS Status = pDevExt->u.primary.DxgkInterface.DxgkCbSynchronizeExecution( … … 899 912 Assert(Status == STATUS_SUCCESS); 900 913 901 return context.u32FenceID; 914 if (pu32FenceSubmitted) 915 *pu32FenceSubmitted = context.u32FenceSubmitted; 916 917 return context.u32FenceCompleted; 902 918 } 903 919 … … 906 922 PVBOXMP_DEVEXT pDevExt = (PVBOXMP_DEVEXT)pvFlush; 907 923 908 vboxCmdVbvaCheckCompleted(pDevExt, NULL, true /*fPingHost*/, pHGSMICtx, true /*fBufferOverflow*/ );924 vboxCmdVbvaCheckCompleted(pDevExt, NULL, true /*fPingHost*/, pHGSMICtx, true /*fBufferOverflow*/, NULL); 909 925 } 910 926 … … 1139 1155 } 1140 1156 1141 uint32_t VBoxCmdVbvaCheckCompleted(PVBOXMP_DEVEXT pDevExt, VBOXCMDVBVA *pVbva, bool fPingHost )1142 { 1143 return vboxCmdVbvaCheckCompleted(pDevExt, pVbva, fPingHost, &VBoxCommonFromDeviceExt(pDevExt)->guestCtx, false /* fBufferOverflow */ );1157 uint32_t VBoxCmdVbvaCheckCompleted(PVBOXMP_DEVEXT pDevExt, VBOXCMDVBVA *pVbva, bool fPingHost, uint32_t *pu32FenceSubmitted) 1158 { 1159 return vboxCmdVbvaCheckCompleted(pDevExt, pVbva, fPingHost, &VBoxCommonFromDeviceExt(pDevExt)->guestCtx, false /* fBufferOverflow */, pu32FenceSubmitted); 1144 1160 } 1145 1161 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVbva.h
r51260 r51266 216 216 VBOXCMDVBVA_HDR* VBoxCmdVbvaSubmitLock(PVBOXMP_DEVEXT pDevExt, VBOXCMDVBVA *pVbva, uint32_t cbCmd); 217 217 bool VBoxCmdVbvaPreempt(PVBOXMP_DEVEXT pDevExt, VBOXCMDVBVA *pVbva, uint32_t u32FenceID); 218 uint32_t VBoxCmdVbvaCheckCompleted(PVBOXMP_DEVEXT pDevExt, VBOXCMDVBVA *pVbva, bool fPingHost );218 uint32_t VBoxCmdVbvaCheckCompleted(PVBOXMP_DEVEXT pDevExt, VBOXCMDVBVA *pVbva, bool fPingHost, uint32_t *pu32FenceSubmitted); 219 219 bool VBoxCmdVbvaCheckCompletedIrq(PVBOXMP_DEVEXT pDevExt, VBOXCMDVBVA *pVbva); 220 220 -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r51260 r51266 4968 4968 4969 4969 PVBOXMP_DEVEXT pDevExt = (PVBOXMP_DEVEXT)hAdapter; 4970 pCurrentFence->CurrentFence = VBoxCmdVbvaCheckCompleted(pDevExt, &pDevExt->CmdVbva, false); 4970 4971 WARN(("=>DxgkDdiQueryCurrentFenceNew")); 4972 4973 uint32_t u32FenceSubmitted = 0; 4974 uint32_t u32FenceCompleted = 0; 4975 4976 LARGE_INTEGER DelayInterval; 4977 DelayInterval.QuadPart = -10LL * 1000LL * 1000LL; 4978 4979 for (;;) 4980 { 4981 u32FenceCompleted = VBoxCmdVbvaCheckCompleted(pDevExt, &pDevExt->CmdVbva, false, &u32FenceSubmitted); 4982 if (!u32FenceCompleted) 4983 { 4984 WARN(("VBoxCmdVbvaCheckCompleted failed")); 4985 return STATUS_UNSUCCESSFUL; 4986 } 4987 4988 if (u32FenceSubmitted == u32FenceCompleted) 4989 break; 4990 4991 WARN(("uncompleted fences, u32FenceSubmitted(%d), u32FenceCompleted(%d)", u32FenceSubmitted, u32FenceCompleted)); 4992 4993 NTSTATUS Status = KeDelayExecutionThread(KernelMode, FALSE, &DelayInterval); 4994 if (Status != STATUS_SUCCESS) 4995 WARN(("KeDelayExecutionThread failed %#x", Status)); 4996 } 4997 4998 pCurrentFence->CurrentFence = u32FenceCompleted; 4999 5000 WARN(("<=DxgkDdiQueryCurrentFenceNew")); 4971 5001 4972 5002 LOGF(("LEAVE, hAdapter(0x%x)", hAdapter));
Note:
See TracChangeset
for help on using the changeset viewer.