Changeset 39160 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video/mp
- Timestamp:
- Nov 1, 2011 2:35:23 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 74625
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp
r38982 r39160 1474 1474 } 1475 1475 1476 /* dump user-mode driver debug info */ 1477 static char g_aVBoxUmdD3DCAPS9[304]; 1478 static VBOXDISPIFESCAPE_DBGDUMPBUF_FLAGS g_VBoxUmdD3DCAPS9Flags; 1479 static BOOLEAN g_bVBoxUmdD3DCAPS9IsInited = FALSE; 1480 1481 static void vboxUmdDumpDword(DWORD *pvData, DWORD cData) 1482 { 1483 char aBuf[16*4]; 1484 DWORD dw1, dw2, dw3, dw4; 1485 for (UINT i = 0; i < (cData & (~3)); i+=4) 1486 { 1487 dw1 = *pvData++; 1488 dw2 = *pvData++; 1489 dw3 = *pvData++; 1490 dw4 = *pvData++; 1491 sprintf(aBuf, "0x%08x, 0x%08x, 0x%08x, 0x%08x,\n", dw1, dw2, dw3, dw4); 1492 LOGREL(("%s", aBuf)); 1493 } 1494 1495 cData = cData % 4; 1496 switch (cData) 1497 { 1498 case 3: 1499 dw1 = *pvData++; 1500 dw2 = *pvData++; 1501 dw3 = *pvData++; 1502 sprintf(aBuf, "0x%08x, 0x%08x, 0x%08x\n", dw1, dw2, dw3); 1503 LOGREL(("%s", aBuf)); 1504 break; 1505 case 2: 1506 dw1 = *pvData++; 1507 dw2 = *pvData++; 1508 sprintf(aBuf, "0x%08x, 0x%08x\n", dw1, dw2); 1509 LOGREL(("%s", aBuf)); 1510 break; 1511 case 1: 1512 dw1 = *pvData++; 1513 sprintf(aBuf, "0x%8x\n", dw1); 1514 LOGREL(("%s", aBuf)); 1515 break; 1516 default: 1517 break; 1518 } 1519 } 1520 1521 static void vboxUmdDumpD3DCAPS9(void *pvData, PVBOXDISPIFESCAPE_DBGDUMPBUF_FLAGS pFlags) 1522 { 1523 AssertCompile(!(sizeof (g_aVBoxUmdD3DCAPS9) % sizeof (DWORD))); 1524 LOGREL(("*****Start Dumping D3DCAPS9:*******")); 1525 LOGREL(("WoW64 flag(%d)", (UINT)pFlags->WoW64)); 1526 vboxUmdDumpDword((DWORD*)pvData, sizeof (g_aVBoxUmdD3DCAPS9) / sizeof (DWORD)); 1527 LOGREL(("*****End Dumping D3DCAPS9**********")); 1528 } 1529 1530 NTSTATUS vboxUmdDumpBuf(PVBOXDISPIFESCAPE_DBGDUMPBUF pBuf, uint32_t cbBuffer) 1531 { 1532 if (cbBuffer < RT_OFFSETOF(VBOXDISPIFESCAPE_DBGDUMPBUF, aBuf[0])) 1533 { 1534 WARN(("Buffer too small")); 1535 return STATUS_BUFFER_TOO_SMALL; 1536 } 1537 1538 NTSTATUS Status = STATUS_SUCCESS; 1539 uint32_t cbString = cbBuffer - RT_OFFSETOF(VBOXDISPIFESCAPE_DBGDUMPBUF, aBuf[0]); 1540 switch (pBuf->enmType) 1541 { 1542 case VBOXDISPIFESCAPE_DBGDUMPBUF_TYPE_D3DCAPS9: 1543 { 1544 if (cbString != sizeof (g_aVBoxUmdD3DCAPS9)) 1545 { 1546 WARN(("wrong caps size, expected %d, but was %d", sizeof (g_aVBoxUmdD3DCAPS9), cbString)); 1547 Status = STATUS_INVALID_PARAMETER; 1548 break; 1549 } 1550 1551 if (g_bVBoxUmdD3DCAPS9IsInited) 1552 { 1553 if (!memcmp(g_aVBoxUmdD3DCAPS9, pBuf->aBuf, sizeof (g_aVBoxUmdD3DCAPS9))) 1554 break; 1555 1556 WARN(("caps do not match!")); 1557 vboxUmdDumpD3DCAPS9(pBuf->aBuf, &pBuf->Flags); 1558 break; 1559 } 1560 1561 memcpy(g_aVBoxUmdD3DCAPS9, pBuf->aBuf, sizeof (g_aVBoxUmdD3DCAPS9)); 1562 g_VBoxUmdD3DCAPS9Flags = pBuf->Flags; 1563 g_bVBoxUmdD3DCAPS9IsInited = TRUE; 1564 vboxUmdDumpD3DCAPS9(pBuf->aBuf, &pBuf->Flags); 1565 } 1566 } 1567 1568 return Status; 1569 } 1570 1476 1571 #if 0 1477 1572 VOID vboxShRcTreeInit(PVBOXMP_DEVEXT pDevExt) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.h
r38982 r39160 151 151 VOID vboxWddmCounterU32Wait(uint32_t volatile * pu32, uint32_t u32Val); 152 152 153 NTSTATUS vboxUmdDumpBuf(PVBOXDISPIFESCAPE_DBGDUMPBUF pBuf, uint32_t cbBuffer); 154 153 155 #if 0 154 156 /* wine shrc handle -> allocation map */ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r39150 r39160 3843 3843 DbgPrint("%s", pDbgPrint->aStringBuf); 3844 3844 #else 3845 LOGREL (("%s", pDbgPrint->aStringBuf));3845 LOGREL_EXACT(("%s", pDbgPrint->aStringBuf)); 3846 3846 #endif 3847 3847 } 3848 3848 Status = STATUS_SUCCESS; 3849 break; 3850 } 3851 case VBOXESC_DBGDUMPBUF: 3852 { 3853 Status = vboxUmdDumpBuf((PVBOXDISPIFESCAPE_DBGDUMPBUF)pEscapeHdr, pEscape->PrivateDriverDataSize); 3849 3854 break; 3850 3855 }
Note:
See TracChangeset
for help on using the changeset viewer.