Changeset 33929 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport
- Timestamp:
- Nov 10, 2010 9:31:48 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVidPn.cpp
r33879 r33929 1717 1717 return Status == STATUS_SUCCESS; 1718 1718 } 1719 1720 #define VBOXVIDPNDUMP_STRCASE(_t) \ 1721 case _t: return #_t; 1722 #define VBOXVIDPNDUMP_STRCASE_UNKNOWN() \ 1723 default: return "Unknown"; 1724 1725 #define VBOXVIDPNDUMP_STRFLAGS(_v, _t) \ 1726 if ((_v)._t return #_t; 1727 1728 const char* vboxVidPnDumpStrImportance(D3DKMDT_VIDPN_PRESENT_PATH_IMPORTANCE ImportanceOrdinal) 1729 { 1730 switch (ImportanceOrdinal) 1731 { 1732 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_UNINITIALIZED); 1733 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_PRIMARY); 1734 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_SECONDARY); 1735 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_TERTIARY); 1736 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_QUATERNARY); 1737 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_QUINARY); 1738 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_SENARY); 1739 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_SEPTENARY); 1740 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_OCTONARY); 1741 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_NONARY); 1742 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPI_DENARY); 1743 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1744 } 1745 } 1746 1747 const char* vboxVidPnDumpStrScaling(D3DKMDT_VIDPN_PRESENT_PATH_SCALING Scaling) 1748 { 1749 switch (Scaling) 1750 { 1751 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPS_UNINITIALIZED); 1752 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPS_IDENTITY); 1753 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPS_CENTERED); 1754 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPS_STRETCHED); 1755 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPS_UNPINNED); 1756 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPS_NOTSPECIFIED); 1757 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1758 } 1759 } 1760 1761 const char* vboxVidPnDumpStrRotation(D3DKMDT_VIDPN_PRESENT_PATH_ROTATION Rotation) 1762 { 1763 switch (Rotation) 1764 { 1765 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPR_UNINITIALIZED); 1766 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPR_IDENTITY); 1767 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPR_ROTATE90); 1768 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPR_ROTATE180); 1769 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPR_ROTATE270); 1770 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPR_UNPINNED); 1771 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPR_NOTSPECIFIED); 1772 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1773 } 1774 } 1775 1776 const char* vboxVidPnDumpStrColorBasis(D3DKMDT_COLOR_BASIS ColorBasis) 1777 { 1778 switch (ColorBasis) 1779 { 1780 VBOXVIDPNDUMP_STRCASE(D3DKMDT_CB_UNINITIALIZED); 1781 VBOXVIDPNDUMP_STRCASE(D3DKMDT_CB_INTENSITY); 1782 VBOXVIDPNDUMP_STRCASE(D3DKMDT_CB_SRGB); 1783 VBOXVIDPNDUMP_STRCASE(D3DKMDT_CB_SCRGB); 1784 VBOXVIDPNDUMP_STRCASE(D3DKMDT_CB_YCBCR); 1785 VBOXVIDPNDUMP_STRCASE(D3DKMDT_CB_YPBPR); 1786 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1787 } 1788 } 1789 1790 const char* vboxVidPnDumpStrContent(D3DKMDT_VIDPN_PRESENT_PATH_CONTENT Content) 1791 { 1792 switch (Content) 1793 { 1794 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPC_UNINITIALIZED); 1795 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPC_GRAPHICS); 1796 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPC_VIDEO); 1797 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPC_NOTSPECIFIED); 1798 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1799 } 1800 } 1801 1802 const char* vboxVidPnDumpStrCopyProtectionType(D3DKMDT_VIDPN_PRESENT_PATH_COPYPROTECTION_TYPE CopyProtectionType) 1803 { 1804 switch (CopyProtectionType) 1805 { 1806 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPMT_UNINITIALIZED); 1807 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPMT_NOPROTECTION); 1808 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPMT_MACROVISION_APSTRIGGER); 1809 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VPPMT_MACROVISION_FULLSUPPORT); 1810 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1811 } 1812 } 1813 1814 const char* vboxVidPnDumpStrGammaRampType(D3DDDI_GAMMARAMP_TYPE Type) 1815 { 1816 switch (Type) 1817 { 1818 VBOXVIDPNDUMP_STRCASE(D3DDDI_GAMMARAMP_UNINITIALIZED); 1819 VBOXVIDPNDUMP_STRCASE(D3DDDI_GAMMARAMP_DEFAULT); 1820 VBOXVIDPNDUMP_STRCASE(D3DDDI_GAMMARAMP_RGB256x3x16); 1821 VBOXVIDPNDUMP_STRCASE(D3DDDI_GAMMARAMP_DXGI_1); 1822 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1823 } 1824 } 1825 1826 1827 void vboxVidPnDumpCopyProtectoin(const D3DKMDT_VIDPN_PRESENT_PATH_COPYPROTECTION *pCopyProtection) 1828 { 1829 drprintf(("CopyProtection: CopyProtectionType(%s), TODO: Dump All the rest\n", 1830 vboxVidPnDumpStrCopyProtectionType(pCopyProtection->CopyProtectionType))); 1831 } 1832 1833 1834 void vboxVidPnDumpPathTransformation(const D3DKMDT_VIDPN_PRESENT_PATH_TRANSFORMATION *pContentTransformation) 1835 { 1836 drprintf(("Transformation: Scaling(%s), ScalingSupport(%d), Rotation(%s), RotationSupport(%d)\n", 1837 vboxVidPnDumpStrScaling(pContentTransformation->Scaling), pContentTransformation->ScalingSupport, 1838 vboxVidPnDumpStrRotation(pContentTransformation->Rotation), pContentTransformation->RotationSupport)); 1839 } 1840 1841 void vboxVidPnDumpRegion(const char *pPrefix, const D3DKMDT_2DREGION *pRegion, const char *pSuffix) 1842 { 1843 drprintf(("%scx(%d), cy(%d)%s", pPrefix, pRegion->cx, pRegion->cy, pSuffix)); 1844 } 1845 1846 void vboxVidPnDumpRanges(const char *pPrefix, const D3DKMDT_COLOR_COEFF_DYNAMIC_RANGES *pDynamicRanges, const char *pSuffix) 1847 { 1848 drprintf(("%sFirstChannel(%d), SecondChannel(%d), ThirdChannel(%d), FourthChannel(%d)%s", pPrefix, 1849 pDynamicRanges->FirstChannel, 1850 pDynamicRanges->SecondChannel, 1851 pDynamicRanges->ThirdChannel, 1852 pDynamicRanges->FourthChannel, 1853 pSuffix)); 1854 } 1855 1856 void vboxVidPnDumpGammaRamp(const char *pPrefix, const D3DKMDT_GAMMA_RAMP *pGammaRamp, const char *pSuffix) 1857 { 1858 drprintf(("%Type(%s), DataSize(%d), TODO: dump the rest%s", pPrefix, 1859 vboxVidPnDumpStrGammaRampType(pGammaRamp->Type), pGammaRamp->DataSize, 1860 pSuffix)); 1861 } 1862 1863 1864 void vboxVidPnDumpPath(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, 1865 const D3DKMDT_VIDPN_PRESENT_PATH *pVidPnPresentPathInfo) 1866 { 1867 drprintf((" >>Start Dump VidPn Path>>\n")); 1868 drprintf(("VidPnSourceId(%d), VidPnTargetId(%d), ImportanceOrdinal(%s), VidPnTargetColorBasis(%s), Content(%s)\n", 1869 pVidPnPresentPathInfo->VidPnSourceId, pVidPnPresentPathInfo->VidPnTargetId, 1870 vboxVidPnDumpStrImportance(pVidPnPresentPathInfo->ImportanceOrdinal), 1871 vboxVidPnDumpStrColorBasis(pVidPnPresentPathInfo->VidPnTargetColorBasis), 1872 vboxVidPnDumpStrContent(pVidPnPresentPathInfo->Content))); 1873 vboxVidPnDumpPathTransformation(&pVidPnPresentPathInfo->ContentTransformation); 1874 vboxVidPnDumpRegion("VisibleFromActiveTLOffset: ", &pVidPnPresentPathInfo->VisibleFromActiveTLOffset, "\n"); 1875 vboxVidPnDumpRegion("VisibleFromActiveBROffset: ", &pVidPnPresentPathInfo->VisibleFromActiveBROffset, "\n"); 1876 vboxVidPnDumpRanges("VidPnTargetColorCoeffDynamicRanges: ", &pVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges, "\n"); 1877 vboxVidPnDumpCopyProtectoin(&pVidPnPresentPathInfo->CopyProtection); 1878 vboxVidPnDumpGammaRamp("GammaRamp: ", &pVidPnPresentPathInfo->GammaRamp, "\n"); 1879 1880 drprintf((" <<Stop Dump VidPn Path<<\n")); 1881 } 1882 1883 static DECLCALLBACK(BOOLEAN) vboxVidPnDumpPathEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, 1884 D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, 1885 const D3DKMDT_VIDPN_PRESENT_PATH *pVidPnPresentPathInfo, PVOID pContext) 1886 { 1887 vboxVidPnDumpPath(pDevExt, hVidPn, pVidPnInterface, pVidPnPresentPathInfo); 1888 1889 pVidPnTopologyInterface->pfnReleasePathInfo(hVidPnTopology, pVidPnPresentPathInfo); 1890 return TRUE; 1891 } 1892 1893 void vboxVidPnDumpVidPn(PDEVICE_EXTENSION pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface) 1894 { 1895 drprintf ((">>>>>>>>>>>>>>>>>Start Dumping VidPn>>>>>>>>>>>>>>>>>>>>>>\n")); 1896 1897 D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology; 1898 const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface; 1899 NTSTATUS Status = pVidPnInterface->pfnGetTopology(hVidPn, &hVidPnTopology, &pVidPnTopologyInterface); 1900 Assert(Status == STATUS_SUCCESS); 1901 if (Status == STATUS_SUCCESS) 1902 { 1903 Status = vboxVidPnEnumPaths(pDevExt, hVidPn, pVidPnInterface, 1904 hVidPnTopology, pVidPnTopologyInterface, 1905 vboxVidPnDumpPathEnum, NULL); 1906 Assert(Status == STATUS_SUCCESS); 1907 } 1908 1909 drprintf (("<<<<<<<<<<<<<<<<<Stop Dumping VidPn<<<<<<<<<<<<<<<<<<<<<<\n")); 1910 }
Note:
See TracChangeset
for help on using the changeset viewer.