Changeset 41471 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp
- Timestamp:
- May 29, 2012 7:12:09 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.cpp
r41337 r41471 1059 1059 } 1060 1060 1061 static VOID vboxWddmDalCheckAddRts(PVBOXWDDMDISP_DEVICE pDevice) 1061 static DECLINLINE(BOOLEAN) vboxWddmDalCheckAddRc(PVBOXWDDMDISP_DEVICE pDevice, PVBOXWDDMDISP_RESOURCE pRc, BOOLEAN fWrite) 1062 { 1063 BOOLEAN fChanged = FALSE; 1064 for (UINT i = 0; i < pRc->cAllocations; ++i) 1065 { 1066 PVBOXWDDMDISP_ALLOCATION pDAlloc = &pRc->aAllocations[i]; 1067 fChanged |= vboxWddmDalCheckAdd(pDevice, pDAlloc, fWrite); 1068 } 1069 return fChanged; 1070 } 1071 1072 static VOID vboxWddmDalCheckAddRtsSamplers(PVBOXWDDMDISP_DEVICE pDevice) 1062 1073 { 1063 1074 for (UINT i = 0; i < pDevice->cRTs; ++i) … … 1068 1079 } 1069 1080 } 1081 1082 for (UINT i = 0, iSampler = 0; iSampler < pDevice->cSamplerTextures; ++i) 1083 { 1084 Assert(i < RT_ELEMENTS(pDevice->aSamplerTextures)); 1085 if (!pDevice->aSamplerTextures[i]) continue; 1086 vboxWddmDalCheckAddRc(pDevice, pDevice->aSamplerTextures[i], FALSE); 1087 ++iSampler; \ 1088 } \ 1089 1070 1090 } 1071 1091 … … 3527 3547 } 3528 3548 3529 #ifdef VBOXWDDMDISP_DEBUG3530 3549 Assert(pDevice->cSamplerTextures < RT_ELEMENTS(pDevice->aSamplerTextures)); 3531 3550 int idx = VBOXWDDMDISP_SAMPLER_IDX(Stage); … … 3550 3569 WARN(("incorrect dampler index1! (%d)\n", Stage)); 3551 3570 } 3552 #endif3553 3571 } 3554 3572 else 3555 3573 { 3556 3574 pD3DIfTex = NULL; 3557 #ifdef VBOXWDDMDISP_DEBUG3558 3575 Assert(pDevice->cSamplerTextures < RT_ELEMENTS(pDevice->aSamplerTextures)); 3559 3576 int idx = VBOXWDDMDISP_SAMPLER_IDX(Stage); … … 3573 3590 WARN(("incorrect dampler index2! (%d)\n", Stage)); 3574 3591 } 3575 #endif3576 3592 } 3577 3593 … … 3753 3769 } 3754 3770 3755 vboxWddmDalCheckAddRts (pDevice);3771 vboxWddmDalCheckAddRtsSamplers(pDevice); 3756 3772 3757 3773 VBOXVDBG_DUMP_DRAWPRIM_LEAVE(pDevice); … … 3807 3823 Assert(hr == S_OK); 3808 3824 3809 vboxWddmDalCheckAddRts (pDevice);3825 vboxWddmDalCheckAddRtsSamplers(pDevice); 3810 3826 3811 3827 VBOXVDBG_DUMP_DRAWPRIM_LEAVE(pDevice); … … 3823 3839 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3824 3840 Assert(0); 3825 vboxWddmDalCheckAddRts (pDevice);3841 vboxWddmDalCheckAddRtsSamplers(pDevice); 3826 3842 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3827 3843 return E_FAIL; … … 3836 3852 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3837 3853 Assert(0); 3838 vboxWddmDalCheckAddRts (pDevice);3854 vboxWddmDalCheckAddRtsSamplers(pDevice); 3839 3855 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3840 3856 return E_FAIL; … … 3929 3945 #endif 3930 3946 3931 vboxWddmDalCheckAddRts (pDevice);3947 vboxWddmDalCheckAddRtsSamplers(pDevice); 3932 3948 3933 3949 VBOXVDBG_DUMP_DRAWPRIM_LEAVE(pDevice); … … 3946 3962 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3947 3963 Assert(0); 3948 vboxWddmDalCheckAddRts (pDevice);3964 vboxWddmDalCheckAddRtsSamplers(pDevice); 3949 3965 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3950 3966 return E_FAIL; … … 4049 4065 } 4050 4066 4051 for (UINT i = 0; i < pDstRc->cAllocations; ++i) 4052 { 4053 PVBOXWDDMDISP_ALLOCATION pDAlloc = &pDstRc->aAllocations[i]; 4054 vboxWddmDalCheckAdd(pDevice, pDAlloc, TRUE); 4055 } 4056 4057 for (UINT i = 0; i < pSrcRc->cAllocations; ++i) 4058 { 4059 PVBOXWDDMDISP_ALLOCATION pDAlloc = &pSrcRc->aAllocations[i]; 4060 vboxWddmDalCheckAdd(pDevice, pDAlloc, FALSE); 4061 } 4067 vboxWddmDalCheckAddRc(pDevice, pDstRc, TRUE); 4068 vboxWddmDalCheckAddRc(pDevice, pSrcRc, FALSE); 4062 4069 4063 4070 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr));
Note:
See TracChangeset
for help on using the changeset viewer.