Changeset 33116 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport
- Timestamp:
- Oct 13, 2010 9:06:35 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoIf.h
r32877 r33116 24 24 #include <VBox/VBoxVideo.h> 25 25 #include "../../../include/VBoxDisplay.h" 26 #include "VBoxUhgsmi.h"26 #include <VBox/VBoxUhgsmi.h> 27 27 28 28 #include <iprt/assert.h> … … 30 30 31 31 /* One would increase this whenever definitions in this file are changed */ 32 #define VBOXVIDEOIF_VERSION 632 #define VBOXVIDEOIF_VERSION 7 33 33 34 34 /* create allocation func */ … … 206 206 } VBOXWDDM_OVERLAYFLIP_INFO, *PVBOXWDDM_OVERLAYFLIP_INFO; 207 207 208 209 typedef enum 210 { 211 VBOXWDDM_CONTEXT_TYPE_UNDEFINED = 0, 212 VBOXWDDM_CONTEXT_TYPE_SYSTEM, 213 VBOXWDDM_CONTEXT_TYPE_CUSTOM_3D, 214 VBOXWDDM_CONTEXT_TYPE_CUSTOM_2D, 215 VBOXWDDM_CONTEXT_TYPE_CUSTOM_UHGSMI_3D, 216 VBOXWDDM_CONTEXT_TYPE_CUSTOM_UHGSMI_GL 217 } VBOXWDDM_CONTEXT_TYPE; 218 208 219 typedef struct VBOXWDDM_CREATECONTEXT_INFO 209 220 { … … 211 222 uint32_t u32IfVersion; 212 223 /* true if d3d false if ddraw */ 213 uint32_t u32IsD3D;224 VBOXWDDM_CONTEXT_TYPE enmType; 214 225 /* we use uint64_t instead of HANDLE to ensure structure def is the same for both 32-bit and 64-bit 215 226 * since x64 kernel driver can be called by 32-bit UMD */ -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r33022 r33116 892 892 /* this is not entirely correct since host may concurrently complete some commands and raise a new IRQ while we are here, 893 893 * still this allows to check that the host flags are correctly cleared after the ISR */ 894 Assert( pDevExt->u.primary.pHostFlags);895 uint32_t flags = pDevExt->u.primary.pHostFlags->u32HostFlags;894 Assert(commonFromDeviceExt(pDevExt)->pHostFlags); 895 uint32_t flags = commonFromDeviceExt(pDevExt)->pHostFlags->u32HostFlags; 896 896 Assert(flags == 0); 897 897 #endif … … 4730 4730 { 4731 4731 PVBOXWDDM_CREATECONTEXT_INFO pInfo = (PVBOXWDDM_CREATECONTEXT_INFO)pCreateContext->pPrivateDriverData; 4732 if (pInfo->u32IsD3D)4732 switch (pInfo->enmType) 4733 4733 { 4734 ExInitializeFastMutex(&pContext->SwapchainMutex); 4735 Status = vboxWddmHTableCreate(&pContext->Swapchains, 4); 4736 Assert(Status == STATUS_SUCCESS); 4737 if (Status == STATUS_SUCCESS) 4734 case VBOXWDDM_CONTEXT_TYPE_CUSTOM_3D: 4738 4735 { 4739 pContext->enmType = VBOXWDDM_CONTEXT_TYPE_CUSTOM_3D;4740 Status = vbox VideoCmCtxAdd(&pDevice->pAdapter->CmMgr, &pContext->CmContext, (HANDLE)pInfo->hUmEvent, pInfo->u64UmInfo);4736 ExInitializeFastMutex(&pContext->SwapchainMutex); 4737 Status = vboxWddmHTableCreate(&pContext->Swapchains, 4); 4741 4738 Assert(Status == STATUS_SUCCESS); 4742 4739 if (Status == STATUS_SUCCESS) 4743 4740 { 4744 // Assert(KeGetCurrentIrql() < DISPATCH_LEVEL); 4745 // ExAcquireFastMutex(&pDevExt->ContextMutex); 4746 ASMAtomicIncU32(&pDevExt->cContexts3D); 4747 // ExReleaseFastMutex(&pDevExt->ContextMutex); 4741 pContext->enmType = VBOXWDDM_CONTEXT_TYPE_CUSTOM_3D; 4742 Status = vboxVideoCmCtxAdd(&pDevice->pAdapter->CmMgr, &pContext->CmContext, (HANDLE)pInfo->hUmEvent, pInfo->u64UmInfo); 4743 Assert(Status == STATUS_SUCCESS); 4744 if (Status == STATUS_SUCCESS) 4745 { 4746 // Assert(KeGetCurrentIrql() < DISPATCH_LEVEL); 4747 // ExAcquireFastMutex(&pDevExt->ContextMutex); 4748 ASMAtomicIncU32(&pDevExt->cContexts3D); 4749 // ExReleaseFastMutex(&pDevExt->ContextMutex); 4750 } 4751 else 4752 { 4753 vboxWddmHTableDestroy(&pContext->Swapchains); 4754 } 4748 4755 } 4749 else 4750 { 4751 vboxWddmHTableDestroy(&pContext->Swapchains); 4752 } 4756 break; 4753 4757 } 4754 } 4755 else 4756 { 4757 pContext->enmType = VBOXWDDM_CONTEXT_TYPE_CUSTOM_2D; 4758 case VBOXWDDM_CONTEXT_TYPE_CUSTOM_2D: 4759 case VBOXWDDM_CONTEXT_TYPE_CUSTOM_UHGSMI_3D: 4760 case VBOXWDDM_CONTEXT_TYPE_CUSTOM_UHGSMI_GL: 4761 { 4762 pContext->enmType = pInfo->enmType; 4763 break; 4764 } 4765 default: 4766 { 4767 Assert(0); 4768 Status = STATUS_INVALID_PARAMETER; 4769 break; 4770 } 4758 4771 } 4759 4772 } -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.h
r32877 r33116 146 146 }VBOXWDDM_SWAPCHAIN, *PVBOXWDDM_SWAPCHAIN; 147 147 148 typedef enum149 {150 VBOXWDDM_CONTEXT_TYPE_UNDEFINED = 0,151 VBOXWDDM_CONTEXT_TYPE_SYSTEM,152 VBOXWDDM_CONTEXT_TYPE_CUSTOM_3D,153 VBOXWDDM_CONTEXT_TYPE_CUSTOM_2D154 } VBOXWDDM_CONTEXT_TYPE;155 156 148 typedef struct VBOXWDDM_CONTEXT 157 149 {
Note:
See TracChangeset
for help on using the changeset viewer.