VirtualBox

Changeset 33022 in vbox for trunk


Ignore:
Timestamp:
Oct 9, 2010 4:01:01 PM (14 years ago)
Author:
vboxsync
Message:

Additions/WINNT/Graphics: more refactoring

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Miniport
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r32989 r33022  
    13421342{
    13431343#ifndef VBOX_WITH_HGSMI
    1344     ULONG ulAvailable = PrimaryExtension->u.primary.cbVRAM
    1345                         - PrimaryExtension->u.primary.cbMiniportHeap
     1344    ULONG ulAvailable = commonFromDeviceExt(PrimaryExtension)->cbVRAM
     1345                        - commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap
    13461346                        - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE;
    13471347#else
    1348     ULONG ulAvailable = PrimaryExtension->u.primary.cbVRAM
    1349                         - PrimaryExtension->u.primary.cbMiniportHeap
     1348    ULONG ulAvailable = commonFromDeviceExt(PrimaryExtension)->cbVRAM
     1349                        - commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap
    13501350                        - VBVA_ADAPTER_INFORMATION_SIZE;
    13511351#endif /* VBOX_WITH_HGSMI */
     
    13591359
    13601360    dprintf(("VBoxVideo::VBoxComputeFrameBufferSizes: cbVRAM = 0x%08X, cDisplays = %d, ulSize = 0x%08X, ulSize * cDisplays = 0x%08X, slack = 0x%08X\n",
    1361              PrimaryExtension->u.primary.cbVRAM, PrimaryExtension->u.primary.cDisplays,
     1361             commonFromDeviceExt(PrimaryExtension)->cbVRAM, PrimaryExtension->u.primary.cDisplays,
    13621362             ulSize, ulSize * PrimaryExtension->u.primary.cDisplays,
    13631363             ulAvailable - ulSize * PrimaryExtension->u.primary.cDisplays));
     
    14571457    Assert(PrimaryExtension);
    14581458
    1459     PrimaryExtension->u.primary.pHostFlags = NULL;
     1459    commonFromDeviceExt(PrimaryExtension)->pHostFlags = NULL;
    14601460    return TRUE;
    14611461}
     
    14671467    dprintf(("VBoxVideo::VBoxUnmapAdapterInformation\n"));
    14681468
    1469     ppv = PrimaryExtension->u.primary.pvAdapterInformation;
     1469    ppv = commonFromDeviceExt(PrimaryExtension)->pvAdapterInformation;
    14701470    if (ppv)
    14711471    {
     
    14871487        Assert(ntStatus == STATUS_SUCCESS);
    14881488#endif
    1489         PrimaryExtension->u.primary.pvAdapterInformation = NULL;
     1489        commonFromDeviceExt(PrimaryExtension)->pvAdapterInformation = NULL;
    14901490    }
    14911491}
     
    15271527    } VBOXVIDEOQCONF32;
    15281528
    1529     VBOXVIDEOQCONF32 *p = (VBOXVIDEOQCONF32 *)PrimaryExtension->u.primary.pvAdapterInformation;
     1529    VBOXVIDEOQCONF32 *p = (VBOXVIDEOQCONF32 *)commonFromDeviceExt(PrimaryExtension)->pvAdapterInformation;
    15301530
    15311531    p->hdrQuery.u8Type     = VBOX_VIDEO_INFO_TYPE_QUERY_CONF32;
     
    19701970#ifdef VBOX_WITH_HGSMI
    19711971      /* pPrimary is not yet set */
    1972       ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.hgsmiInfo.IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;
    1973       ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.hgsmiInfo.IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST;
     1972      ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.commonInfo.IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;
     1973      ((PDEVICE_EXTENSION)HwDeviceExtension)->u.primary.commonInfo.IOPortGuest = (RTIOPORT)VGA_PORT_HGSMI_GUEST;
    19741974#endif /* VBOX_WITH_HGSMI */
    19751975
     
    20702070    if (PrimaryExtension)
    20712071    {
    2072         if (PrimaryExtension->u.primary.pHostFlags) /* If HGSMI is enabled at all. */
    2073         {
    2074             uint32_t flags = PrimaryExtension->u.primary.pHostFlags->u32HostFlags;
     2072        if (commonFromDeviceExt(PrimaryExtension)->pHostFlags) /* If HGSMI is enabled at all. */
     2073        {
     2074            uint32_t flags = commonFromDeviceExt(PrimaryExtension)->pHostFlags->u32HostFlags;
    20752075            if((flags & HGSMIHOSTFLAGS_IRQ) != 0)
    20762076            {
     
    28672867    VbglTerminate ();
    28682868
    2869     VBoxUnmapAdapterMemory (pDevExt, &pDevExt->u.primary.pvMiniportHeap, pDevExt->u.primary.cbMiniportHeap);
     2869    VBoxUnmapAdapterMemory (pDevExt, &commonFromDeviceExt(pDevExt)->pvMiniportHeap, commonFromDeviceExt(pDevExt)->cbMiniportHeap);
    28702870    VBoxUnmapAdapterInformation (pDevExt);
    28712871
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.h

    r32989 r33022  
    200200#endif
    201201
     202typedef struct VBOXVIDEO_COMMON
     203{
     204    ULONG cbVRAM;                       /* The VRAM size. */
     205
     206    ULONG cbMiniportHeap;               /* The size of reserved VRAM for miniport driver heap.
     207                                         * It is at offset:
     208                                         *   cbAdapterMemorySize - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE - cbMiniportHeap
     209                                         */
     210    PVOID pvMiniportHeap;               /* The pointer to the miniport heap VRAM.
     211                                         * This is mapped by miniport separately.
     212                                         */
    202213#ifdef VBOX_WITH_HGSMI
    203 typedef struct VBOXVIDEO_COMMON
    204 {
     214    volatile HGSMIHOSTFLAGS * pHostFlags; /* HGSMI host flags */
     215    volatile bool bHostCmdProcessing;
     216    VBOXVCMNSPIN_LOCK pSynchLock;
     217#endif
     218
     219    PVOID pvAdapterInformation;         /* The pointer to the last 4K of VRAM.
     220                                         * This is mapped by miniport separately.
     221                                         */
     222
     223#ifdef VBOX_WITH_HGSMI
    205224    BOOLEAN bHGSMI;                     /* Whether HGSMI is enabled. */
    206225
     
    216235    /* The IO Port Number for guest commands. */
    217236    RTIOPORT IOPortGuest;
     237#endif
    218238} VBOXVIDEO_COMMON, *PVBOXVIDEO_COMMON;
    219 #endif
    220239
    221240typedef struct _DEVICE_EXTENSION
     
    253272           int cDisplays;                      /* Number of displays. */
    254273
    255            ULONG cbVRAM;                       /* The VRAM size. */
    256 
    257            ULONG cbMiniportHeap;               /* The size of reserved VRAM for miniport driver heap.
    258                                                 * It is at offset:
    259                                                 *   cbAdapterMemorySize - VBOX_VIDEO_ADAPTER_INFORMATION_SIZE - cbMiniportHeap
    260                                                 */
    261            PVOID pvMiniportHeap;               /* The pointer to the miniport heap VRAM.
    262                                                 * This is mapped by miniport separately.
    263                                                 */
    264274#ifdef VBOX_WITH_WDDM
    265275           VBOXVDMAINFO Vdma;
     
    269279#endif
    270280
    271 #ifdef VBOX_WITH_HGSMI
    272            volatile HGSMIHOSTFLAGS * pHostFlags; /* HGSMI host flags */
    273            volatile bool bHostCmdProcessing;
    274            VBOXVCMNSPIN_LOCK pSynchLock;
    275 #endif
    276 
    277            PVOID pvAdapterInformation;         /* The pointer to the last 4K of VRAM.
    278                                                 * This is mapped by miniport separately.
    279                                                 */
    280 
    281281           ULONG ulMaxFrameBufferSize;         /* The size of the VRAM allocated for the a single framebuffer. */
    282282
     
    289289#endif /* !VBOX_WITH_HGSMI */
    290290
     291           VBOXVIDEO_COMMON commonInfo;
    291292#ifdef VBOX_WITH_HGSMI
    292            VBOXVIDEO_COMMON hgsmiInfo;
    293293# ifndef VBOX_WITH_WDDM
    294294           /* Video Port API dynamically picked up at runtime for binary backwards compatibility with older NT versions */
     
    347347{
    348348#ifndef VBOX_WITH_WDDM
    349     return &pExt->pPrimary->u.primary.hgsmiInfo;
     349    return &pExt->pPrimary->u.primary.commonInfo;
    350350#else
    351     return &pExt->u.primary.hgsmiInfo;
     351    return &pExt->u.primary.commonInfo;
    352352#endif
    353353}
     
    888888}
    889889
    890 BOOLEAN VBoxHGSMIIsSupported (PDEVICE_EXTENSION PrimaryExtension);
     890BOOLEAN VBoxHGSMIIsSupported (void);
    891891
    892892VOID VBoxSetupDisplaysHGSMI (PDEVICE_EXTENSION PrimaryExtension,
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp

    r32989 r33022  
    120120    {
    121121        bool bLock = false;
    122         if(!(PrimaryExtension->u.primary.pHostFlags->u32HostFlags & HGSMIHOSTFLAGS_COMMANDS_PENDING))
     122        if(!(commonFromDeviceExt(PrimaryExtension)->pHostFlags->u32HostFlags & HGSMIHOSTFLAGS_COMMANDS_PENDING))
    123123        {
    124124            if(!bProcessing)
     
    126126                break;
    127127            }
    128             VBOX_HGSMI_LOCK(PrimaryExtension, &PrimaryExtension->u.primary.pSynchLock, flags, &OldIrql);
    129             if(!(PrimaryExtension->u.primary.pHostFlags->u32HostFlags & HGSMIHOSTFLAGS_COMMANDS_PENDING))
    130             {
    131                 Assert(PrimaryExtension->u.primary.bHostCmdProcessing);
    132                 PrimaryExtension->u.primary.bHostCmdProcessing = false;
    133                 VBOX_HGSMI_UNLOCK(PrimaryExtension, &PrimaryExtension->u.primary.pSynchLock, flags, OldIrql);
     128            VBOX_HGSMI_LOCK(PrimaryExtension, &commonFromDeviceExt(PrimaryExtension)->pSynchLock, flags, &OldIrql);
     129            if(!(commonFromDeviceExt(PrimaryExtension)->pHostFlags->u32HostFlags & HGSMIHOSTFLAGS_COMMANDS_PENDING))
     130            {
     131                Assert(commonFromDeviceExt(PrimaryExtension)->bHostCmdProcessing);
     132                commonFromDeviceExt(PrimaryExtension)->bHostCmdProcessing = false;
     133                VBOX_HGSMI_UNLOCK(PrimaryExtension, &commonFromDeviceExt(PrimaryExtension)->pSynchLock, flags, OldIrql);
    134134                break;
    135135            }
    136             VBOX_HGSMI_UNLOCK(PrimaryExtension, &PrimaryExtension->u.primary.pSynchLock, flags, OldIrql);
     136            VBOX_HGSMI_UNLOCK(PrimaryExtension, &commonFromDeviceExt(PrimaryExtension)->pSynchLock, flags, OldIrql);
    137137        }
    138138        else
     
    140140            if(!bProcessing)
    141141            {
    142                 VBOX_HGSMI_LOCK(PrimaryExtension, &PrimaryExtension->u.primary.pSynchLock, flags, &OldIrql);
    143                 if(!(PrimaryExtension->u.primary.pHostFlags->u32HostFlags & HGSMIHOSTFLAGS_COMMANDS_PENDING)
    144                         || PrimaryExtension->u.primary.bHostCmdProcessing)
     142                VBOX_HGSMI_LOCK(PrimaryExtension, &commonFromDeviceExt(PrimaryExtension)->pSynchLock, flags, &OldIrql);
     143                if(!(commonFromDeviceExt(PrimaryExtension)->pHostFlags->u32HostFlags & HGSMIHOSTFLAGS_COMMANDS_PENDING)
     144                        || commonFromDeviceExt(PrimaryExtension)->bHostCmdProcessing)
    145145                {
    146                     VBOX_HGSMI_UNLOCK(PrimaryExtension, &PrimaryExtension->u.primary.pSynchLock, flags, OldIrql);
     146                    VBOX_HGSMI_UNLOCK(PrimaryExtension, &commonFromDeviceExt(PrimaryExtension)->pSynchLock, flags, OldIrql);
    147147                    break;
    148148                }
    149                 Assert(!PrimaryExtension->u.primary.bHostCmdProcessing);
    150                 PrimaryExtension->u.primary.bHostCmdProcessing = true;
    151                 VBOX_HGSMI_UNLOCK(PrimaryExtension, &PrimaryExtension->u.primary.pSynchLock, flags, OldIrql);
     149                Assert(!commonFromDeviceExt(PrimaryExtension)->bHostCmdProcessing);
     150                commonFromDeviceExt(PrimaryExtension)->bHostCmdProcessing = true;
     151                VBOX_HGSMI_UNLOCK(PrimaryExtension, &commonFromDeviceExt(PrimaryExtension)->pSynchLock, flags, OldIrql);
    152152                bProcessing = true;
    153153            }
     
    155155
    156156        Assert(bProcessing);
    157         Assert(PrimaryExtension->u.primary.bHostCmdProcessing);
    158         Assert((PrimaryExtension->u.primary.pHostFlags->u32HostFlags & HGSMIHOSTFLAGS_COMMANDS_PENDING) != 0);
     157        Assert(commonFromDeviceExt(PrimaryExtension)->bHostCmdProcessing);
     158        Assert((commonFromDeviceExt(PrimaryExtension)->pHostFlags->u32HostFlags & HGSMIHOSTFLAGS_COMMANDS_PENDING) != 0);
    159159        bProcessing = true;
    160160
     
    164164
    165165/* Detect whether HGSMI is supported by the host. */
    166 BOOLEAN VBoxHGSMIIsSupported (PDEVICE_EXTENSION PrimaryExtension)
     166BOOLEAN VBoxHGSMIIsSupported (void)
    167167{
    168168    USHORT DispiId;
     
    404404    VBVAINFOHEAP *p = (VBVAINFOHEAP *)pvData;
    405405
    406     p->u32HeapOffset = PrimaryExtension->u.primary.cbVRAM
    407                        - PrimaryExtension->u.primary.cbMiniportHeap
     406    p->u32HeapOffset = commonFromDeviceExt(PrimaryExtension)->cbVRAM
     407                       - commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap
    408408                       - VBVA_ADAPTER_INFORMATION_SIZE;
    409     p->u32HeapSize = PrimaryExtension->u.primary.cbMiniportHeap;
     409    p->u32HeapSize = commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap;
    410410
    411411    return VINF_SUCCESS;
     
    417417    HGSMIBUFFERLOCATION *p = (HGSMIBUFFERLOCATION *)pvData;
    418418
    419     p->offLocation = PrimaryExtension->u.primary.cbVRAM - sizeof (HGSMIHOSTFLAGS);
     419    p->offLocation = commonFromDeviceExt(PrimaryExtension)->cbVRAM - sizeof (HGSMIHOSTFLAGS);
    420420    p->cbLocation = sizeof (HGSMIHOSTFLAGS);
    421421
     
    724724    /* Preinitialize the primary extension.
    725725     * Note: bVBoxVideoSupported is set to FALSE, because HGSMI is active instead.
     726     * Note 2: shouldn't be needed for WDDM.
    726727     */
    727728    PrimaryExtension->pNext                              = NULL;
     
    737738    PrimaryExtension->u.primary.cDisplays                = 1;
    738739#endif
    739     PrimaryExtension->u.primary.cbVRAM                   = AdapterMemorySize;
    740     PrimaryExtension->u.primary.cbMiniportHeap           = 0;
    741     PrimaryExtension->u.primary.pvMiniportHeap           = NULL;
    742     PrimaryExtension->u.primary.pvAdapterInformation     = NULL;
    743     PrimaryExtension->u.primary.pHostFlags               = NULL;
     740    commonFromDeviceExt(PrimaryExtension)->cbVRAM                   = AdapterMemorySize;
     741    commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap           = 0;
     742    commonFromDeviceExt(PrimaryExtension)->pvMiniportHeap           = NULL;
     743    commonFromDeviceExt(PrimaryExtension)->pvAdapterInformation     = NULL;
     744    commonFromDeviceExt(PrimaryExtension)->pHostFlags               = NULL;
    744745    PrimaryExtension->u.primary.ulMaxFrameBufferSize     = 0;
    745     commonFromDeviceExt(PrimaryExtension)->bHGSMI         = VBoxHGSMIIsSupported (PrimaryExtension);
     746    commonFromDeviceExt(PrimaryExtension)->bHGSMI         = VBoxHGSMIIsSupported ();
    746747    VBoxVideoCmnMemZero(&commonFromDeviceExt(PrimaryExtension)->areaHostHeap, sizeof(HGSMIAREA));
    747748    VBoxVideoCmnMemZero(&PrimaryExtension->areaDisplay, sizeof(HGSMIAREA));
     
    756757        /* Map the adapter information. It will be needed for HGSMI IO. */
    757758        rc = VBoxMapAdapterMemory (PrimaryExtension,
    758                                    &PrimaryExtension->u.primary.pvAdapterInformation,
    759                                    PrimaryExtension->u.primary.cbVRAM - VBVA_ADAPTER_INFORMATION_SIZE,
     759                                   &commonFromDeviceExt(PrimaryExtension)->pvAdapterInformation,
     760                                   commonFromDeviceExt(PrimaryExtension)->cbVRAM - VBVA_ADAPTER_INFORMATION_SIZE,
    760761                                   VBVA_ADAPTER_INFORMATION_SIZE
    761762                                  );
     
    771772            /* Setup a HGSMI heap within the adapter information area. */
    772773            rc = HGSMIHeapSetup (&commonFromDeviceExt(PrimaryExtension)->hgsmiAdapterHeap,
    773                                  PrimaryExtension->u.primary.pvAdapterInformation,
     774                                 commonFromDeviceExt(PrimaryExtension)->pvAdapterInformation,
    774775                                 VBVA_ADAPTER_INFORMATION_SIZE - sizeof(HGSMIHOSTFLAGS),
    775                                  PrimaryExtension->u.primary.cbVRAM - VBVA_ADAPTER_INFORMATION_SIZE,
     776                                 commonFromDeviceExt(PrimaryExtension)->cbVRAM - VBVA_ADAPTER_INFORMATION_SIZE,
    776777                                 false /*fOffsetBased*/);
    777778
     
    785786            else
    786787            {
    787                     PrimaryExtension->u.primary.pHostFlags = (HGSMIHOSTFLAGS*)(((uint8_t*)PrimaryExtension->u.primary.pvAdapterInformation)
     788                    commonFromDeviceExt(PrimaryExtension)->pHostFlags = (HGSMIHOSTFLAGS*)(((uint8_t*)commonFromDeviceExt(PrimaryExtension)->pvAdapterInformation)
    788789                                                            + VBVA_ADAPTER_INFORMATION_SIZE - sizeof(HGSMIHOSTFLAGS));
    789790            }
     
    814815
    815816            /* Round up to 4096 bytes. */
    816             PrimaryExtension->u.primary.cbMiniportHeap = (cbMiniportHeap + 0xFFF) & ~0xFFF;
     817            commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap = (cbMiniportHeap + 0xFFF) & ~0xFFF;
    817818
    818819            dprintf(("VBoxVideo::VBoxSetupDisplays: cbMiniportHeap = 0x%08X, PrimaryExtension->u.primary.cbMiniportHeap = 0x%08X, cbMiniportHeapMaxSize = 0x%08X\n",
    819                      cbMiniportHeap, PrimaryExtension->u.primary.cbMiniportHeap, cbMiniportHeapMaxSize));
     820                     cbMiniportHeap, commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap, cbMiniportHeapMaxSize));
    820821
    821822            /* Map the heap region.
     
    826827             */
    827828            rc = VBoxMapAdapterMemory (PrimaryExtension,
    828                                        &PrimaryExtension->u.primary.pvMiniportHeap,
    829                                        PrimaryExtension->u.primary.cbVRAM
     829                                       &commonFromDeviceExt(PrimaryExtension)->pvMiniportHeap,
     830                                       commonFromDeviceExt(PrimaryExtension)->cbVRAM
    830831                                       - VBVA_ADAPTER_INFORMATION_SIZE
    831                                        - PrimaryExtension->u.primary.cbMiniportHeap,
    832                                        PrimaryExtension->u.primary.cbMiniportHeap
     832                                       - commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap,
     833                                       commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap
    833834                                      );
    834835            if (rc != NO_ERROR)
    835836            {
    836                 PrimaryExtension->u.primary.pvMiniportHeap = NULL;
    837                 PrimaryExtension->u.primary.cbMiniportHeap = 0;
     837                commonFromDeviceExt(PrimaryExtension)->pvMiniportHeap = NULL;
     838                commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap = 0;
    838839                commonFromDeviceExt(PrimaryExtension)->bHGSMI = FALSE;
    839840            }
    840841            else
    841842            {
    842                 HGSMIOFFSET offBase = PrimaryExtension->u.primary.cbVRAM
     843                HGSMIOFFSET offBase = commonFromDeviceExt(PrimaryExtension)->cbVRAM
    843844                                      - VBVA_ADAPTER_INFORMATION_SIZE
    844                                       - PrimaryExtension->u.primary.cbMiniportHeap;
     845                                      - commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap;
    845846
    846847                /* Init the host hap area. Buffers from the host will be placed there. */
    847848                HGSMIAreaInitialize (&commonFromDeviceExt(PrimaryExtension)->areaHostHeap,
    848                                      PrimaryExtension->u.primary.pvMiniportHeap,
    849                                      PrimaryExtension->u.primary.cbMiniportHeap,
     849                                     commonFromDeviceExt(PrimaryExtension)->pvMiniportHeap,
     850                                     commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap,
    850851                                     offBase);
    851852            }
     
    854855        {
    855856            /* Host has not requested a heap. */
    856             PrimaryExtension->u.primary.pvMiniportHeap = NULL;
    857             PrimaryExtension->u.primary.cbMiniportHeap = 0;
     857            commonFromDeviceExt(PrimaryExtension)->pvMiniportHeap = NULL;
     858            commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap = 0;
    858859        }
    859860    }
     
    953954    if (commonFromDeviceExt(PrimaryExtension)->bHGSMI)
    954955    {
    955         ULONG ulAvailable = PrimaryExtension->u.primary.cbVRAM
    956                             - PrimaryExtension->u.primary.cbMiniportHeap
     956        ULONG ulAvailable = commonFromDeviceExt(PrimaryExtension)->cbVRAM
     957                            - commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap
    957958                            - VBVA_ADAPTER_INFORMATION_SIZE;
    958959
     
    10471048    {
    10481049        /* Unmap the memory if VBoxVideo is not supported. */
    1049         VBoxUnmapAdapterMemory (PrimaryExtension, &PrimaryExtension->u.primary.pvMiniportHeap, PrimaryExtension->u.primary.cbMiniportHeap);
     1050        VBoxUnmapAdapterMemory (PrimaryExtension, &commonFromDeviceExt(PrimaryExtension)->pvMiniportHeap, commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap);
    10501051        VBoxUnmapAdapterInformation (PrimaryExtension);
    10511052
     
    10551056    if (commonFromDeviceExt(PrimaryExtension)->bHGSMI)
    10561057    {
    1057         VBoxVideoCmnSpinLockCreate(PrimaryExtension, &PrimaryExtension->u.primary.pSynchLock);
     1058        VBoxVideoCmnSpinLockCreate(PrimaryExtension, &commonFromDeviceExt(PrimaryExtension)->pSynchLock);
    10581059    }
    10591060
     
    10931094        if (RT_SUCCESS(rc))
    10941095        {
    1095             /*rc = */VBoxUnmapAdapterMemory(PrimaryExtension, &PrimaryExtension->u.primary.pvMiniportHeap, PrimaryExtension->u.primary.cbMiniportHeap);
     1096            /*rc = */VBoxUnmapAdapterMemory(PrimaryExtension, &commonFromDeviceExt(PrimaryExtension)->pvMiniportHeap, commonFromDeviceExt(PrimaryExtension)->cbMiniportHeap);
    10961097/*
    10971098            AssertRC(rc);
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r32989 r33022  
    419419        */
    420420       *pAdapterMemorySize = VBoxVideoCmnPortReadUlong((PULONG)VBE_DISPI_IOPORT_DATA);
    421        if (VBoxHGSMIIsSupported (pContext))
     421       if (VBoxHGSMIIsSupported ())
    422422       {
    423423           commonFromDeviceExt(pContext)->IOPortHost = (RTIOPORT)VGA_PORT_HGSMI_HOST;
     
    771771    BOOLEAN bOur = FALSE;
    772772    BOOLEAN bNeedDpc = FALSE;
    773     if (pDevExt->u.primary.pHostFlags) /* If HGSMI is enabled at all. */
     773    if (commonFromDeviceExt(pDevExt)->pHostFlags) /* If HGSMI is enabled at all. */
    774774    {
    775775        VBOXSHGSMILIST CtlList;
     
    787787#endif
    788788
    789         uint32_t flags = pDevExt->u.primary.pHostFlags->u32HostFlags;
     789        uint32_t flags = commonFromDeviceExt(pDevExt)->pHostFlags->u32HostFlags;
    790790        bOur = (flags & HGSMIHOSTFLAGS_IRQ);
    791791        do
     
    857857                break;
    858858
    859             flags = pDevExt->u.primary.pHostFlags->u32HostFlags;
     859            flags = commonFromDeviceExt(pDevExt)->pHostFlags->u32HostFlags;
    860860        } while (1);
    861861
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