Changeset 27225 in vbox
- Timestamp:
- Mar 9, 2010 5:11:04 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVidPn.cpp
r27219 r27225 25 25 BOOLEAN bSupported = TRUE; 26 26 27 while (pNewVidPnPresentPathInfo) 28 { 29 /* @todo: which paths do we support? no matter for now 30 pNewVidPnPresentPathInfo->VidPnSourceId 31 pNewVidPnPresentPathInfo->VidPnTargetId 32 33 ImportanceOrdinal does not matter for now 34 pNewVidPnPresentPathInfo->ImportanceOrdinal 35 */ 36 37 if (pNewVidPnPresentPathInfo->ContentTransformation.Scaling != D3DKMDT_VPPS_UNPINNED 38 || pNewVidPnPresentPathInfo->ContentTransformation.Scaling != D3DKMDT_VPPS_IDENTITY 39 || pNewVidPnPresentPathInfo->ContentTransformation.Scaling != D3DKMDT_VPPS_CENTERED) 40 { 41 dprintf(("unsupported Scaling (%d)\n", pNewVidPnPresentPathInfo->ContentTransformation.Scaling)); 42 bSupported = FALSE; 43 break; 44 } 45 46 if (pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Stretched) 47 { 48 dprintf(("unsupported Scaling support (Stretched)\n")); 49 bSupported = FALSE; 50 break; 51 } 52 53 if (!pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Identity 54 && !pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Centered) 55 { 56 dprintf(("\"Identity\" or \"Centered\" Scaling support not set\n")); 57 bSupported = FALSE; 58 break; 59 } 60 61 if (pNewVidPnPresentPathInfo->ContentTransformation.Rotation != D3DKMDT_VPPR_IDENTITY) 62 { 63 dprintf(("unsupported rotation (%d)\n", pNewVidPnPresentPathInfo->ContentTransformation.Rotation)); 64 bSupported = FALSE; 65 break; 66 } 67 68 if (pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate180 69 || pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate270 70 || pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate90) 71 { 72 dprintf(("unsupported RotationSupport\n")); 73 bSupported = FALSE; 74 break; 75 } 76 77 if (!pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Identity) 78 { 79 dprintf(("\"Identity\" RotationSupport not set\n")); 80 bSupported = FALSE; 81 break; 82 } 83 84 if (pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cx 85 || pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cy) 86 { 87 dprintf(("Non-zero TLOffset: cx(%d), cy(%d)\n", 88 pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cx, 89 pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cy)); 90 bSupported = FALSE; 91 break; 92 } 93 94 if (pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cx 95 || pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cy) 96 { 97 dprintf(("Non-zero TLOffset: cx(%d), cy(%d)\n", 98 pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cx, 99 pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cy)); 100 bSupported = FALSE; 101 break; 102 } 103 104 if (pNewVidPnPresentPathInfo->VidPnTargetColorBasis != D3DKMDT_CB_SRGB) 105 { 106 dprintf(("unsupported VidPnTargetColorBasis (%d)\n", pNewVidPnPresentPathInfo->VidPnTargetColorBasis)); 107 bSupported = FALSE; 108 break; 109 } 110 111 /* channels? 112 pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FirstChannel; 113 pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.SecondChannel; 114 pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.ThirdChannel; 115 we definitely not support fourth channel 116 */ 117 if (pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FourthChannel) 118 { 119 dprintf(("Non-zero FourthChannel (%d)\n", pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FourthChannel)); 120 bSupported = FALSE; 121 break; 122 } 123 124 /* Content (D3DKMDT_VPPC_GRAPHICS, _NOTSPECIFIED, _VIDEO), does not matter for now 125 pNewVidPnPresentPathInfo->Content 126 */ 127 /* not support copy protection for now */ 128 if (pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionType != D3DKMDT_VPPMT_NOPROTECTION) 129 { 130 dprintf(("Copy protection not supported CopyProtectionType(%d)\n", pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionType)); 131 bSupported = FALSE; 132 break; 133 } 134 135 if (pNewVidPnPresentPathInfo->CopyProtection.APSTriggerBits) 136 { 137 dprintf(("Copy protection not supported APSTriggerBits(%d)\n", pNewVidPnPresentPathInfo->CopyProtection.APSTriggerBits)); 138 bSupported = FALSE; 139 break; 140 } 141 142 D3DKMDT_VIDPN_PRESENT_PATH_COPYPROTECTION_SUPPORT tstCPSupport = {0}; 143 tstCPSupport.NoProtection = 1; 144 if (memcmp(&tstCPSupport, &pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport, sizeof(tstCPSupport))) 145 { 146 dprintf(("Copy protection support (0x%x)\n", *((UINT*)&pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport))); 147 bSupported = FALSE; 148 break; 149 } 150 151 if (pNewVidPnPresentPathInfo->GammaRamp.Type != D3DDDI_GAMMARAMP_DEFAULT) 152 { 153 dprintf(("Unsupported GammaRamp.Type (%d)\n", pNewVidPnPresentPathInfo->GammaRamp.Type)); 154 bSupported = FALSE; 155 break; 156 } 157 158 if (pNewVidPnPresentPathInfo->GammaRamp.DataSize != 0) 159 { 160 dprintf(("Warning: non-zero GammaRamp.DataSize (%d), treating as supported\n", pNewVidPnPresentPathInfo->GammaRamp.DataSize)); 161 } 162 163 const D3DKMDT_VIDPN_PRESENT_PATH *pNextVidPnPresentPathInfo; 164 165 Status = pVidPnTopologyInterface->pfnAcquireNextPathInfo(hVidPnTopology, pNewVidPnPresentPathInfo, &pNextVidPnPresentPathInfo); 166 pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo); 167 if (Status == STATUS_SUCCESS) 168 { 169 pNewVidPnPresentPathInfo = pNextVidPnPresentPathInfo; 170 } 171 else 172 { 173 AssertBreakpoint(); 174 dprintf(("pfnAcquireNextPathInfo Failed Status(0x%x)\n", Status)); 175 pNewVidPnPresentPathInfo = NULL; 176 break; 177 } 178 } 179 180 if (pNewVidPnPresentPathInfo) 181 pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo); 27 if (Status == STATUS_SUCCESS) 28 { 29 while (1) 30 { 31 /* @todo: which paths do we support? no matter for now 32 pNewVidPnPresentPathInfo->VidPnSourceId 33 pNewVidPnPresentPathInfo->VidPnTargetId 34 35 ImportanceOrdinal does not matter for now 36 pNewVidPnPresentPathInfo->ImportanceOrdinal 37 */ 38 39 if (pNewVidPnPresentPathInfo->ContentTransformation.Scaling != D3DKMDT_VPPS_UNPINNED 40 && pNewVidPnPresentPathInfo->ContentTransformation.Scaling != D3DKMDT_VPPS_IDENTITY 41 && pNewVidPnPresentPathInfo->ContentTransformation.Scaling != D3DKMDT_VPPS_CENTERED) 42 { 43 dprintf(("unsupported Scaling (%d)\n", pNewVidPnPresentPathInfo->ContentTransformation.Scaling)); 44 bSupported = FALSE; 45 break; 46 } 47 48 if (pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Stretched) 49 { 50 dprintf(("unsupported Scaling support (Stretched)\n")); 51 bSupported = FALSE; 52 break; 53 } 54 55 if (!pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Identity 56 && !pNewVidPnPresentPathInfo->ContentTransformation.ScalingSupport.Centered) 57 { 58 dprintf(("\"Identity\" or \"Centered\" Scaling support not set\n")); 59 bSupported = FALSE; 60 break; 61 } 62 63 if (pNewVidPnPresentPathInfo->ContentTransformation.Rotation != D3DKMDT_VPPR_UNPINNED 64 && pNewVidPnPresentPathInfo->ContentTransformation.Rotation != D3DKMDT_VPPR_IDENTITY) 65 { 66 dprintf(("unsupported rotation (%d)\n", pNewVidPnPresentPathInfo->ContentTransformation.Rotation)); 67 bSupported = FALSE; 68 break; 69 } 70 71 if (pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate180 72 || pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate270 73 || pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Rotate90) 74 { 75 dprintf(("unsupported RotationSupport\n")); 76 bSupported = FALSE; 77 break; 78 } 79 80 if (!pNewVidPnPresentPathInfo->ContentTransformation.RotationSupport.Identity) 81 { 82 dprintf(("\"Identity\" RotationSupport not set\n")); 83 bSupported = FALSE; 84 break; 85 } 86 87 if (pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cx 88 || pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cy) 89 { 90 dprintf(("Non-zero TLOffset: cx(%d), cy(%d)\n", 91 pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cx, 92 pNewVidPnPresentPathInfo->VisibleFromActiveTLOffset.cy)); 93 bSupported = FALSE; 94 break; 95 } 96 97 if (pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cx 98 || pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cy) 99 { 100 dprintf(("Non-zero TLOffset: cx(%d), cy(%d)\n", 101 pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cx, 102 pNewVidPnPresentPathInfo->VisibleFromActiveBROffset.cy)); 103 bSupported = FALSE; 104 break; 105 } 106 107 if (pNewVidPnPresentPathInfo->VidPnTargetColorBasis != D3DKMDT_CB_SRGB 108 && pNewVidPnPresentPathInfo->VidPnTargetColorBasis != D3DKMDT_CB_UNINITIALIZED) 109 { 110 dprintf(("unsupported VidPnTargetColorBasis (%d)\n", pNewVidPnPresentPathInfo->VidPnTargetColorBasis)); 111 bSupported = FALSE; 112 break; 113 } 114 115 /* channels? 116 pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FirstChannel; 117 pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.SecondChannel; 118 pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.ThirdChannel; 119 we definitely not support fourth channel 120 */ 121 if (pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FourthChannel) 122 { 123 dprintf(("Non-zero FourthChannel (%d)\n", pNewVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges.FourthChannel)); 124 bSupported = FALSE; 125 break; 126 } 127 128 /* Content (D3DKMDT_VPPC_GRAPHICS, _NOTSPECIFIED, _VIDEO), does not matter for now 129 pNewVidPnPresentPathInfo->Content 130 */ 131 /* not support copy protection for now */ 132 if (pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionType != D3DKMDT_VPPMT_NOPROTECTION) 133 { 134 dprintf(("Copy protection not supported CopyProtectionType(%d)\n", pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionType)); 135 bSupported = FALSE; 136 break; 137 } 138 139 if (pNewVidPnPresentPathInfo->CopyProtection.APSTriggerBits) 140 { 141 dprintf(("Copy protection not supported APSTriggerBits(%d)\n", pNewVidPnPresentPathInfo->CopyProtection.APSTriggerBits)); 142 bSupported = FALSE; 143 break; 144 } 145 146 D3DKMDT_VIDPN_PRESENT_PATH_COPYPROTECTION_SUPPORT tstCPSupport = {0}; 147 tstCPSupport.NoProtection = 1; 148 if (memcmp(&tstCPSupport, &pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport, sizeof(tstCPSupport))) 149 { 150 dprintf(("Copy protection support (0x%x)\n", *((UINT*)&pNewVidPnPresentPathInfo->CopyProtection.CopyProtectionSupport))); 151 bSupported = FALSE; 152 break; 153 } 154 155 if (pNewVidPnPresentPathInfo->GammaRamp.Type != D3DDDI_GAMMARAMP_DEFAULT) 156 { 157 dprintf(("Unsupported GammaRamp.Type (%d)\n", pNewVidPnPresentPathInfo->GammaRamp.Type)); 158 bSupported = FALSE; 159 break; 160 } 161 162 if (pNewVidPnPresentPathInfo->GammaRamp.DataSize != 0) 163 { 164 dprintf(("Warning: non-zero GammaRamp.DataSize (%d), treating as supported\n", pNewVidPnPresentPathInfo->GammaRamp.DataSize)); 165 } 166 167 const D3DKMDT_VIDPN_PRESENT_PATH *pNextVidPnPresentPathInfo; 168 169 Status = pVidPnTopologyInterface->pfnAcquireNextPathInfo(hVidPnTopology, pNewVidPnPresentPathInfo, &pNextVidPnPresentPathInfo); 170 pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo); 171 if (Status == STATUS_SUCCESS) 172 { 173 pNewVidPnPresentPathInfo = pNextVidPnPresentPathInfo; 174 } 175 else if (Status == STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET) 176 { 177 Status = STATUS_SUCCESS; 178 break; 179 } 180 else 181 { 182 AssertBreakpoint(); 183 dprintf(("pfnAcquireNextPathInfo Failed Status(0x%x)\n", Status)); 184 pNewVidPnPresentPathInfo = NULL; 185 break; 186 } 187 } 188 189 if (pNewVidPnPresentPathInfo) 190 pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pNewVidPnPresentPathInfo); 191 192 } 193 else if (Status == STATUS_GRAPHICS_DATASET_IS_EMPTY) 194 Status = STATUS_SUCCESS; 195 else 196 drprintf((__FUNCTION__": pfnAcquireFirstPathInfo failed Status(0x%x)\n", Status)); 182 197 183 198 *pbSupported = bSupported; … … 240 255 if (Status == STATUS_SUCCESS) 241 256 { 242 while ( pNewVidPnSourceModeInfo)257 while (1) 243 258 { 244 259 Status = vboxVidPnCheckSourceModeInfo(hDesiredVidPn, pNewVidPnSourceModeInfo, &bSupported); … … 252 267 pNewVidPnSourceModeInfo = pNextVidPnSourceModeInfo; 253 268 } 269 else if (Status == STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET) 270 { 271 Status = STATUS_SUCCESS; 272 break; 273 } 254 274 else 255 275 { … … 265 285 } 266 286 } 287 else if (Status == STATUS_GRAPHICS_DATASET_IS_EMPTY) 288 Status = STATUS_SUCCESS; 267 289 else 268 {269 290 drprintf(("VBoxVideoWddm: pfnAcquireFirstModeInfo failed Status(0x%x)\n", Status)); 270 }271 291 272 292 *pbSupported = bSupported; … … 325 345 if (Status == STATUS_SUCCESS) 326 346 { 327 while (pNewVidPnTargetModeInfo) 347 Assert(pNewVidPnTargetModeInfo); 348 while (1) 328 349 { 329 350 Status = vboxVidPnCheckTargetModeInfo(hDesiredVidPn, pNewVidPnTargetModeInfo, &bSupported); … … 337 358 pNewVidPnTargetModeInfo = pNextVidPnTargetModeInfo; 338 359 } 360 else if (Status == STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET) 361 { 362 Status = STATUS_SUCCESS; 363 break; 364 } 339 365 else 340 366 { … … 350 376 } 351 377 } 378 else if (Status == STATUS_GRAPHICS_DATASET_IS_EMPTY) 379 Status = STATUS_SUCCESS; 352 380 else 353 {354 381 drprintf((__FUNCTION__": pfnAcquireFirstModeInfo failed Status(0x%x)\n", Status)); 355 }356 382 357 383 *pbSupported = bSupported; … … 798 824 if (Status == STATUS_SUCCESS) 799 825 { 800 while (pNewVidPnSourceModeInfo) 826 Assert(pNewVidPnSourceModeInfo); 827 while (1) 801 828 { 802 829 const D3DKMDT_VIDPN_SOURCE_MODE *pNextVidPnSourceModeInfo; … … 809 836 if (Status == STATUS_SUCCESS) 810 837 pVidPnSourceModeSetInterface->pfnReleaseModeInfo(hNewVidPnSourceModeSet, pNextVidPnSourceModeInfo); 838 else if (Status == STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET) 839 { 840 Status = STATUS_SUCCESS; 841 break; 842 } 811 843 else 812 844 { … … 828 860 } 829 861 } 862 else if (Status == STATUS_GRAPHICS_DATASET_IS_EMPTY) 863 Status = STATUS_SUCCESS; 830 864 else 831 {832 865 drprintf((__FUNCTION__": pfnAcquireFirstModeInfo failed Status(0x%x)\n", Status)); 833 }834 866 835 867 return Status; … … 844 876 if (Status == STATUS_SUCCESS) 845 877 { 846 while (pNewVidPnTargetModeInfo) 878 Assert(pNewVidPnTargetModeInfo); 879 while (1) 847 880 { 848 881 const D3DKMDT_VIDPN_TARGET_MODE *pNextVidPnTargetModeInfo; … … 855 888 if (Status == STATUS_SUCCESS) 856 889 pVidPnTargetModeSetInterface->pfnReleaseModeInfo(hNewVidPnTargetModeSet, pNextVidPnTargetModeInfo); 890 else if (Status == STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET) 891 { 892 Status = STATUS_SUCCESS; 893 break; 894 } 857 895 else 858 896 { … … 874 912 } 875 913 } 914 else if (Status == STATUS_GRAPHICS_DATASET_IS_EMPTY) 915 Status = STATUS_SUCCESS; 876 916 else 877 {878 917 drprintf((__FUNCTION__": pfnAcquireFirstModeInfo failed Status(0x%x)\n", Status)); 879 }880 918 881 919 return Status; … … 891 929 if (Status == STATUS_SUCCESS) 892 930 { 893 while ( pNewVidPnPresentPathInfo)931 while (1) 894 932 { 895 933 const D3DKMDT_VIDPN_PRESENT_PATH *pNextVidPnPresentPathInfo; … … 903 941 else 904 942 { 905 drprintf((__FUNCTION__": pfnAcquireNextPathInfo Failed Status(0x%x), ignored since callback returned false\n", Status)); 943 Assert(Status == STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET); 944 if (Status != STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET) 945 drprintf((__FUNCTION__": pfnAcquireNextPathInfo Failed Status(0x%x), ignored since callback returned false\n", Status)); 906 946 Status = STATUS_SUCCESS; 907 947 } … … 911 951 else if (Status == STATUS_SUCCESS) 912 952 pNewVidPnPresentPathInfo = pNextVidPnPresentPathInfo; 953 else if (Status == STATUS_GRAPHICS_NO_MORE_ELEMENTS_IN_DATASET) 954 { 955 Status = STATUS_SUCCESS; 956 break; 957 } 913 958 else 914 959 { … … 920 965 } 921 966 } 967 else if (Status == STATUS_GRAPHICS_DATASET_IS_EMPTY) 968 Status = STATUS_SUCCESS; 969 else 970 drprintf((__FUNCTION__": pfnAcquireFirstModeInfo failed Status(0x%x)\n", Status)); 922 971 923 972 return Status; -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r27219 r27225 2217 2217 PAGED_CODE(); 2218 2218 2219 vboxVDbgBreakF(); 2220 2219 2221 dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter)); 2220 2222 … … 2282 2284 PAGED_CODE(); 2283 2285 2286 vboxVDbgBreakF(); 2287 2284 2288 dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter)); 2285 2289 … … 2331 2335 2332 2336 PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)hAdapter; 2337 2338 vboxVDbgBreakF(); 2333 2339 2334 2340 const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL; … … 2716 2722 2717 2723 dfprintf(("==> "__FUNCTION__ ", hContext(0x%x)\n", hContext)); 2724 2725 vboxVDbgBreakF(); 2718 2726 2719 2727 NTSTATUS Status = STATUS_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.