Changeset 33117 in vbox for trunk/src/VBox
- Timestamp:
- Oct 13, 2010 9:20:52 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Display
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/Makefile.kmk
r33048 r33117 86 86 VBoxDispD3D_DEFS += VBOXWDDM_TEST_UHGSMI 87 87 endif 88 ifdef VBOX_WITH_CRHGSMI 89 VBoxDispD3D_DEFS += VBOX_WITH_CRHGSMI 90 endif 88 91 VBoxDispD3D_SOURCES = \ 89 92 wddm/VBoxDispD3D.cpp \ … … 92 95 wddm/VBoxDispMp.cpp \ 93 96 wddm/VBoxScreen.cpp \ 94 wddm/VBoxUhgsmiDisp.cpp \ 97 $(if $(VBOX_WITH_CRHGSMI),wddm/VBoxUhgsmiDisp.cpp,) \ 98 $(if $(VBOX_WITH_CRHGSMI),wddm/VBoxUhgsmiKmt.cpp,) \ 95 99 wddm/VBoxDispMpTst.cpp \ 96 100 wddm/VBoxDispD3D.def \ … … 107 111 VBoxDispD3D64_SOURCES = $(subst VBoxDispD3D.def,VBoxDispD3D64.def,$(VBoxDispD3D_SOURCES)) 108 112 endif 113 endif 114 115 ifdef VBOX_WITH_CRHGSMI 116 # 117 # VBoxCrHgsmi 118 # 119 LIBRARIES += VBoxCrHgsmi 120 VBoxCrHgsmi_TEMPLATE = VBOXGUESTR3LIB 121 VBoxCrHgsmi_DEFS = UNICODE _UNICODE VBOX_WITH_CRHGSMI IN_VBOXCRHGSMI VBOX_WITH_WDDM VBOX_WITH_VDMA 122 VBoxCrHgsmi_SOURCES = \ 123 wddm/VBoxCrHgsmi.cpp \ 124 wddm/VBoxUhgsmiKmt.cpp 125 VBoxCrHgsmi_SDKS = WINDDKWLH 109 126 endif 110 127 -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r32962 r33117 26 26 #include "VBoxDispD3D.h" 27 27 #include "VBoxScreen.h" 28 #include <VBox/VBoxCrHgsmi.h> 28 29 29 30 #ifdef VBOX_WDDMDISP_WITH_PROFILE … … 705 706 706 707 #define VBOX_QUERYTYPE_COUNT() RT_ELEMENTS(gVBoxQueryTypes) 708 709 static CRITICAL_SECTION g_VBoxCritSect; 710 711 void vboxDispLock() 712 { 713 EnterCriticalSection(&g_VBoxCritSect); 714 } 715 716 void vboxDispUnlock() 717 { 718 LeaveCriticalSection(&g_VBoxCritSect); 719 } 720 721 void vboxDispLockInit() 722 { 723 InitializeCriticalSection(&g_VBoxCritSect); 724 } 725 726 727 #ifdef VBOX_WITH_CRHGSMI 728 /* cr hgsmi */ 729 static VBOXCRHGSMI_CALLBACKS g_VBoxCrHgsmiCallbacks = {0}; 730 static VBOXUHGSMI_PRIVATE_KMT g_VBoxUhgsmiKmt; 731 static uint32_t g_cVBoxUhgsmiKmtRefs = 0; 732 #endif 733 734 VBOXWDDMDISP_DECL(int) VBoxDispCrHgsmiInit(PVBOXCRHGSMI_CALLBACKS pCallbacks) 735 { 736 #ifdef VBOX_WITH_CRHGSMI 737 g_VBoxCrHgsmiCallbacks = *pCallbacks; 738 #endif 739 return VINF_SUCCESS; 740 } 741 742 #ifdef VBOX_WITH_CRHGSMI 743 static __declspec(thread) PVBOXUHGSMI_PRIVATE_BASE gt_pHgsmi = NULL; 744 #endif 745 746 VBOXWDDMDISP_DECL(int) VBoxDispCrHgsmiTerm() 747 { 748 return VINF_SUCCESS; 749 } 750 751 VBOXWDDMDISP_DECL(HVBOXCRHGSMI_CLIENT) VBoxDispCrHgsmiQueryClient() 752 { 753 #ifdef VBOX_WITH_CRHGSMI 754 PVBOXUHGSMI_PRIVATE_BASE pHgsmi = gt_pHgsmi; 755 if (pHgsmi) 756 return pHgsmi->hClient; 757 #endif 758 return NULL; 759 } 760 761 #ifdef VBOX_WITH_CRHGSMI 762 static int vboxUhgsmiGlobalRetain() 763 { 764 int rc = VINF_SUCCESS; 765 vboxDispLock(); 766 if (!g_cVBoxUhgsmiKmtRefs) 767 { 768 rc = vboxUhgsmiKmtCreate(&g_VBoxUhgsmiKmt, TRUE); 769 AssertRC(rc); 770 } 771 772 if (RT_SUCCESS(rc)) 773 { 774 ++g_cVBoxUhgsmiKmtRefs; 775 } 776 vboxDispUnlock(); 777 778 return rc; 779 } 780 781 static int vboxUhgsmiGlobalRelease() 782 { 783 int rc = VINF_SUCCESS; 784 vboxDispLock(); 785 --g_cVBoxUhgsmiKmtRefs; 786 if (!g_cVBoxUhgsmiKmtRefs) 787 { 788 rc = vboxUhgsmiKmtDestroy(&g_VBoxUhgsmiKmt); 789 AssertRC(rc); 790 } 791 vboxDispUnlock(); 792 return rc; 793 } 794 795 DECLINLINE(void) vboxDispCrHgsmiClientSet(PVBOXUHGSMI_PRIVATE_BASE pHgsmi) 796 { 797 gt_pHgsmi = pHgsmi; 798 } 799 800 DECLINLINE(void) vboxDispCrHgsmiClientClear() 801 { 802 gt_pHgsmi = NULL; 803 } 804 805 int vboxUhgsmiGlobalSetCurrent() 806 { 807 int rc = vboxUhgsmiGlobalRetain(); 808 AssertRC(rc); 809 if (RT_SUCCESS(rc)) 810 vboxDispCrHgsmiClientSet(&g_VBoxUhgsmiKmt.BasePrivate); 811 return rc; 812 } 813 814 int vboxUhgsmiGlobalClearCurrent() 815 { 816 vboxUhgsmiGlobalRelease(); 817 vboxDispCrHgsmiClientClear(); 818 return VINF_SUCCESS; 819 } 820 821 class VBoxDispCrHgsmiScope 822 { 823 public: 824 VBoxDispCrHgsmiScope(PVBOXUHGSMI_PRIVATE_BASE pHgsmi) 825 { 826 vboxDispCrHgsmiClientSet(pHgsmi); 827 } 828 829 ~VBoxDispCrHgsmiScope() 830 { 831 vboxDispCrHgsmiClientClear(); 832 } 833 private: 834 }; 835 836 #define VBOXDISPCRHGSMI_SCOPE_SET_DEV(_pDev) VBoxDispCrHgsmiScope __vboxCrHgsmiScope(&(_pDev)->Uhgsmi.BasePrivate) 837 #define VBOXDISPCRHGSMI_SCOPE_SET_GLOBAL() VBoxDispCrHgsmiScope __vboxCrHgsmiScope(&g_VBoxUhgsmiKmt.BasePrivate) 838 #else 839 #define VBOXDISPCRHGSMI_SCOPE_SET_DEV(_pDev) do {} while(0) 840 #define VBOXDISPCRHGSMI_SCOPE_SET_GLOBAL() do {} while(0) 841 #endif 707 842 708 843 #ifdef VBOX_WITH_VIDEOHWACCEL … … 2717 2852 } 2718 2853 2719 2720 static CRITICAL_SECTION g_VBoxCritSect;2721 2722 void vboxDispLock()2723 {2724 EnterCriticalSection(&g_VBoxCritSect);2725 }2726 2727 void vboxDispUnlock()2728 {2729 LeaveCriticalSection(&g_VBoxCritSect);2730 }2731 2732 void vboxDispLockInit()2733 {2734 InitializeCriticalSection(&g_VBoxCritSect);2735 }2736 2737 2854 /** 2738 2855 * DLL entry point. … … 2879 2996 { 2880 2997 vboxVDbgPrint(("==> "__FUNCTION__", hAdapter(0x%p), caps type(%d)\n", hAdapter, pData->Type)); 2998 2999 VBOXDISPCRHGSMI_SCOPE_SET_GLOBAL(); 2881 3000 2882 3001 HRESULT hr = S_OK; … … 3164 3283 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3165 3284 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3285 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3166 3286 Assert(pDevice); 3167 3287 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); … … 3175 3295 { 3176 3296 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 3297 // PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3298 // VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3177 3299 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3178 3300 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 3183 3305 { 3184 3306 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 3307 // PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3308 // VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3185 3309 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3186 3310 Assert(0); … … 3195 3319 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3196 3320 Assert(pDevice); 3321 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3197 3322 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3198 3323 … … 3220 3345 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3221 3346 Assert(pDevice); 3347 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3222 3348 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3223 3349 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)hTexture; … … 3253 3379 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3254 3380 Assert(pDevice); 3381 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3255 3382 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3256 3383 IDirect3DPixelShader9 *pShader = (IDirect3DPixelShader9*)hShaderHandle; … … 3268 3395 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3269 3396 Assert(pDevice); 3397 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3270 3398 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3271 3399 HRESULT hr = pDevice9If->SetPixelShaderConstantF(pData->Register, pRegisters, pData->Count); … … 3281 3409 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3282 3410 Assert(pDevice); 3411 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3283 3412 HRESULT hr = S_OK; 3284 3413 // IDirect3DVertexBuffer9 *pStreamData; … … 3312 3441 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3313 3442 Assert(pDevice); 3443 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3444 3314 3445 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3315 3446 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hIndexBuffer; … … 3340 3471 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3341 3472 Assert(pDevice); 3473 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3474 3342 3475 HRESULT hr = S_OK; 3343 3476 pDevice->IndiciesUm.pvBuffer = pUMBuffer; … … 3353 3486 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3354 3487 Assert(pDevice); 3488 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3489 3355 3490 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3356 3491 Assert(!pFlagBuffer); … … 3640 3775 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3641 3776 Assert(pDevice); 3777 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3778 3642 3779 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3643 3780 //#ifdef DEBUG_misha … … 3694 3831 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 3695 3832 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3833 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3834 Assert(pDevice); 3835 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3696 3836 Assert(0); 3697 3837 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 3703 3843 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 3704 3844 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3845 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3846 Assert(pDevice); 3847 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3705 3848 Assert(0); 3706 3849 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 3714 3857 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3715 3858 Assert(pDevice); 3859 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3860 3716 3861 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3717 3862 HRESULT hr; … … 3811 3956 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 3812 3957 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3958 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3959 Assert(pDevice); 3960 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3813 3961 Assert(0); 3814 3962 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 3820 3968 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 3821 3969 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3970 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3971 Assert(pDevice); 3972 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3822 3973 Assert(0); 3823 3974 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 3829 3980 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 3830 3981 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3982 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3983 Assert(pDevice); 3984 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3831 3985 Assert(0); 3832 3986 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 3840 3994 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3841 3995 Assert(pDevice); 3996 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3842 3997 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3843 3998 PVBOXWDDMDISP_RESOURCE pDstRc = (PVBOXWDDMDISP_RESOURCE)pData->hDstResource; … … 3958 4113 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 3959 4114 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4115 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4116 Assert(pDevice); 4117 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3960 4118 Assert(0); 3961 4119 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 3965 4123 { 3966 4124 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4125 // PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4126 // Assert(pDevice); 4127 // VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3967 4128 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 3968 4129 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 3985 4146 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 3986 4147 Assert(pDevice); 4148 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 3987 4149 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3988 4150 HRESULT hr = pDevice9If->Clear(NumRect, (D3DRECT*)pRect /* see AssertCompile above */, … … 3999 4161 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4000 4162 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4163 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4164 Assert(pDevice); 4165 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4001 4166 Assert(0); 4002 4167 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 4008 4173 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4009 4174 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4175 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4176 Assert(pDevice); 4177 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4010 4178 Assert(0); 4011 4179 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 4019 4187 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4020 4188 Assert(pDevice); 4189 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4021 4190 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 4022 4191 HRESULT hr = pDevice9If->SetVertexShaderConstantF( … … 4032 4201 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4033 4202 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4203 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4204 Assert(pDevice); 4205 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4034 4206 Assert(0); 4035 4207 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 4040 4212 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4041 4213 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4214 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4215 Assert(pDevice); 4216 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4042 4217 Assert(0); 4043 4218 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 4050 4225 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4051 4226 Assert(pDevice); 4227 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4228 4052 4229 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 4053 4230 pDevice->ViewPort.X = pData->X; … … 4066 4243 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4067 4244 Assert(pDevice); 4245 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4246 4068 4247 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 4069 4248 pDevice->ViewPort.MinZ = pData->MinZ; … … 4078 4257 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4079 4258 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4259 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4260 Assert(pDevice); 4261 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4080 4262 Assert(0); 4081 4263 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 4086 4268 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4087 4269 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4270 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4271 Assert(pDevice); 4272 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4088 4273 Assert(0); 4089 4274 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 4094 4279 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4095 4280 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4281 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4282 Assert(pDevice); 4283 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4096 4284 Assert(0); 4097 4285 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 4102 4290 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4103 4291 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4292 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4293 Assert(pDevice); 4294 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4104 4295 Assert(0); 4105 4296 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 4112 4303 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4113 4304 Assert(pDevice); 4305 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4306 4114 4307 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 4115 4308 HRESULT hr = pDevice9If->SetClipPlane(pData->Index, pData->Plane); … … 4123 4316 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4124 4317 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4318 // PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4319 // Assert(pDevice); 4320 // VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4125 4321 HRESULT hr = S_OK; 4126 4322 switch (DevInfoID) … … 4154 4350 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4155 4351 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4352 Assert(pDevice); 4353 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4156 4354 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hResource; 4157 4355 Assert(pData->SubResourceIndex < pRc->cAllocations); … … 4547 4745 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4548 4746 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4747 Assert(pDevice); 4748 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4549 4749 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hResource; 4550 4750 HRESULT hr = S_OK; … … 4703 4903 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4704 4904 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4905 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4906 Assert(pDevice); 4907 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4705 4908 Assert(0); 4706 4909 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 4711 4914 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4712 4915 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4916 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4917 Assert(pDevice); 4918 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4713 4919 Assert(0); 4714 4920 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 4719 4925 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 4720 4926 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 4927 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 4928 Assert(pDevice); 4929 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 4721 4930 Assert(0); 4722 4931 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 5301 5510 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 5302 5511 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5512 Assert(pDevice); 5513 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5303 5514 PVBOXWDDMDISP_ADAPTER pAdapter = pDevice->pAdapter; 5304 5515 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)hResource; … … 5385 5596 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5386 5597 Assert(pDevice); 5598 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5387 5599 Assert(VBOXDISPMODE_IS_3D(pDevice->pAdapter)); 5388 5600 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hResource; … … 5429 5641 // VBOXDISPPROFILE_DDI_CHKDUMPRESET(pDevice); 5430 5642 Assert(pDevice); 5643 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5431 5644 HRESULT hr = S_OK; 5432 5645 if (VBOXDISPMODE_IS_3D(pDevice->pAdapter)) … … 5686 5899 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5687 5900 Assert(pDevice); 5901 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5688 5902 HRESULT hr = S_OK; 5689 5903 if (VBOXDISPMODE_IS_3D(pDevice->pAdapter)) … … 5737 5951 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5738 5952 Assert(pDevice); 5953 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5739 5954 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 5740 5955 IDirect3DVertexDeclaration9 *pDecl; … … 5784 5999 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5785 6000 Assert(pDevice); 6001 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5786 6002 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 5787 6003 IDirect3DVertexDeclaration9 *pDecl = (IDirect3DVertexDeclaration9*)hShaderHandle; … … 5798 6014 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5799 6015 Assert(pDevice); 6016 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5800 6017 IDirect3DVertexDeclaration9 *pDecl = (IDirect3DVertexDeclaration9*)hShaderHandle; 5801 6018 HRESULT hr = S_OK; … … 5810 6027 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5811 6028 Assert(pDevice); 6029 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5812 6030 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 5813 6031 IDirect3DVertexShader9 *pShader; … … 5829 6047 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5830 6048 Assert(pDevice); 6049 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5831 6050 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 5832 6051 IDirect3DVertexShader9 *pShader = (IDirect3DVertexShader9*)hShaderHandle; … … 5843 6062 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5844 6063 Assert(pDevice); 6064 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5845 6065 IDirect3DVertexShader9 *pShader = (IDirect3DVertexShader9*)hShaderHandle; 5846 6066 HRESULT hr = S_OK; … … 5855 6075 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5856 6076 Assert(pDevice); 6077 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5857 6078 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 5858 6079 HRESULT hr = pDevice9If->SetVertexShaderConstantI(pData->Register, pRegisters, pData->Count); … … 5867 6088 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5868 6089 Assert(pDevice); 6090 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5869 6091 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 5870 6092 HRESULT hr = pDevice9If->SetVertexShaderConstantB(pData->Register, pRegisters, pData->Count); … … 5879 6101 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5880 6102 Assert(pDevice); 6103 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5881 6104 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 5882 6105 HRESULT hr = pDevice9If->SetScissorRect(pRect); … … 5891 6114 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 5892 6115 Assert(pDevice); 6116 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5893 6117 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 5894 6118 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hVertexBuffer; … … 5928 6152 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 5929 6153 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6154 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6155 Assert(pDevice); 6156 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5930 6157 Assert(0); 5931 6158 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 5936 6163 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 5937 6164 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6165 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6166 Assert(pDevice); 6167 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5938 6168 Assert(0); 5939 6169 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 5944 6174 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 5945 6175 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6176 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6177 Assert(pDevice); 6178 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 5946 6179 Assert(0); 5947 6180 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6016 6249 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6017 6250 Assert(pDevice); 6251 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6018 6252 // PVBOXWDDMDISP_SCREEN pScreen = &pDevice->aScreens[pDevice->iPrimaryScreen]; 6019 6253 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); … … 6291 6525 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6292 6526 Assert(pDevice); 6527 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6293 6528 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 6294 6529 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hResource; … … 6314 6549 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6315 6550 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6551 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6552 Assert(pDevice); 6553 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6316 6554 Assert(0); 6317 6555 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6322 6560 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6323 6561 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6562 // PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6563 // Assert(pDevice); 6564 // VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6324 6565 HRESULT hr = S_OK; 6325 6566 if (pData->QueryType == D3DDDIQUERYTYPE_EVENT) … … 6350 6591 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6351 6592 HRESULT hr = S_OK; 6593 // PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6594 // Assert(pDevice); 6595 // VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6596 6352 6597 PVBOXWDDMDISP_QUERY pQuery = (PVBOXWDDMDISP_QUERY)hQuery; 6353 6598 Assert(pQuery); … … 6361 6606 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6362 6607 HRESULT hr = S_OK; 6608 // PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6609 // Assert(pDevice); 6610 // VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6611 6363 6612 PVBOXWDDMDISP_QUERY pQuery = (PVBOXWDDMDISP_QUERY)pData->hQuery; 6364 6613 Assert(pQuery); … … 6372 6621 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6373 6622 HRESULT hr = S_OK; 6623 // PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6624 // Assert(pDevice); 6625 // VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6626 6374 6627 PVBOXWDDMDISP_QUERY pQuery = (PVBOXWDDMDISP_QUERY)pData->hQuery; 6375 6628 Assert(pQuery); … … 6396 6649 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6397 6650 Assert(pDevice); 6651 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6652 6398 6653 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 6399 6654 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hRenderTarget; … … 6412 6667 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6413 6668 Assert(pDevice); 6669 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6670 6414 6671 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 6415 6672 PVBOXWDDMDISP_RESOURCE pRc = (PVBOXWDDMDISP_RESOURCE)pData->hZBuffer; … … 6430 6687 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6431 6688 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6689 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6690 Assert(pDevice); 6691 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6692 6432 6693 Assert(0); 6433 6694 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6440 6701 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6441 6702 Assert(pDevice); 6703 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6704 6442 6705 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 6443 6706 HRESULT hr = pDevice9If->SetPixelShaderConstantI(pData->Register, pRegisters, pData->Count); … … 6452 6715 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6453 6716 Assert(pDevice); 6717 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6718 6454 6719 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 6455 6720 HRESULT hr = pDevice9If->SetPixelShaderConstantB(pData->Register, pRegisters, pData->Count); … … 6464 6729 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6465 6730 Assert(pDevice); 6731 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6732 6466 6733 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 6467 6734 IDirect3DPixelShader9 *pShader; … … 6483 6750 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6484 6751 Assert(pDevice); 6752 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6753 6485 6754 IDirect3DPixelShader9 *pShader = (IDirect3DPixelShader9*)hShaderHandle; 6486 6755 HRESULT hr = S_OK; … … 6493 6762 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6494 6763 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6764 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6765 Assert(pDevice); 6766 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6767 6495 6768 Assert(0); 6496 6769 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6501 6774 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6502 6775 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6776 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6777 Assert(pDevice); 6778 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6779 6503 6780 Assert(0); 6504 6781 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6509 6786 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6510 6787 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6788 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6789 Assert(pDevice); 6790 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6791 6511 6792 Assert(0); 6512 6793 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6517 6798 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6518 6799 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6800 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6801 Assert(pDevice); 6802 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6803 6519 6804 Assert(0); 6520 6805 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6525 6810 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6526 6811 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6812 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6813 Assert(pDevice); 6814 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6815 6527 6816 Assert(0); 6528 6817 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6533 6822 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6534 6823 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6824 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6825 Assert(pDevice); 6826 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6827 6535 6828 Assert(0); 6536 6829 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6541 6834 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6542 6835 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6836 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6837 Assert(pDevice); 6838 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6839 6543 6840 Assert(0); 6544 6841 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6549 6846 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6550 6847 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6848 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6849 Assert(pDevice); 6850 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6851 6551 6852 Assert(0); 6552 6853 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6557 6858 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6558 6859 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6860 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6861 Assert(pDevice); 6862 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6863 6559 6864 Assert(0); 6560 6865 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6565 6870 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6566 6871 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6872 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6873 Assert(pDevice); 6874 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6875 6567 6876 Assert(0); 6568 6877 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6573 6882 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6574 6883 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6884 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6885 Assert(pDevice); 6886 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6887 6575 6888 Assert(0); 6576 6889 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6581 6894 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6582 6895 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6896 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6897 Assert(pDevice); 6898 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6899 6583 6900 Assert(0); 6584 6901 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6589 6906 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6590 6907 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6908 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6909 Assert(pDevice); 6910 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6911 6591 6912 Assert(0); 6592 6913 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6597 6918 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6598 6919 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6920 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6921 Assert(pDevice); 6922 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6923 6599 6924 Assert(0); 6600 6925 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6605 6930 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6606 6931 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6932 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6933 Assert(pDevice); 6934 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6935 6607 6936 Assert(0); 6608 6937 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6613 6942 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 6614 6943 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6944 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6945 Assert(pDevice); 6946 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6947 6615 6948 Assert(0); 6616 6949 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 6623 6956 6624 6957 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 6958 Assert(pDevice); 6959 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 6960 6625 6961 VBOXDISPPROFILE_DDI_DUMPRESET(pDevice); 6626 6962 PVBOXWDDMDISP_ADAPTER pAdapter = pDevice->pAdapter; … … 6838 7174 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6839 7175 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 7176 // Assert(pDevice); 7177 // VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 7178 6840 7179 Assert(0); 6841 7180 HRESULT hr = S_OK; … … 6884 7223 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 6885 7224 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 7225 Assert(pDevice); 7226 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 7227 6886 7228 HRESULT hr = S_OK; 6887 7229 6888 Assert(pDevice);6889 7230 Assert(pData->NumAllocations); 6890 7231 PVBOXWDDMDISP_RESOURCE pRc = vboxResourceAlloc(pData->NumAllocations); … … 7035 7376 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 7036 7377 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 7378 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 7379 Assert(pDevice); 7380 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 7381 7037 7382 Assert(0); 7038 7383 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 7044 7389 VBOXDISPPROFILE_FUNCTION_DDI_PROLOGUE(); 7045 7390 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p)\n", hDevice)); 7391 PVBOXWDDMDISP_DEVICE pDevice = (PVBOXWDDMDISP_DEVICE)hDevice; 7392 Assert(pDevice); 7393 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 7394 7046 7395 Assert(0); 7047 7396 vboxVDbgPrintF(("==> "__FUNCTION__", hDevice(0x%p)\n", hDevice)); … … 7195 7544 && !pCreateData->PatchLocationListSize) 7196 7545 { 7546 #ifdef VBOX_WITH_CRHGSMI 7197 7547 hr = vboxUhgsmiD3DInit(&pDevice->Uhgsmi, pDevice); 7198 7548 Assert(hr == S_OK); 7199 7549 if (hr == S_OK) 7200 { 7550 #endif 7551 { 7552 VBOXDISPCRHGSMI_SCOPE_SET_DEV(pDevice); 7553 7201 7554 hr = vboxDispCmCtxCreate(pDevice, &pDevice->DefaultContext); 7202 7555 Assert(hr == S_OK); … … 7284 7637 if (VBOXDISPMODE_IS_3D(pAdapter)) 7285 7638 { 7639 VBOXDISPCRHGSMI_SCOPE_SET_GLOBAL(); 7286 7640 HRESULT hr = VBoxDispWorkerDestroy(&pAdapter->WndWorker); 7287 7641 Assert(hr == S_OK); 7288 7642 pAdapter->pD3D9If->Release(); 7289 7643 VBoxDispD3DClose(&pAdapter->D3D); 7644 7645 #ifdef VBOX_WITH_CRHGSMI 7646 vboxUhgsmiGlobalRelease(); 7647 #endif 7290 7648 } 7291 7649 … … 7368 7726 do 7369 7727 { 7370 /* try enable the 3D */ 7371 hr = VBoxDispD3DOpen(&pAdapter->D3D); 7372 Assert(hr == S_OK); 7373 if (hr == S_OK) 7374 { 7375 // Assert(0); 7376 hr = pAdapter->D3D.pfnDirect3DCreate9Ex(D3D_SDK_VERSION, &pAdapter->pD3D9If); 7728 #ifdef VBOX_WITH_CRHGSMI 7729 int rc = vboxUhgsmiGlobalRetain(); 7730 AssertRC(rc); 7731 if (RT_SUCCESS(rc)) 7732 #endif 7733 { 7734 VBOXDISPCRHGSMI_SCOPE_SET_GLOBAL(); 7735 /* try enable the 3D */ 7736 hr = VBoxDispD3DOpen(&pAdapter->D3D); 7377 7737 Assert(hr == S_OK); 7378 7738 if (hr == S_OK) 7379 7739 { 7380 D3DCAPS9 Caps; 7381 memset(&Caps, 0, sizeof (Caps)); 7382 hr = vboxWddmGetD3D9Caps(pAdapter, &Caps); 7740 // Assert(0); 7741 hr = pAdapter->D3D.pfnDirect3DCreate9Ex(D3D_SDK_VERSION, &pAdapter->pD3D9If); 7383 7742 Assert(hr == S_OK); 7384 7743 if (hr == S_OK) 7385 7744 { 7386 pAdapter->cMaxSimRTs = Caps.NumSimultaneousRTs; 7387 Assert(pAdapter->cMaxSimRTs); 7388 Assert(pAdapter->cMaxSimRTs < UINT32_MAX/2); 7389 hr = VBoxDispWorkerCreate(&pAdapter->WndWorker); 7745 D3DCAPS9 Caps; 7746 memset(&Caps, 0, sizeof (Caps)); 7747 hr = vboxWddmGetD3D9Caps(pAdapter, &Caps); 7390 7748 Assert(hr == S_OK); 7391 7749 if (hr == S_OK) 7392 7750 { 7393 vboxVDbgPrint((__FUNCTION__": SUCCESS 3D Enabled, pAdapter (0x%p)\n", pAdapter)); 7394 break; 7751 pAdapter->cMaxSimRTs = Caps.NumSimultaneousRTs; 7752 Assert(pAdapter->cMaxSimRTs); 7753 Assert(pAdapter->cMaxSimRTs < UINT32_MAX/2); 7754 hr = VBoxDispWorkerCreate(&pAdapter->WndWorker); 7755 Assert(hr == S_OK); 7756 if (hr == S_OK) 7757 { 7758 vboxVDbgPrint((__FUNCTION__": SUCCESS 3D Enabled, pAdapter (0x%p)\n", pAdapter)); 7759 break; 7760 } 7395 7761 } 7762 pAdapter->pD3D9If->Release(); 7396 7763 } 7397 pAdapter->pD3D9If->Release(); 7764 else 7765 vboxVDbgPrintR((__FUNCTION__": pfnDirect3DCreate9Ex failed, hr (%d)\n", hr)); 7766 VBoxDispD3DClose(&pAdapter->D3D); 7398 7767 } 7399 7768 else 7400 vboxVDbgPrintR((__FUNCTION__": pfnDirect3DCreate9Ex failed, hr (%d)\n", hr)); 7401 VBoxDispD3DClose(&pAdapter->D3D); 7769 vboxVDbgPrintR((__FUNCTION__": VBoxDispD3DOpen failed, hr (%d)\n", hr)); 7770 #ifdef VBOX_WITH_CRHGSMI 7771 vboxUhgsmiGlobalRelease(); 7772 #endif 7402 7773 } 7774 #ifdef VBOX_WITH_CRHGSMI 7403 7775 else 7404 vboxVDbgPrintR((__FUNCTION__": VBoxDispD3DOpen failed, hr (%d)\n", hr)); 7776 { 7777 hr = E_FAIL; 7778 } 7779 #endif 7405 7780 } while (0); 7406 7781 } … … 7631 8006 7632 8007 #endif 8008 -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3DCmn.h
r32889 r33117 33 33 #include "../../Miniport/wddm/VBoxVideoIf.h" 34 34 #include "VBoxDispCm.h" 35 #ifdef VBOX_WITH_CRHGSMI 36 #include "VBoxUhgsmiBase.h" 35 37 #include "VBoxUhgsmiDisp.h" 38 #include "VBoxUhgsmiKmt.h" 39 #endif 36 40 #include "VBoxDispD3D.h" 37 41 … … 118 122 #endif 119 123 124 # ifdef VBOXWDDMDISP 125 # define VBOXWDDMDISP_DECL(_type) DECLEXPORT(_type) 126 # else 127 # define VBOXWDDMDISP_DECL(_type) DECLIMPORT(_type) 128 # endif 129 120 130 #endif /* #ifndef ___VBoxDispD3DCmn_h___ */ -
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispMp.cpp
r32496 r33117 62 62 g_VBoxDispMp.cbEscapeCmd = 0; 63 63 vboxVideoCmIterInit(&g_VBoxDispMp.Iterator, NULL, 0); 64 #ifdef VBOX_WITH_CRHGSMI 65 vboxUhgsmiGlobalSetCurrent(); 66 #endif 64 67 return S_OK; 65 68 } … … 70 73 if (g_VBoxDispMp.pEscapeCmd) 71 74 RTMemFree(g_VBoxDispMp.pEscapeCmd); 75 #ifdef VBOX_WITH_CRHGSMI 76 vboxUhgsmiGlobalClearCurrent(); 77 #endif 72 78 return S_OK; 73 79 }
Note:
See TracChangeset
for help on using the changeset viewer.