VirtualBox

Changeset 53799 in vbox


Ignore:
Timestamp:
Jan 14, 2015 12:34:05 PM (10 years ago)
Author:
vboxsync
Message:

Host 3D + WDDM driver: add to host service a check to detect if host reports minimal OpenGL capabilities (currently, only Windows host is considered); notify WDDM driver about that and prevent it from loading once it happened.

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r53126 r53799  
    74877487#endif
    74887488        }
     7489        else
     7490        {
     7491            /* If host reports minimal OpenGL capabilities. */
     7492            if (VBoxMpCrGetHostCaps() & CR_VBOX_CAP_MINIMAL_HOST_CAPS)
     7493            {
     7494                LOGREL(("Host reported minimal OpenGL capabilities. Rolling back."));
     7495                /* The proper fix would be to switch driver to display-only mode, however, it is currently broken (at least for Win8.1 guests).
     7496                   'Status = STATUS_UNSUCCESSFUL;' prevents driver from loading and therefore forces Windows to use its default driver => 3D content is shown.
     7497                   The 'g_VBoxDisplayOnly = 1;' is commented out intentionally; please uncomment when display-only mode will be
     7498                   fixed and remove 'Status = STATUS_UNSUCCESSFUL;' one. */
     7499                Status = STATUS_UNSUCCESSFUL;
     7500#ifdef VBOX_WDDM_WIN8
     7501                //g_VBoxDisplayOnly = 1;
     7502#endif
     7503            }
     7504        }
    74897505
    74907506#if 0 //defined(DEBUG_misha) && defined(VBOX_WDDM_WIN8)
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_protocol.h

    r52451 r53799  
    5353/* flush command blocks for execution  */
    5454#define CR_VBOX_CAP_CMDBLOCKS_FLUSH      0x00000010
    55 
    56 #define CR_VBOX_CAPS_ALL                 0x0000001f
     55/* Notify guest if host reports minimal OpenGL capabilities. */
     56#define CR_VBOX_CAP_MINIMAL_HOST_CAPS    0x00000020
     57
     58#define CR_VBOX_CAPS_ALL                 0x0000003f
    5759
    5860
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_config.c

    r53233 r53799  
    5858}
    5959
     60/* Check if host reports minimal OpenGL capabilities.
     61 * For example, on Windows host this may happen if host has no graphics
     62 * card drivers installed or drivers were not properly signed or VBox
     63 * is running via remote desktop session etc. Currently, we take care
     64 * about Windows host only when specific RENDERER and VERSION strings
     65 * returned in this case. Later this check should be expanded to the
     66 * rest of hosts. */
     67static bool crServerHasMinimalCaps()
     68{
     69    const char *sRealRender;
     70    const char *sRealVersion;
     71
     72    if (!cr_server.head_spu)
     73        return true;
     74
     75    sRealRender  = cr_server.head_spu->dispatch_table.GetString(GL_REAL_RENDERER);
     76    sRealVersion = cr_server.head_spu->dispatch_table.GetString(GL_REAL_VERSION);
     77
     78    if (sRealRender && RTStrCmp(sRealRender, "GDI Generic") == 0)
     79        if (sRealVersion && RTStrCmp(sRealVersion, "1.1.0") == 0)
     80            return true;
     81    return false;
     82}
     83
    6084void crServerSetVBoxConfiguration()
    6185{
     
    154178    }
    155179
     180    if (crServerHasMinimalCaps())
     181    {
     182        crDebug("Cfg: report minimal OpenGL capabilities");
     183        cr_server.u32Caps |= CR_VBOX_CAP_MINIMAL_HOST_CAPS;
     184    }
     185
    156186    crInfo("Cfg: u32Caps(%#x), fVisualBitsDefault(%#x)",
    157187            cr_server.u32Caps,
     
    306336    }
    307337
     338    if (crServerHasMinimalCaps())
     339    {
     340        crDebug("Cfg: report minimal OpenGL capabilities");
     341        cr_server.u32Caps |= CR_VBOX_CAP_MINIMAL_HOST_CAPS;
     342    }
     343
    308344    crInfo("Cfg: u32Caps(%#x), fVisualBitsDefault(%#x)",
    309345            cr_server.u32Caps,
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