VirtualBox

Changeset 104907 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 12, 2024 7:13:44 PM (7 months ago)
Author:
vboxsync
Message:

Devices/Graphics: Split the initialization of 3D caps from writing them to FIFO. bugref:9830

File:
1 edited

Legend:

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

    r102520 r104907  
    67686768# ifdef VBOX_WITH_VMSVGA3D
    67696769/**
    6770  * Initializes the host 3D capabilities and writes them to FIFO memory.
     6770 * Initializes the host 3D capabilities (pThis->svga.au32DevCaps).
    67716771 *
    67726772 * @returns VBox status code.
     
    67746774 * @param   pThisCC   The VGA/VMSVGA state for ring-3.
    67756775 */
    6776 static void vmsvgaR3InitFifo3DCaps(PVGASTATE pThis, PVGASTATECC pThisCC)
     6776static void vmsvgaR3Init3DCaps(PVGASTATE pThis, PVGASTATECC pThisCC)
    67776777{
    67786778    /* Query the capabilities and store them in the pThis->svga.au32DevCaps array. */
     
    68206820
    68216821    RTLogRelSetBuffering(fSavedBuffering);
    6822 
     6822}
     6823
     6824
     6825/**
     6826 * Write the host 3D capabilities to FIFO memory.
     6827 * Must be called after vmsvgaR3Init3DCaps.
     6828 *
     6829 * @returns VBox status code.
     6830 * @param   pThis     The shared VGA/VMSVGA instance data.
     6831 * @param   pThisCC   The VGA/VMSVGA state for ring-3.
     6832 */
     6833static void vmsvgaR3InitFIFO3D(PVGASTATE pThis, PVGASTATECC pThisCC)
     6834{
    68236835    /* 3d hardware version; latest and greatest */
    68246836    pThisCC->svga.pau32FIFO[SVGA_FIFO_3D_HWVERSION_REVISED] = SVGA3D_HWVERSION_CURRENT;
     
    68496861    pCaps->header.length = 0;
    68506862}
    6851 
    6852 # endif
     6863# endif /* VBOX_WITH_VMSVGA3D */
    68536864
    68546865/**
     
    69026913
    69036914# ifdef VBOX_WITH_VMSVGA3D
    6904     if (   pThis->svga.f3DEnabled
    6905         && !pThis->fVmSvga3)
    6906         vmsvgaR3InitFifo3DCaps(pThis, pThisCC);
     6915    if (pThis->svga.f3DEnabled)
     6916    {
     6917        vmsvgaR3Init3DCaps(pThis, pThisCC);
     6918        if (!pThis->fVmSvga3)
     6919            vmsvgaR3InitFIFO3D(pThis, pThisCC);
     6920    }
    69076921# endif
    69086922
     
    73787392
    73797393# ifdef VBOX_WITH_VMSVGA3D
    7380     if (   pThis->svga.f3DEnabled
    7381         && !pThis->fVmSvga3)
     7394    if (pThis->svga.f3DEnabled)
    73827395    {
    73837396        PVMSVGAR3STATE pSVGAState = pThisCC->svga.pSvgaR3State;
     
    73857398        if (RT_SUCCESS(rc))
    73867399        {
    7387             /* Initialize FIFO 3D capabilities. */
    7388             vmsvgaR3InitFifo3DCaps(pThis, pThisCC);
     7400            /* Initialize 3D capabilities. */
     7401            vmsvgaR3Init3DCaps(pThis, pThisCC);
     7402            if (!pThis->fVmSvga3)
     7403                vmsvgaR3InitFIFO3D(pThis, pThisCC);
    73897404        }
    73907405        else
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