Changeset 33879 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Nov 8, 2010 10:47:34 PM (14 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r33836 r33879 3471 3471 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 3472 3472 IDirect3DPixelShader9 *pShader = (IDirect3DPixelShader9*)hShaderHandle; 3473 Assert(pShader);3474 3473 HRESULT hr = pDevice9If->SetPixelShader(pShader); 3475 3474 Assert(hr == S_OK); … … 6255 6254 IDirect3DDevice9 * pDevice9If = VBOXDISP_D3DEV(pDevice); 6256 6255 IDirect3DVertexShader9 *pShader = (IDirect3DVertexShader9*)hShaderHandle; 6257 Assert(pShader);6258 6256 HRESULT hr = pDevice9If->SetVertexShader(pShader); 6259 6257 Assert(hr == S_OK); -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
r33876 r33879 588 588 return display; 589 589 } 590 591 static bool vboxVideoModesMatch(VIDEO_MODE_INFORMATION *pMode1, VIDEO_MODE_INFORMATION *pMode2) 592 { 593 return pMode1->VisScreenHeight == pMode2->VisScreenHeight 594 && pMode1->VisScreenWidth == pMode2->VisScreenWidth 595 && pMode1->BitsPerPlane == pMode2->BitsPerPlane; 596 } 597 598 static DECLINLINE(void) vboxVideoChackModeAdd(VIDEO_MODE_INFORMATION *pModes, int *pcNumModes) 599 { 600 const int cNumModes = *pcNumModes; 601 for (int i = 0; i < cNumModes; ++i) 602 { 603 if (vboxVideoModesMatch(&pModes[i], &pModes[cNumModes])) 604 return; 605 } 606 (*pcNumModes)++; 607 } 608 609 #ifdef VBOX_WITH_WDDM 610 # define VBOXVIDEOMODE_ADDED(_aModes, _pcModes) vboxVideoChackModeAdd(_aModes, _pcModes) 611 #else 612 # define VBOXVIDEOMODE_ADDED(_aModes, _pcModes) do { (*(_pcModes))++; } while (0) 613 #endif 590 614 591 615 static int vboxVideoBuildModesTable(PDEVICE_EXTENSION DeviceExtension, int iDisplay, … … 1142 1166 VideoModes[cNumVideoModes].VideoMemoryBitmapHeight = yres - yOffset; 1143 1167 VideoModes[cNumVideoModes].DriverSpecificAttributeFlags = 0; 1144 ++cNumVideoModes; 1168 1169 VBOXVIDEOMODE_ADDED(VideoModes, &cNumVideoModes); 1145 1170 1146 1171 /* next run */ … … 1194 1219 VideoModes[cNumVideoModes] = CustomVideoModes[iDisplay]; 1195 1220 iPreferredVideoMode = cNumVideoModes; 1196 ++cNumVideoModes; 1221 1222 VBOXVIDEOMODE_ADDED(VideoModes, &cNumVideoModes); 1197 1223 } 1198 1224 -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVidPn.cpp
r33869 r33879 1257 1257 break; 1258 1258 case D3DKMDT_EPT_NOPIVOT: 1259 /* just create and populate the new source mode set for now */ 1260 Status = vboxVidPnCreatePopulateSourceModeSetFromLegacy(pDevExt, hDesiredVidPn, pVidPnInterface, 1261 pNewVidPnPresentPathInfo->VidPnSourceId, 1262 pModes, cModes, iPreferredMode, NULL); 1263 Assert(Status == STATUS_SUCCESS); 1264 if (Status == STATUS_SUCCESS) 1259 Assert(!!pPinnedVidPnSourceModeInfo == !!pPinnedVidPnTargetModeInfo); 1260 if (!pPinnedVidPnSourceModeInfo && !pPinnedVidPnTargetModeInfo) 1265 1261 { 1266 /* just create and populate a new target mode info for now */ 1267 Status = vboxVidPnCreatePopulateTargetModeSetFromLegacy(pDevExt, hDesiredVidPn, pVidPnInterface, 1268 pNewVidPnPresentPathInfo->VidPnTargetId, 1269 pResolutions, 1270 cResolutions, 1271 pPreferredMode, 1272 0, 1273 NULL); 1262 /* just create and populate the new source mode set for now */ 1263 Status = vboxVidPnCreatePopulateSourceModeSetFromLegacy(pDevExt, hDesiredVidPn, pVidPnInterface, 1264 pNewVidPnPresentPathInfo->VidPnSourceId, 1265 pModes, cModes, iPreferredMode, NULL); 1274 1266 Assert(Status == STATUS_SUCCESS); 1275 if (Status != STATUS_SUCCESS) 1276 drprintf((__FUNCTION__": vboxVidPnCreatePopulateTargetModeSetFromLegacy failed Status(0x%x)\n", Status)); 1267 if (Status == STATUS_SUCCESS) 1268 { 1269 /* just create and populate a new target mode info for now */ 1270 Status = vboxVidPnCreatePopulateTargetModeSetFromLegacy(pDevExt, hDesiredVidPn, pVidPnInterface, 1271 pNewVidPnPresentPathInfo->VidPnTargetId, 1272 pResolutions, 1273 cResolutions, 1274 pPreferredMode, 1275 0, 1276 NULL); 1277 Assert(Status == STATUS_SUCCESS); 1278 if (Status != STATUS_SUCCESS) 1279 drprintf((__FUNCTION__": vboxVidPnCreatePopulateTargetModeSetFromLegacy failed Status(0x%x)\n", Status)); 1280 } 1281 else 1282 drprintf((__FUNCTION__": vboxVidPnCreatePopulateSourceModeSetFromLegacy failed Status(0x%x)\n", Status)); 1277 1283 } 1278 else1279 drprintf((__FUNCTION__": vboxVidPnCreatePopulateSourceModeSetFromLegacy failed Status(0x%x)\n", Status));1280 1281 1284 break; 1282 1285 default: -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r33876 r33879 3719 3719 dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter)); 3720 3720 3721 vboxVDbgBreakF ();3721 vboxVDbgBreakFv(); 3722 3722 3723 3723 PDEVICE_EXTENSION pDevExt = (PDEVICE_EXTENSION)hAdapter;
Note:
See TracChangeset
for help on using the changeset viewer.