VirtualBox

Changeset 105959 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Sep 4, 2024 4:57:58 PM (7 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164698
Message:

Main: (Hopefully) Made it more clear which graphics features are supported in which context (guests / hosts): For system properties we now expose features based on the current host platform, whereas in platform properties we expose features on a per-graphics adapter and VM platform combination. bugref:10749

Location:
trunk/src/VBox/Main/src-server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/GraphicsAdapterImpl.cpp

    r105885 r105959  
    264264    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    265265
    266     /* Validate if the given feature is supported by this graphics controller. */
    267     if (!PlatformProperties::s_isGraphicsControllerFeatureSupported(mData->graphicsControllerType, aFeature))
     266    /* Validate if the given feature is supported by this graphics controller on the given VM platform. */
     267    if (!PlatformProperties::s_isGraphicsControllerFeatureSupported(mParent->i_getPlatform()->i_getArchitecture(),
     268                                                                    mData->graphicsControllerType, aFeature))
    268269        return setError(VBOX_E_NOT_SUPPORTED, tr("The graphics controller does not support the given feature"));
    269270
     
    305306    switch (aFeature)
    306307    {
    307 #ifndef VBOX_WITH_VIRT_ARMV8 /* On macOS (ARM) we don't support any 2D/3D acceleration for now. */
    308308        case GraphicsFeature_Acceleration2DVideo:
    309309            pfSetting = &mData->fAccelerate2DVideo;
    310             *pfSetting = false; /* @bugref{9691} -- The legacy VHWA acceleration has been disabled completely. */
    311310            break;
    312311
     
    314313            pfSetting = &mData->fAccelerate3D;
    315314            break;
    316 #endif
     315
    317316        default:
    318317            break;
  • trunk/src/VBox/Main/src-server/PlatformImpl.cpp

    r102455 r105959  
    850850}
    851851
     852/**
     853 * Internal helper to return the currently set architecture of this platform.
     854 *
     855 * @returns Currently set architecture.
     856 *
     857 * @note    Takes the read lock.
     858 */
     859PlatformArchitecture_T Platform::i_getArchitecture(void)
     860{
     861    PlatformArchitecture_T enmArchitecture;
     862    HRESULT const hrc = getArchitecture(&enmArchitecture);
     863    AssertComRCReturn(hrc, PlatformArchitecture_None);
     864    return enmArchitecture;
     865}
     866
  • trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp

    r105873 r105959  
    11531153HRESULT SystemProperties::getSupportedGraphicsFeatures(std::vector<GraphicsFeature_T> &aSupportedGraphicsFeatures)
    11541154{
     1155#if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
    11551156    static const GraphicsFeature_T s_aGraphicsFeatures[] =
    11561157    {
    1157 #ifdef VBOX_WITH_VIDEOHWACCEL
     1158# ifdef VBOX_WITH_VIDEOHWACCEL
    11581159        GraphicsFeature_Acceleration2DVideo,
    1159 #endif
    1160 #ifdef VBOX_WITH_3D_ACCELERATION
     1160# endif
     1161# ifdef VBOX_WITH_3D_ACCELERATION
    11611162        GraphicsFeature_Acceleration3D
    1162 #endif
     1163# endif
    11631164    };
    11641165    RT_CPP_VECTOR_ASSIGN_ARRAY(aSupportedGraphicsFeatures, s_aGraphicsFeatures);
     1166#else
     1167    /* On ARM-based hosts we don't support any 2D/3D acceleration for now.*/
     1168    aSupportedGraphicsFeatures.clear();
     1169#endif
    11651170
    11661171    return S_OK;
Note: See TracChangeset for help on using the changeset viewer.

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