Changeset 33980 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Nov 11, 2010 12:13:36 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 67642
- Location:
- trunk/src/VBox/Additions/WINNT
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Helper.h
r33048 r33980 47 47 #define OSDBGPRINT(a) DbgPrint a 48 48 49 /* dprintf */ 49 #ifdef LOG_TO_BACKDOOR 50 # include <VBox/log.h> 51 # define dDoPrintf(a) RTLogBackdoorPrintf a 52 #else 53 # define dDoPrintf(a) OSDBGPRINT(a) 54 #endif 55 56 /* release log */ 57 # define drprintf dDoPrintf 58 /* flow log */ 59 # define dfprintf(a) do {} while (0) 60 /* basic debug log */ 50 61 #if (defined(DEBUG) && !defined(NO_LOGGING)) || defined(LOG_ENABLED) 51 # ifdef LOG_TO_BACKDOOR 52 # include <VBox/log.h> 53 # define dprintf(a) RTLogBackdoorPrintf a 54 # else 55 # define dprintf(a) OSDBGPRINT(a) 56 # endif 57 /* flow log */ 58 # define dfprintf dprintf 59 /* release log */ 60 # define drprintf dprintf 62 # define dprintf dDoPrintf 61 63 #else 62 64 # define dprintf(a) do {} while (0) 63 /* flow log */64 # define dfprintf dprintf65 /* release log */66 # define drprintf dprintf67 65 #endif 66 68 67 69 68 /* dprintf2 - extended logging. */ -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVidPn.cpp
r33929 r33980 13 13 #include "../Helper.h" 14 14 15 NTSTATUS vboxVidPnCheckTopology( const D3DKMDT_HVIDPN hDesiredVidPn,15 NTSTATUS vboxVidPnCheckTopology(PDEVICE_EXTENSION pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, 16 16 D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, 17 17 BOOLEAN *pbSupported) … … 23 23 if (Status == STATUS_SUCCESS) 24 24 { 25 BOOLEAN bFoundPrimary = FALSE; 26 25 27 while (1) 26 28 { 27 /* @todo: which paths do we support? no matter for now 28 pNewVidPnPresentPathInfo->VidPnSourceId 29 pNewVidPnPresentPathInfo->VidPnTargetId 30 29 if (pNewVidPnPresentPathInfo->VidPnSourceId != pNewVidPnPresentPathInfo->VidPnTargetId) 30 { 31 dprintf(("unsupported source(%d)->target(%d) pare\n", pNewVidPnPresentPathInfo->VidPnSourceId, pNewVidPnPresentPathInfo->VidPnTargetId)); 32 AssertBreakpoint(); 33 bSupported = FALSE; 34 break; 35 } 36 37 if (pNewVidPnPresentPathInfo->VidPnSourceId == 0) 38 { 39 bFoundPrimary = TRUE; 40 } 41 42 /* 31 43 ImportanceOrdinal does not matter for now 32 44 pNewVidPnPresentPathInfo->ImportanceOrdinal … … 200 212 } 201 213 } 214 215 bSupported &= bFoundPrimary; 202 216 203 217 if (pNewVidPnPresentPathInfo) … … 860 874 { 861 875 NTSTATUS Status; 876 #if 0 862 877 D3DKMDT_2DREGION *pResolutionsCopy = (D3DKMDT_2DREGION*)vboxWddmMemAlloc(cResolutions * sizeof (D3DKMDT_2DREGION)); 863 878 if (pResolutionsCopy) 864 879 { 865 880 memcpy(pResolutionsCopy, pResolutions, cResolutions * sizeof (D3DKMDT_2DREGION)); 881 #endif 866 882 CONST DXGK_MONITOR_INTERFACE *pMonitorInterface; 867 883 Status = pDevExt->u.primary.DxgkInterface.DxgkCbQueryMonitorInterface(pDevExt->u.primary.DxgkInterface.DeviceHandle, DXGK_MONITOR_INTERFACE_VERSION_V1, &pMonitorInterface); … … 878 894 if (Status == STATUS_SUCCESS) 879 895 { 896 #if 0 880 897 VBOXVIDPNCHECKADDMONITORMODES EnumData = {0}; 881 898 EnumData.cResolutions = cResolutions; … … 889 906 if (EnumData.Status == STATUS_SUCCESS) 890 907 { 908 #endif 891 909 for (uint32_t i = 0; i < cResolutions; ++i) 892 910 { 911 #if 0 893 912 D3DKMDT_2DREGION *pRes = &pResolutionsCopy[i]; 913 #else 914 D3DKMDT_2DREGION *pRes = &pResolutions[i]; 915 #endif 894 916 if (pRes->cx) 895 917 { … … 900 922 enmOrigin, 901 923 i == (uint32_t)iPreferred); 902 Assert(Status == STATUS_SUCCESS); 903 if (Status != STATUS_SUCCESS) 924 Assert(Status == STATUS_SUCCESS || Status == STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET); 925 if (Status == STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET) 926 { 927 Status = STATUS_SUCCESS; 928 } 929 else if (Status != STATUS_SUCCESS) 904 930 { 905 931 drprintf((__FUNCTION__": vboxVidPnCreatePopulateMonitorSourceModeInfoFromLegacy failed Status(0x%x)\n", Status)); … … 908 934 } 909 935 } 936 #if 0 910 937 } 911 938 } 912 939 #endif 913 940 NTSTATUS tmpStatus = pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hMonitorSMS); 914 941 Assert(tmpStatus == STATUS_SUCCESS); … … 921 948 else 922 949 drprintf((__FUNCTION__": DxgkCbQueryMonitorInterface failed Status(0x%x)\n", Status)); 923 950 #if 0 924 951 vboxWddmMemFree(pResolutionsCopy); 925 952 } … … 929 956 Status = STATUS_NO_MEMORY; 930 957 } 958 #endif 931 959 932 960 return Status; … … 1774 1802 } 1775 1803 1776 const char* vboxVidPnDumpStrColorBasis( D3DKMDT_COLOR_BASIS ColorBasis)1804 const char* vboxVidPnDumpStrColorBasis(const D3DKMDT_COLOR_BASIS ColorBasis) 1777 1805 { 1778 1806 switch (ColorBasis) … … 1788 1816 } 1789 1817 1818 const char* vboxVidPnDumpStrPvam(D3DKMDT_PIXEL_VALUE_ACCESS_MODE PixelValueAccessMode) 1819 { 1820 switch (PixelValueAccessMode) 1821 { 1822 VBOXVIDPNDUMP_STRCASE(D3DKMDT_PVAM_UNINITIALIZED); 1823 VBOXVIDPNDUMP_STRCASE(D3DKMDT_PVAM_DIRECT); 1824 VBOXVIDPNDUMP_STRCASE(D3DKMDT_PVAM_PRESETPALETTE); 1825 VBOXVIDPNDUMP_STRCASE(D3DKMDT_PVAM_SETTABLEPALETTE); 1826 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1827 } 1828 } 1829 1830 1831 1790 1832 const char* vboxVidPnDumpStrContent(D3DKMDT_VIDPN_PRESENT_PATH_CONTENT Content) 1791 1833 { … … 1824 1866 } 1825 1867 1868 const char* vboxVidPnDumpStrSourceModeType(D3DKMDT_VIDPN_SOURCE_MODE_TYPE Type) 1869 { 1870 switch (Type) 1871 { 1872 VBOXVIDPNDUMP_STRCASE(D3DKMDT_RMT_UNINITIALIZED); 1873 VBOXVIDPNDUMP_STRCASE(D3DKMDT_RMT_GRAPHICS); 1874 VBOXVIDPNDUMP_STRCASE(D3DKMDT_RMT_TEXT); 1875 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1876 } 1877 } 1878 1879 const char* vboxVidPnDumpStrScanLineOrdering(D3DDDI_VIDEO_SIGNAL_SCANLINE_ORDERING ScanLineOrdering) 1880 { 1881 switch (ScanLineOrdering) 1882 { 1883 VBOXVIDPNDUMP_STRCASE(D3DDDI_VSSLO_UNINITIALIZED); 1884 VBOXVIDPNDUMP_STRCASE(D3DDDI_VSSLO_PROGRESSIVE); 1885 VBOXVIDPNDUMP_STRCASE(D3DDDI_VSSLO_INTERLACED_UPPERFIELDFIRST); 1886 VBOXVIDPNDUMP_STRCASE(D3DDDI_VSSLO_INTERLACED_LOWERFIELDFIRST); 1887 VBOXVIDPNDUMP_STRCASE(D3DDDI_VSSLO_OTHER); 1888 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1889 } 1890 } 1891 1892 const char* vboxVidPnDumpStrModePreference(D3DKMDT_MODE_PREFERENCE Preference) 1893 { 1894 switch (Preference) 1895 { 1896 VBOXVIDPNDUMP_STRCASE(D3DKMDT_MP_UNINITIALIZED); 1897 VBOXVIDPNDUMP_STRCASE(D3DKMDT_MP_PREFERRED); 1898 VBOXVIDPNDUMP_STRCASE(D3DKMDT_MP_NOTPREFERRED); 1899 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1900 } 1901 } 1902 1903 const char* vboxVidPnDumpStrSignalStandard(D3DKMDT_VIDEO_SIGNAL_STANDARD VideoStandard) 1904 { 1905 switch (VideoStandard) 1906 { 1907 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_UNINITIALIZED); 1908 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_VESA_DMT); 1909 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_VESA_GTF); 1910 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_VESA_CVT); 1911 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_IBM); 1912 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_APPLE); 1913 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_NTSC_M); 1914 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_NTSC_J); 1915 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_NTSC_443); 1916 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_B); 1917 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_B1); 1918 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_G); 1919 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_H); 1920 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_I); 1921 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_D); 1922 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_N); 1923 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_NC); 1924 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_B); 1925 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_D); 1926 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_G); 1927 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_H); 1928 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_K); 1929 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_K1); 1930 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_L); 1931 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_SECAM_L1); 1932 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_EIA_861); 1933 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_EIA_861A); 1934 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_EIA_861B); 1935 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_K); 1936 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_K1); 1937 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_L); 1938 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_PAL_M); 1939 VBOXVIDPNDUMP_STRCASE(D3DKMDT_VSS_OTHER); 1940 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 1941 } 1942 } 1943 1944 const char* vboxVidPnDumpStrPixFormat(D3DDDIFORMAT PixelFormat) 1945 { 1946 switch (PixelFormat) 1947 { 1948 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_UNKNOWN); 1949 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R8G8B8); 1950 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8R8G8B8); 1951 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X8R8G8B8); 1952 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R5G6B5); 1953 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X1R5G5B5); 1954 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A1R5G5B5); 1955 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A4R4G4B4); 1956 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R3G3B2); 1957 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8); 1958 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8R3G3B2); 1959 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X4R4G4B4); 1960 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A2B10G10R10); 1961 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8B8G8R8); 1962 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X8B8G8R8); 1963 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_G16R16); 1964 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A2R10G10B10); 1965 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A16B16G16R16); 1966 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8P8); 1967 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R32F); 1968 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_G32R32F); 1969 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A32B32G32R32F); 1970 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_CxV8U8); 1971 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A1); 1972 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_BINARYBUFFER); 1973 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_VERTEXDATA); 1974 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_INDEX16); 1975 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_INDEX32); 1976 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_Q16W16V16U16); 1977 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_MULTI2_ARGB8); 1978 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R16F); 1979 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_G16R16F); 1980 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A16B16G16R16F); 1981 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D32F_LOCKABLE); 1982 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D24FS8); 1983 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D32_LOCKABLE); 1984 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_S8_LOCKABLE); 1985 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_S1D15); 1986 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_S8D24); 1987 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X8D24); 1988 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X4S4D24); 1989 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_L16); 1990 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_UYVY); 1991 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_R8G8_B8G8); 1992 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_YUY2); 1993 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_G8R8_G8B8); 1994 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_DXT1); 1995 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_DXT2); 1996 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_DXT3); 1997 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_DXT4); 1998 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_DXT5); 1999 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D16_LOCKABLE); 2000 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D32); 2001 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D15S1); 2002 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D24S8); 2003 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D24X8); 2004 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D24X4S4); 2005 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_D16); 2006 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_P8); 2007 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_L8); 2008 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A8L8); 2009 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A4L4); 2010 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_V8U8); 2011 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_L6V5U5); 2012 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_X8L8V8U8); 2013 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_Q8W8V8U8); 2014 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_V16U16); 2015 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_W11V11U10); 2016 VBOXVIDPNDUMP_STRCASE(D3DDDIFMT_A2W10V10U10); 2017 VBOXVIDPNDUMP_STRCASE_UNKNOWN(); 2018 } 2019 } 1826 2020 1827 2021 void vboxVidPnDumpCopyProtectoin(const D3DKMDT_VIDPN_PRESENT_PATH_COPYPROTECTION *pCopyProtection) … … 1841 2035 void vboxVidPnDumpRegion(const char *pPrefix, const D3DKMDT_2DREGION *pRegion, const char *pSuffix) 1842 2036 { 1843 drprintf(("%scx(%d), cy(%d)%s", pPrefix, pRegion->cx, pRegion->cy, pSuffix)); 2037 drprintf(("%s%dX%d%s", pPrefix, pRegion->cx, pRegion->cy, pSuffix)); 2038 } 2039 2040 void vboxVidPnDumpRational(const char *pPrefix, const D3DDDI_RATIONAL *pRational, const char *pSuffix) 2041 { 2042 drprintf(("%s%d/%d=%d%s", pPrefix, pRational->Numerator, pRational->Denominator, pRational->Numerator/pRational->Denominator, pSuffix)); 1844 2043 } 1845 2044 … … 1856 2055 void vboxVidPnDumpGammaRamp(const char *pPrefix, const D3DKMDT_GAMMA_RAMP *pGammaRamp, const char *pSuffix) 1857 2056 { 1858 drprintf(("% Type(%s), DataSize(%d), TODO: dump the rest%s", pPrefix,2057 drprintf(("%sType(%s), DataSize(%d), TODO: dump the rest%s", pPrefix, 1859 2058 vboxVidPnDumpStrGammaRampType(pGammaRamp->Type), pGammaRamp->DataSize, 1860 2059 pSuffix)); 1861 2060 } 1862 2061 2062 void vboxVidPnDumpSourceMode(const char *pPrefix, const D3DKMDT_VIDPN_SOURCE_MODE* pVidPnSourceModeInfo, const char *pSuffix) 2063 { 2064 drprintf(("%sType(%s), ", pPrefix, vboxVidPnDumpStrSourceModeType(pVidPnSourceModeInfo->Type))); 2065 vboxVidPnDumpRegion("surf(", &pVidPnSourceModeInfo->Format.Graphics.PrimSurfSize, "), "); 2066 vboxVidPnDumpRegion("vis(", &pVidPnSourceModeInfo->Format.Graphics.VisibleRegionSize, "), "); 2067 drprintf(("stride(%d), ", pVidPnSourceModeInfo->Format.Graphics.Stride)); 2068 drprintf(("format(%s), ", vboxVidPnDumpStrPixFormat(pVidPnSourceModeInfo->Format.Graphics.PixelFormat))); 2069 drprintf(("clrBasis(%s), ", vboxVidPnDumpStrColorBasis(pVidPnSourceModeInfo->Format.Graphics.ColorBasis))); 2070 drprintf(("pvam(%s)%s", vboxVidPnDumpStrPvam(pVidPnSourceModeInfo->Format.Graphics.PixelValueAccessMode), pSuffix)); 2071 } 2072 2073 void vboxVidPnDumpSignalInfo(const char *pPrefix, const D3DKMDT_VIDEO_SIGNAL_INFO *pVideoSignalInfo, const char *pSuffix) 2074 { 2075 drprintf(("%sVStd(%s), ", pPrefix, vboxVidPnDumpStrSignalStandard(pVideoSignalInfo->VideoStandard))); 2076 vboxVidPnDumpRegion("totSize(", &pVideoSignalInfo->TotalSize, "), "); 2077 vboxVidPnDumpRegion("activeSize(", &pVideoSignalInfo->ActiveSize, "), "); 2078 vboxVidPnDumpRational("VSynch(", &pVideoSignalInfo->VSyncFreq, "), "); 2079 drprintf(("PixelRate(%d), ScanLineOrdering(%s)%s\n", pVideoSignalInfo->PixelRate, vboxVidPnDumpStrScanLineOrdering(pVideoSignalInfo->ScanLineOrdering), pSuffix)); 2080 } 2081 2082 void vboxVidPnDumpTargetMode(const char *pPrefix, const D3DKMDT_VIDPN_TARGET_MODE* CONST pVidPnTargetModeInfo, const char *pSuffix) 2083 { 2084 drprintf(("%s", pPrefix)); 2085 vboxVidPnDumpSignalInfo("VSI: ", &pVidPnTargetModeInfo->VideoSignalInfo, ", "); 2086 drprintf(("Preference(%s)%s", vboxVidPnDumpStrModePreference(pVidPnTargetModeInfo->Preference), pPrefix)); 2087 } 2088 2089 void vboxVidPnDumpPinnedSourceMode(const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId) 2090 { 2091 D3DKMDT_HVIDPNSOURCEMODESET hCurVidPnSourceModeSet; 2092 const DXGK_VIDPNSOURCEMODESET_INTERFACE *pCurVidPnSourceModeSetInterface; 2093 2094 NTSTATUS Status = pVidPnInterface->pfnAcquireSourceModeSet(hVidPn, 2095 VidPnSourceId, 2096 &hCurVidPnSourceModeSet, 2097 &pCurVidPnSourceModeSetInterface); 2098 Assert(Status == STATUS_SUCCESS); 2099 if (Status == STATUS_SUCCESS) 2100 { 2101 CONST D3DKMDT_VIDPN_SOURCE_MODE* pPinnedVidPnSourceModeInfo; 2102 2103 Status = pCurVidPnSourceModeSetInterface->pfnAcquirePinnedModeInfo(hCurVidPnSourceModeSet, &pPinnedVidPnSourceModeInfo); 2104 Assert(Status == STATUS_SUCCESS || Status == STATUS_GRAPHICS_MODE_NOT_PINNED); 2105 if (Status == STATUS_SUCCESS) 2106 { 2107 vboxVidPnDumpSourceMode("Source Pinned: ", pPinnedVidPnSourceModeInfo, "\n"); 2108 pCurVidPnSourceModeSetInterface->pfnReleaseModeInfo(hCurVidPnSourceModeSet, pPinnedVidPnSourceModeInfo); 2109 } 2110 else if (Status == STATUS_GRAPHICS_MODE_NOT_PINNED) 2111 { 2112 drprintf(("Source NOT Pinned\n")); 2113 } 2114 else 2115 { 2116 drprintf(("ERROR getting piined Source Mode(0x%x)\n", Status)); 2117 } 2118 pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hCurVidPnSourceModeSet); 2119 } 2120 else 2121 { 2122 drprintf(("ERROR getting SourceModeSet(0x%x)\n", Status)); 2123 } 2124 } 2125 2126 2127 static DECLCALLBACK(BOOLEAN) vboxVidPnDumpSourceModeSetEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, 2128 D3DKMDT_HVIDPNSOURCEMODESET hNewVidPnSourceModeSet, const DXGK_VIDPNSOURCEMODESET_INTERFACE *pVidPnSourceModeSetInterface, 2129 const D3DKMDT_VIDPN_SOURCE_MODE *pNewVidPnSourceModeInfo, PVOID pContext) 2130 { 2131 vboxVidPnDumpSourceMode("SourceMode: ", pNewVidPnSourceModeInfo, "\n"); 2132 return TRUE; 2133 } 2134 2135 void vboxVidPnDumpSourceModeSet(PDEVICE_EXTENSION pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId) 2136 { 2137 drprintf((" >>>***SourceMode Set for Source(%d)***\n", VidPnSourceId)); 2138 D3DKMDT_HVIDPNSOURCEMODESET hCurVidPnSourceModeSet; 2139 const DXGK_VIDPNSOURCEMODESET_INTERFACE *pCurVidPnSourceModeSetInterface; 2140 2141 NTSTATUS Status = pVidPnInterface->pfnAcquireSourceModeSet(hVidPn, 2142 VidPnSourceId, 2143 &hCurVidPnSourceModeSet, 2144 &pCurVidPnSourceModeSetInterface); 2145 Assert(Status == STATUS_SUCCESS); 2146 if (Status == STATUS_SUCCESS) 2147 { 2148 2149 Status = vboxVidPnEnumSourceModes(pDevExt, hVidPn, pVidPnInterface, hCurVidPnSourceModeSet, pCurVidPnSourceModeSetInterface, 2150 vboxVidPnDumpSourceModeSetEnum, NULL); 2151 Assert(Status == STATUS_SUCCESS); 2152 if (Status != STATUS_SUCCESS) 2153 { 2154 drprintf(("ERROR enumerating Source Modes(0x%x)\n", Status)); 2155 } 2156 pVidPnInterface->pfnReleaseSourceModeSet(hVidPn, hCurVidPnSourceModeSet); 2157 } 2158 else 2159 { 2160 drprintf(("ERROR getting SourceModeSet for Source(%d), Status(0x%x)\n", VidPnSourceId, Status)); 2161 } 2162 2163 drprintf((" <<<***End Of SourceMode Set for Source(%d)***\n", VidPnSourceId)); 2164 } 2165 2166 DECLCALLBACK(BOOLEAN) vboxVidPnDumpTargetModeSetEnum(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, 2167 D3DKMDT_HVIDPNTARGETMODESET hNewVidPnTargetModeSet, const DXGK_VIDPNTARGETMODESET_INTERFACE *pVidPnTargetModeSetInterface, 2168 const D3DKMDT_VIDPN_TARGET_MODE *pNewVidPnTargetModeInfo, PVOID pContext) 2169 { 2170 vboxVidPnDumpTargetMode("TargetMode: ", pNewVidPnTargetModeInfo, "\n"); 2171 return TRUE; 2172 } 2173 2174 void vboxVidPnDumpTargetModeSet(PDEVICE_EXTENSION pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId) 2175 { 2176 drprintf((" >>>***TargetMode Set for Target(%d)***\n", VidPnTargetId)); 2177 D3DKMDT_HVIDPNTARGETMODESET hCurVidPnTargetModeSet; 2178 const DXGK_VIDPNTARGETMODESET_INTERFACE *pCurVidPnTargetModeSetInterface; 2179 2180 NTSTATUS Status = pVidPnInterface->pfnAcquireTargetModeSet(hVidPn, 2181 VidPnTargetId, 2182 &hCurVidPnTargetModeSet, 2183 &pCurVidPnTargetModeSetInterface); 2184 Assert(Status == STATUS_SUCCESS); 2185 if (Status == STATUS_SUCCESS) 2186 { 2187 2188 Status = vboxVidPnEnumTargetModes(pDevExt, hVidPn, pVidPnInterface, hCurVidPnTargetModeSet, pCurVidPnTargetModeSetInterface, 2189 vboxVidPnDumpTargetModeSetEnum, NULL); 2190 Assert(Status == STATUS_SUCCESS); 2191 if (Status != STATUS_SUCCESS) 2192 { 2193 drprintf(("ERROR enumerating Target Modes(0x%x)\n", Status)); 2194 } 2195 pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hCurVidPnTargetModeSet); 2196 } 2197 else 2198 { 2199 drprintf(("ERROR getting TargetModeSet for Target(%d), Status(0x%x)\n", VidPnTargetId, Status)); 2200 } 2201 2202 drprintf((" <<<***End Of TargetMode Set for Target(%d)***\n", VidPnTargetId)); 2203 } 2204 2205 2206 void vboxVidPnDumpPinnedTargetMode(const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId) 2207 { 2208 D3DKMDT_HVIDPNTARGETMODESET hCurVidPnTargetModeSet; 2209 const DXGK_VIDPNTARGETMODESET_INTERFACE *pCurVidPnTargetModeSetInterface; 2210 2211 NTSTATUS Status = pVidPnInterface->pfnAcquireTargetModeSet(hVidPn, 2212 VidPnTargetId, 2213 &hCurVidPnTargetModeSet, 2214 &pCurVidPnTargetModeSetInterface); 2215 Assert(Status == STATUS_SUCCESS); 2216 if (Status == STATUS_SUCCESS) 2217 { 2218 CONST D3DKMDT_VIDPN_TARGET_MODE* pPinnedVidPnTargetModeInfo; 2219 2220 Status = pCurVidPnTargetModeSetInterface->pfnAcquirePinnedModeInfo(hCurVidPnTargetModeSet, &pPinnedVidPnTargetModeInfo); 2221 Assert(Status == STATUS_SUCCESS || Status == STATUS_GRAPHICS_MODE_NOT_PINNED); 2222 if (Status == STATUS_SUCCESS) 2223 { 2224 vboxVidPnDumpTargetMode("Target Pinned: ", pPinnedVidPnTargetModeInfo, "\n"); 2225 pCurVidPnTargetModeSetInterface->pfnReleaseModeInfo(hCurVidPnTargetModeSet, pPinnedVidPnTargetModeInfo); 2226 } 2227 else if (Status == STATUS_GRAPHICS_MODE_NOT_PINNED) 2228 { 2229 drprintf(("Target NOT Pinned\n")); 2230 } 2231 else 2232 { 2233 drprintf(("ERROR getting piined Target Mode(0x%x)\n", Status)); 2234 } 2235 pVidPnInterface->pfnReleaseTargetModeSet(hVidPn, hCurVidPnTargetModeSet); 2236 } 2237 else 2238 { 2239 drprintf(("ERROR getting TargetModeSet(0x%x)\n", Status)); 2240 } 2241 } 1863 2242 1864 2243 void vboxVidPnDumpPath(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, … … 1866 2245 { 1867 2246 drprintf((" >>Start Dump VidPn Path>>\n")); 1868 drprintf(("VidPnSourceId(%d), VidPnTargetId(%d), ImportanceOrdinal(%s), VidPnTargetColorBasis(%s), Content(%s)\n", 1869 pVidPnPresentPathInfo->VidPnSourceId, pVidPnPresentPathInfo->VidPnTargetId, 2247 drprintf(("VidPnSourceId(%d), VidPnTargetId(%d)\n", 2248 pVidPnPresentPathInfo->VidPnSourceId, pVidPnPresentPathInfo->VidPnTargetId)); 2249 2250 vboxVidPnDumpPinnedSourceMode(hVidPn, pVidPnInterface, pVidPnPresentPathInfo->VidPnSourceId); 2251 vboxVidPnDumpPinnedTargetMode(hVidPn, pVidPnInterface, pVidPnPresentPathInfo->VidPnTargetId); 2252 2253 drprintf(("ImportanceOrdinal(%s), VidPnTargetColorBasis(%s), Content(%s)\n", 1870 2254 vboxVidPnDumpStrImportance(pVidPnPresentPathInfo->ImportanceOrdinal), 1871 2255 vboxVidPnDumpStrColorBasis(pVidPnPresentPathInfo->VidPnTargetColorBasis), 1872 2256 vboxVidPnDumpStrContent(pVidPnPresentPathInfo->Content))); 1873 2257 vboxVidPnDumpPathTransformation(&pVidPnPresentPathInfo->ContentTransformation); 1874 vboxVidPnDumpRegion("VisibleFromActiveTLOffset : ", &pVidPnPresentPathInfo->VisibleFromActiveTLOffset, "\n");1875 vboxVidPnDumpRegion("VisibleFromActiveBROffset : ", &pVidPnPresentPathInfo->VisibleFromActiveBROffset, "\n");2258 vboxVidPnDumpRegion("VisibleFromActiveTLOffset(", &pVidPnPresentPathInfo->VisibleFromActiveTLOffset, ")\n"); 2259 vboxVidPnDumpRegion("VisibleFromActiveBROffset(", &pVidPnPresentPathInfo->VisibleFromActiveBROffset, ")\n"); 1876 2260 vboxVidPnDumpRanges("VidPnTargetColorCoeffDynamicRanges: ", &pVidPnPresentPathInfo->VidPnTargetColorCoeffDynamicRanges, "\n"); 1877 2261 vboxVidPnDumpCopyProtectoin(&pVidPnPresentPathInfo->CopyProtection); … … 1891 2275 } 1892 2276 1893 void vboxVidPnDumpVidPn( PDEVICE_EXTENSION pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface)1894 { 1895 drprintf ((" >>>>>>>>>>>>>>>>>Start Dumping VidPn>>>>>>>>>>>>>>>>>>>>>>\n"));2277 void vboxVidPnDumpVidPn(const char * pPrefix, PDEVICE_EXTENSION pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, const char * pSuffix) 2278 { 2279 drprintf (("%s", pPrefix)); 1896 2280 1897 2281 D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology; … … 1907 2291 } 1908 2292 1909 drprintf (("<<<<<<<<<<<<<<<<<Stop Dumping VidPn<<<<<<<<<<<<<<<<<<<<<<\n")); 1910 } 2293 for (int i = 0; i < commonFromDeviceExt(pDevExt)->cDisplays; ++i) 2294 { 2295 vboxVidPnDumpSourceModeSet(pDevExt, hVidPn, pVidPnInterface, (D3DDDI_VIDEO_PRESENT_SOURCE_ID)i); 2296 vboxVidPnDumpTargetModeSet(pDevExt, hVidPn, pVidPnInterface, (D3DDDI_VIDEO_PRESENT_TARGET_ID)i); 2297 } 2298 2299 drprintf (("%s", pSuffix)); 2300 } -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVidPn.h
r33868 r33980 18 18 #define VBOXVDPN_C_DISPLAY_VBLANK_SIZE 180 19 19 20 NTSTATUS vboxVidPnCheckTopology( const D3DKMDT_HVIDPN hDesiredVidPn,20 NTSTATUS vboxVidPnCheckTopology(struct _DEVICE_EXTENSION* pDevExt, const D3DKMDT_HVIDPN hDesiredVidPn, 21 21 D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology, const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface, 22 22 BOOLEAN *pbSupported); … … 129 129 D3DDDI_VIDEO_PRESENT_TARGET_ID targetId, D3DKMDT_MONITOR_CAPABILITIES_ORIGIN enmOrigin, 130 130 D3DKMDT_2DREGION *pResolutions, uint32_t cResolutions, int32_t iPreferred); 131 132 void vboxVidPnDumpVidPn(const char * pPrefix, PDEVICE_EXTENSION pDevExt, D3DKMDT_HVIDPN hVidPn, const DXGK_VIDPN_INTERFACE* pVidPnInterface, const char * pSuffix); 131 133 #endif /* #ifndef ___VBoxVideoVidPn_h___ */ -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp
r33879 r33980 3621 3621 if (Status == STATUS_SUCCESS) 3622 3622 { 3623 #ifdef DEBUG_misha 3624 vboxVidPnDumpVidPn("\n>>>>IS SUPPORTED VidPN : >>>>\n", pContext, pIsSupportedVidPnArg->hDesiredVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<\n\n"); 3625 #endif 3626 3623 3627 D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology; 3624 3628 const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface; … … 3626 3630 if (Status == STATUS_SUCCESS) 3627 3631 { 3628 Status = vboxVidPnCheckTopology(p IsSupportedVidPnArg->hDesiredVidPn, hVidPnTopology, pVidPnTopologyInterface, &bSupported);3632 Status = vboxVidPnCheckTopology(pContext, pIsSupportedVidPnArg->hDesiredVidPn, hVidPnTopology, pVidPnTopologyInterface, &bSupported); 3629 3633 if (Status == STATUS_SUCCESS && bSupported) 3630 3634 { … … 3702 3706 pIsSupportedVidPnArg->IsVidPnSupported = bSupported; 3703 3707 3708 #ifdef DEBUG_misha 3709 drprintf(("The Given VidPn is %ssupported", pIsSupportedVidPnArg->IsVidPnSupported ? "", "!!NOT!! ")); 3710 #endif 3711 3704 3712 dfprintf(("<== "__FUNCTION__ ", status(0x%x), context(0x%x)\n", Status, hAdapter)); 3705 3713 … … 3730 3738 if (Status == STATUS_SUCCESS) 3731 3739 { 3732 for (int i = 0; i < commonFromDeviceExt(pDevExt)->cDisplays; ++i) 3733 { 3740 VIDEO_MODE_INFORMATION *pResModes = NULL; 3741 uint32_t cResModes = 0; 3742 for (int i = commonFromDeviceExt(pDevExt)->cDisplays -1; i >= 0 ; --i) 3743 { 3744 /* @todo: check that we actually need the current source->target */ 3734 3745 D3DKMDT_2DREGION Resolution; 3735 3746 PVBOXWDDM_VIDEOMODES_INFO pInfo = &pInfos[i]; … … 3745 3756 } 3746 3757 3758 int32_t iPreferableResMode; 3759 uint32_t cActualResModes; 3760 3761 Status = vboxWddmGetModesForResolution(pDevExt, pInfo, &Resolution, 3762 pResModes, cResModes, &cActualResModes, &iPreferableResMode); 3763 Assert(Status == STATUS_SUCCESS || Status == STATUS_BUFFER_TOO_SMALL); 3764 if (Status == STATUS_BUFFER_TOO_SMALL) 3765 { 3766 Assert(cResModes < cActualResModes); 3767 if (pResModes) 3768 { 3769 vboxWddmMemFree(pResModes); 3770 } 3771 pResModes = (VIDEO_MODE_INFORMATION*)vboxWddmMemAllocZero(sizeof (*pResModes) * cActualResModes); 3772 Assert(pResModes); 3773 if (!pResModes) 3774 { 3775 Status = STATUS_NO_MEMORY; 3776 break; 3777 } 3778 cResModes = cActualResModes; 3779 Status = vboxWddmGetModesForResolution(pDevExt, pInfo, &Resolution, 3780 pResModes, cResModes, &cActualResModes, &iPreferableResMode); 3781 Assert(Status == STATUS_SUCCESS); 3782 if (Status != STATUS_SUCCESS) 3783 break; 3784 } 3785 else if (Status != STATUS_SUCCESS) 3786 break; 3787 3788 Assert(iPreferableResMode > 0); 3789 3747 3790 Status = vboxVidPnCreatePopulateVidPnFromLegacy(pDevExt, pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn, pVidPnInterface, 3748 p Info->aModes, pInfo->cModes, pInfo->iPreferredMode,3749 pInfo->aResolutions, pInfo->cResolutions,3750 i, i); 3791 pResModes, cResModes, iPreferableResMode, 3792 &Resolution, 1 /* cResolutions */, 3793 i, i); /* srcId, tgtId */ 3751 3794 Assert(Status == STATUS_SUCCESS); 3752 3795 if (Status != STATUS_SUCCESS) … … 3756 3799 } 3757 3800 } 3801 3802 #ifdef DEBUG_misha 3803 vboxVidPnDumpVidPn("\n>>>>Recommended VidPN: >>>>\n", pDevExt, pRecommendFunctionalVidPnArg->hRecommendedFunctionalVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<\n\n"); 3804 #endif 3758 3805 } 3759 3806 … … 3782 3829 if (Status == STATUS_SUCCESS) 3783 3830 { 3831 #ifdef DEBUG_misha 3832 vboxVidPnDumpVidPn("\n>>>>MODALITY VidPN (IN) : >>>>\n", pDevExt, pEnumCofuncModalityArg->hConstrainingVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<\n\n"); 3833 #endif 3834 3784 3835 D3DKMDT_HVIDPNTOPOLOGY hVidPnTopology; 3785 3836 const DXGK_VIDPNTOPOLOGY_INTERFACE* pVidPnTopologyInterface; … … 3807 3858 else 3808 3859 drprintf((__FUNCTION__ ": pfnGetTopology failed Status(0x%x)\n", Status)); 3860 3861 #ifdef DEBUG_misha 3862 vboxVidPnDumpVidPn("\n>>>>MODALITY VidPN (OUT) : >>>>\n", pDevExt, pEnumCofuncModalityArg->hConstrainingVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<\n\n"); 3863 #endif 3809 3864 } 3810 3865 else … … 3993 4048 const DXGK_VIDPN_INTERFACE* pVidPnInterface = NULL; 3994 4049 NTSTATUS Status = pDevExt->u.primary.DxgkInterface.DxgkCbQueryVidPnInterface(pCommitVidPnArg->hFunctionalVidPn, DXGK_VIDPN_INTERFACE_VERSION_V1, &pVidPnInterface); 4050 Assert(Status == STATUS_SUCCESS); 3995 4051 if (Status == STATUS_SUCCESS) 3996 4052 { 4053 #ifdef DEBUG_misha 4054 vboxVidPnDumpVidPn("\n>>>>COMMIT VidPN: >>>>\n", pDevExt, pCommitVidPnArg->hFunctionalVidPn, pVidPnInterface, "<<<<<<<<<<<<<<<<<<<<\n\n"); 4055 #endif 3997 4056 if (pCommitVidPnArg->AffectedVidPnSourceId != D3DDDI_ID_ALL) 3998 4057 { -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp
r33931 r33980 280 280 Ctx.Info.Height = Height; 281 281 Ctx.Info.BitsPerPixel = BitsPerPixel; 282 DWORD err = vboxDispIfWDDMAdapterOp(pIf, (int)Id, vboxDispIfResizeWDDMOp, &Ctx); 282 DWORD err = vboxDispIfWDDMAdapterOp(pIf, -1, /* (int)Id - always say -1 to use primary display since the display does not really matter here */ 283 vboxDispIfResizeWDDMOp, &Ctx); 283 284 if (err == NO_ERROR) 284 285 {
Note:
See TracChangeset
for help on using the changeset viewer.