Changeset 54572 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
- Timestamp:
- Mar 1, 2015 4:03:52 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r54211 r54572 1722 1722 #include "DevVGA-SVGA3d-shared.h" 1723 1723 1724 /** 1725 * Worker for vmsvga3dQueryCaps that figures out supported operations for a 1726 * given surface format capability. 1727 * 1728 * @returns Supported/indented operations (SVGA3DFORMAT_OP_XXX). 1729 * @param pState3D The 3D state. 1730 * @param idx3dCaps The SVGA3D_CAPS_XXX value of the surface format. 1731 * 1732 * @remarks See fromat_cap_table in svga_format.c (mesa/gallium) for a reference 1733 * of implicit guest expectations: 1734 * http://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/svga/svga_format.c 1735 */ 1724 1736 static uint32_t vmsvga3dGetSurfaceFormatSupport(PVMSVGA3DSTATE pState3D, uint32_t idx3dCaps) 1725 1737 { … … 1846 1858 *pu32Val = 0; 1847 1859 1860 /* 1861 * The capabilities access by current (2015-03-01) linux sources (gallium, 1862 * vmwgfx, xorg-video-vmware) are annotated, caps without xref annotations 1863 * aren't access. 1864 */ 1865 1848 1866 switch (idx3dCaps) 1849 1867 { 1868 /* Linux: vmwgfx_fifo.c in kmod; only used with SVGA_CAP_GBOBJECTS. */ 1850 1869 case SVGA3D_DEVCAP_3D: 1851 1870 *pu32Val = 1; /* boolean? */ … … 1864 1883 break; 1865 1884 1885 /* Linux: svga_screen.c in gallium; 3.0 or later required. */ 1866 1886 case SVGA3D_DEVCAP_VERTEX_SHADER_VERSION: 1867 1887 *pu32Val = pState->caps.vertexShaderVersion; … … 1873 1893 break; 1874 1894 1895 /* Linux: svga_screen.c in gallium; 3.0 or later required. */ 1875 1896 case SVGA3D_DEVCAP_FRAGMENT_SHADER_VERSION: 1876 1897 *pu32Val = pState->caps.fragmentShaderVersion; … … 1909 1930 break; 1910 1931 1932 /* Linux: svga_screen.c in gallium; capped at 80.0, default 1.0. */ 1911 1933 case SVGA3D_DEVCAP_MAX_POINT_SIZE: 1912 1934 AssertCompile(sizeof(uint32_t) == sizeof(float)); … … 1919 1941 break; 1920 1942 1943 /* Linux: svga_screen.c in gallium (for PIPE_CAP_MAX_TEXTURE_2D_LEVELS); have default if missing. */ 1921 1944 case SVGA3D_DEVCAP_MAX_TEXTURE_WIDTH: 1922 1945 case SVGA3D_DEVCAP_MAX_TEXTURE_HEIGHT: … … 1924 1947 break; 1925 1948 1949 /* Linux: svga_screen.c in gallium (for PIPE_CAP_MAX_TEXTURE_3D_LEVELS); have default if missing. */ 1926 1950 case SVGA3D_DEVCAP_MAX_VOLUME_EXTENT: 1927 1951 //*pu32Val = pCaps->MaxVolumeExtent; … … 1936 1960 break; 1937 1961 1962 /* Linux: svga_screen.c in gallium (for PIPE_CAPF_MAX_TEXTURE_ANISOTROPY); defaults to 4.0. */ 1938 1963 case SVGA3D_DEVCAP_MAX_TEXTURE_ANISOTROPY: 1939 1964 *pu32Val = pState->caps.maxTextureAnisotropy; … … 1945 1970 break; 1946 1971 1972 /* Linux: svga_screen.c in gallium (for PIPE_SHADER_VERTEX/PIPE_SHADER_CAP_MAX_INSTRUCTIONS); defaults to 512. */ 1947 1973 case SVGA3D_DEVCAP_MAX_VERTEX_SHADER_INSTRUCTIONS: 1948 1974 *pu32Val = pState->caps.maxVertexShaderInstructions; … … 1953 1979 break; 1954 1980 1981 /* Linux: svga_screen.c in gallium (for PIPE_SHADER_VERTEX/PIPE_SHADER_CAP_MAX_TEMPS); defaults to 32. */ 1955 1982 case SVGA3D_DEVCAP_MAX_VERTEX_SHADER_TEMPS: 1956 1983 *pu32Val = pState->caps.maxVertexShaderTemps; 1957 1984 break; 1958 1985 1986 /* Linux: svga_screen.c in gallium (for PIPE_SHADER_FRAGMENT/PIPE_SHADER_CAP_MAX_TEMPS); defaults to 32. */ 1959 1987 case SVGA3D_DEVCAP_MAX_FRAGMENT_SHADER_TEMPS: 1960 1988 *pu32Val = pState->caps.maxFragmentShaderTemps; … … 2004 2032 break; 2005 2033 2006 /* Supported surface formats. */ 2034 #if 0 /* Appeared more recently, not yet implemented. */ 2035 /* Linux: svga_screen.c in gallium; defaults to FALSE. */ 2036 case SVGA3D_DEVCAP_LINE_AA: 2037 break; 2038 /* Linux: svga_screen.c in gallium; defaults to FALSE. */ 2039 case SVGA3D_DEVCAP_LINE_STIPPLE: 2040 break; 2041 /* Linux: svga_screen.c in gallium; defaults to 1.0. */ 2042 case SVGA3D_DEVCAP_MAX_LINE_WIDTH: 2043 break; 2044 /* Linux: svga_screen.c in gallium; defaults to 1.0. */ 2045 case SVGA3D_DEVCAP_MAX_AA_LINE_WIDTH: 2046 break; 2047 #endif 2048 2049 /* 2050 * Supported surface formats. 2051 * Linux: svga_format.c in gallium, format_cap_table defines implicit expectations. 2052 */ 2007 2053 case SVGA3D_DEVCAP_SURFACEFMT_X8R8G8B8: 2008 2054 case SVGA3D_DEVCAP_SURFACEFMT_A8R8G8B8: … … 2054 2100 break; 2055 2101 2102 /* Linux: Not referenced in current sources. */ 2056 2103 case SVGA3D_DEVCAP_SURFACEFMT_BC4_UNORM: 2057 2104 case SVGA3D_DEVCAP_SURFACEFMT_BC5_UNORM:
Note:
See TracChangeset
for help on using the changeset viewer.