Changeset 30317 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVhwa.cpp
- Timestamp:
- Jun 18, 2010 9:51:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVhwa.cpp
r30308 r30317 201 201 } 202 202 203 void vboxV HWAFreeHostInfo1(PDEVICE_EXTENSION pDevExt, VBOXVHWACMD_QUERYINFO1* pInfo)203 void vboxVhwaFreeHostInfo1(PDEVICE_EXTENSION pDevExt, VBOXVHWACMD_QUERYINFO1* pInfo) 204 204 { 205 205 VBOXVHWACMD* pCmd = VBOXVHWACMD_HEAD(pInfo); … … 207 207 } 208 208 209 void vboxV HWAFreeHostInfo2(PDEVICE_EXTENSION pDevExt, VBOXVHWACMD_QUERYINFO2* pInfo)209 void vboxVhwaFreeHostInfo2(PDEVICE_EXTENSION pDevExt, VBOXVHWACMD_QUERYINFO2* pInfo) 210 210 { 211 211 VBOXVHWACMD* pCmd = VBOXVHWACMD_HEAD(pInfo); … … 213 213 } 214 214 215 VBOXVHWACMD_QUERYINFO1* vboxV HWAQueryHostInfo1(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId)215 VBOXVHWACMD_QUERYINFO1* vboxVhwaQueryHostInfo1(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId) 216 216 { 217 217 VBOXVHWACMD* pCmd = vboxVhwaCommandCreate(pDevExt, srcId, VBOXVHWACMD_TYPE_QUERY_INFO1, sizeof(VBOXVHWACMD_QUERYINFO1)); … … 221 221 if (!pCmd) 222 222 { 223 drprintf((0, "VBoxDISP::vboxV HWAQueryHostInfo1: vboxVHWACommandCreate failed\n"));223 drprintf((0, "VBoxDISP::vboxVhwaQueryHostInfo1: vboxVhwaCommandCreate failed\n")); 224 224 return NULL; 225 225 } … … 245 245 } 246 246 247 VBOXVHWACMD_QUERYINFO2* vboxV HWAQueryHostInfo2(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId, uint32_t numFourCC)247 VBOXVHWACMD_QUERYINFO2* vboxVhwaQueryHostInfo2(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId, uint32_t numFourCC) 248 248 { 249 249 VBOXVHWACMD* pCmd = vboxVhwaCommandCreate(pDevExt, srcId, VBOXVHWACMD_TYPE_QUERY_INFO2, VBOXVHWAINFO2_SIZE(numFourCC)); … … 252 252 if (!pCmd) 253 253 { 254 drprintf((0, "VBoxDISP::vboxV HWAQueryHostInfo2: vboxVHWACommandCreate failed\n"));254 drprintf((0, "VBoxDISP::vboxVhwaQueryHostInfo2: vboxVhwaCommandCreate failed\n")); 255 255 return NULL; 256 256 } … … 277 277 } 278 278 279 int vboxV HWAEnable(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId)279 int vboxVhwaEnable(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId) 280 280 { 281 281 int rc = VERR_GENERAL_FAILURE; … … 286 286 if (!pCmd) 287 287 { 288 drprintf((0, "VBoxDISP::vboxV HWAEnable: vboxVHWACommandCreate failed\n"));288 drprintf((0, "VBoxDISP::vboxVhwaEnable: vboxVhwaCommandCreate failed\n")); 289 289 return rc; 290 290 } … … 305 305 } 306 306 307 int vboxV HWADisable(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId)307 int vboxVhwaDisable(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId) 308 308 { 309 309 int rc = VERR_GENERAL_FAILURE; … … 314 314 if (!pCmd) 315 315 { 316 drprintf((0, "VBoxDISP::vboxV HWADisable: vboxVHWACommandCreate failed\n"));316 drprintf((0, "VBoxDISP::vboxVhwaDisable: vboxVhwaCommandCreate failed\n")); 317 317 return rc; 318 318 } … … 333 333 } 334 334 335 static void vboxV HWAInitSrc(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId)335 static void vboxVhwaInitSrc(PDEVICE_EXTENSION pDevExt, D3DDDI_VIDEO_PRESENT_SOURCE_ID srcId) 336 336 { 337 337 Assert(srcId < (D3DDDI_VIDEO_PRESENT_SOURCE_ID)pDevExt->u.primary.cDisplays); … … 339 339 memset (pSettings, 0, sizeof (VBOXVHWA_INFO)); 340 340 341 VBOXVHWACMD_QUERYINFO1* pInfo1 = vboxV HWAQueryHostInfo1(pDevExt, srcId);341 VBOXVHWACMD_QUERYINFO1* pInfo1 = vboxVhwaQueryHostInfo1(pDevExt, srcId); 342 342 if (pInfo1) 343 343 { … … 379 379 && (pInfo1->u.out.caps & VBOXVHWA_CAPS_OVERLAYFOURCC)) 380 380 { 381 VBOXVHWACMD_QUERYINFO2* pInfo2 = vboxV HWAQueryHostInfo2(pDevExt, srcId, pInfo1->u.out.numFourCC);381 VBOXVHWACMD_QUERYINFO2* pInfo2 = vboxVhwaQueryHostInfo2(pDevExt, srcId, pInfo1->u.out.numFourCC); 382 382 if (pInfo2) 383 383 { … … 387 387 ++pSettings->cFormats; 388 388 } 389 vboxV HWAFreeHostInfo2(pDevExt, pInfo2);389 vboxVhwaFreeHostInfo2(pDevExt, pInfo2); 390 390 } 391 391 } 392 392 } 393 393 } 394 vboxV HWAFreeHostInfo1(pDevExt, pInfo1);395 } 396 } 397 398 void vboxV HWAInit(PDEVICE_EXTENSION pDevExt)394 vboxVhwaFreeHostInfo1(pDevExt, pInfo1); 395 } 396 } 397 398 void vboxVhwaInit(PDEVICE_EXTENSION pDevExt) 399 399 { 400 400 for (int i = 0; i < pDevExt->u.primary.cDisplays; ++i) 401 401 { 402 vboxV HWAInitSrc(pDevExt, (D3DDDI_VIDEO_PRESENT_SOURCE_ID)i);403 } 404 } 405 406 void vboxV HWAFree(PDEVICE_EXTENSION pDevExt)402 vboxVhwaInitSrc(pDevExt, (D3DDDI_VIDEO_PRESENT_SOURCE_ID)i); 403 } 404 } 405 406 void vboxVhwaFree(PDEVICE_EXTENSION pDevExt) 407 407 { 408 408 /* we do not allocate/map anything, just issue a Disable command … … 410 410 for (int i = 0; i < pDevExt->u.primary.cDisplays; ++i) 411 411 { 412 vboxV HWADisable(pDevExt, i);412 vboxVhwaDisable(pDevExt, i); 413 413 } 414 414 } … … 715 715 if (cNew == 1) 716 716 { 717 rc = vboxVhwa HlpCreatePrimary(pDevExt, pSource, VidPnSourceId);717 rc = vboxVhwaEnable(pDevExt, VidPnSourceId); 718 718 AssertRC(rc); 719 if (RT_SUCCESS(rc)) 720 { 721 rc = vboxVhwaHlpCreatePrimary(pDevExt, pSource, VidPnSourceId); 722 AssertRC(rc); 723 if (RT_FAILURE(rc)) 724 { 725 int tmpRc = vboxVhwaDisable(pDevExt, VidPnSourceId); 726 AssertRC(tmpRc); 727 } 728 } 719 729 } 720 730 else
Note:
See TracChangeset
for help on using the changeset viewer.