VirtualBox

Ignore:
Timestamp:
Mar 1, 2015 4:03:52 PM (10 years ago)
Author:
vboxsync
Message:

Added 3D capability usage xrefs against current linux sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp

    r54211 r54572  
    17221722#include "DevVGA-SVGA3d-shared.h"
    17231723
     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 */
    17241736static uint32_t vmsvga3dGetSurfaceFormatSupport(PVMSVGA3DSTATE pState3D, uint32_t idx3dCaps)
    17251737{
     
    18461858    *pu32Val = 0;
    18471859
     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
    18481866    switch (idx3dCaps)
    18491867    {
     1868    /* Linux: vmwgfx_fifo.c in kmod; only used with SVGA_CAP_GBOBJECTS. */
    18501869    case SVGA3D_DEVCAP_3D:
    18511870        *pu32Val = 1; /* boolean? */
     
    18641883        break;
    18651884
     1885    /* Linux: svga_screen.c in gallium; 3.0 or later required. */
    18661886    case SVGA3D_DEVCAP_VERTEX_SHADER_VERSION:
    18671887        *pu32Val = pState->caps.vertexShaderVersion;
     
    18731893        break;
    18741894
     1895    /* Linux: svga_screen.c in gallium; 3.0 or later required. */
    18751896    case SVGA3D_DEVCAP_FRAGMENT_SHADER_VERSION:
    18761897        *pu32Val = pState->caps.fragmentShaderVersion;
     
    19091930        break;
    19101931
     1932    /* Linux: svga_screen.c in gallium; capped at 80.0, default 1.0. */
    19111933    case SVGA3D_DEVCAP_MAX_POINT_SIZE:
    19121934        AssertCompile(sizeof(uint32_t) == sizeof(float));
     
    19191941        break;
    19201942
     1943    /* Linux: svga_screen.c in gallium (for PIPE_CAP_MAX_TEXTURE_2D_LEVELS); have default if missing. */
    19211944    case SVGA3D_DEVCAP_MAX_TEXTURE_WIDTH:
    19221945    case SVGA3D_DEVCAP_MAX_TEXTURE_HEIGHT:
     
    19241947        break;
    19251948
     1949    /* Linux: svga_screen.c in gallium (for PIPE_CAP_MAX_TEXTURE_3D_LEVELS); have default if missing. */
    19261950    case SVGA3D_DEVCAP_MAX_VOLUME_EXTENT:
    19271951        //*pu32Val = pCaps->MaxVolumeExtent;
     
    19361960        break;
    19371961
     1962    /* Linux: svga_screen.c in gallium (for PIPE_CAPF_MAX_TEXTURE_ANISOTROPY); defaults to 4.0. */
    19381963    case SVGA3D_DEVCAP_MAX_TEXTURE_ANISOTROPY:
    19391964        *pu32Val = pState->caps.maxTextureAnisotropy;
     
    19451970        break;
    19461971
     1972    /* Linux: svga_screen.c in gallium (for PIPE_SHADER_VERTEX/PIPE_SHADER_CAP_MAX_INSTRUCTIONS); defaults to 512. */
    19471973    case SVGA3D_DEVCAP_MAX_VERTEX_SHADER_INSTRUCTIONS:
    19481974        *pu32Val = pState->caps.maxVertexShaderInstructions;
     
    19531979        break;
    19541980
     1981    /* Linux: svga_screen.c in gallium (for PIPE_SHADER_VERTEX/PIPE_SHADER_CAP_MAX_TEMPS); defaults to 32. */
    19551982    case SVGA3D_DEVCAP_MAX_VERTEX_SHADER_TEMPS:
    19561983        *pu32Val = pState->caps.maxVertexShaderTemps;
    19571984        break;
    19581985
     1986    /* Linux: svga_screen.c in gallium (for PIPE_SHADER_FRAGMENT/PIPE_SHADER_CAP_MAX_TEMPS); defaults to 32. */
    19591987    case SVGA3D_DEVCAP_MAX_FRAGMENT_SHADER_TEMPS:
    19601988        *pu32Val = pState->caps.maxFragmentShaderTemps;
     
    20042032        break;
    20052033
    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     */
    20072053    case SVGA3D_DEVCAP_SURFACEFMT_X8R8G8B8:
    20082054    case SVGA3D_DEVCAP_SURFACEFMT_A8R8G8B8:
     
    20542100        break;
    20552101
     2102    /* Linux: Not referenced in current sources. */
    20562103    case SVGA3D_DEVCAP_SURFACEFMT_BC4_UNORM:
    20572104    case SVGA3D_DEVCAP_SURFACEFMT_BC5_UNORM:
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette