VirtualBox

Changeset 75655 in vbox


Ignore:
Timestamp:
Nov 21, 2018 11:30:22 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126835
Message:

WDDM: extended GaScreenDefine

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
Files:
7 edited

Legend:

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

    r75545 r75655  
    54585458    NTSTATUS Status = STATUS_SUCCESS;
    54595459    PVBOXWDDM_SOURCE pSource = &pDevExt->aSources[pSetVidPnSourceAddress->VidPnSourceId];
     5460#ifdef VBOX_WITH_MESA3D
     5461    if (pDevExt->enmHwType == VBOXVIDEO_HWTYPE_VMSVGA)
     5462    {
     5463        GaScreenDefine(pDevExt->pGa, (uint32_t)pSetVidPnSourceAddress->PrimaryAddress.QuadPart,
     5464                       pSetVidPnSourceAddress->VidPnSourceId,
     5465                       pSource->VScreenPos.x, pSource->VScreenPos.y,
     5466                       pSource->AllocData.SurfDesc.width, pSource->AllocData.SurfDesc.height);
     5467        return STATUS_SUCCESS;
     5468    }
     5469#endif
     5470
    54605471    PVBOXWDDM_ALLOCATION pAllocation;
    54615472    Assert(pSetVidPnSourceAddress->hAllocation);
     
    54895500                                                    pSetVidPnSourceAddress->PrimaryAddress.QuadPart);
    54905501    }
    5491 
    5492 #ifdef VBOX_WITH_MESA3D
    5493     if (pDevExt->enmHwType == VBOXVIDEO_HWTYPE_VMSVGA)
    5494     {
    5495         GaScreenDefine(pDevExt->pGa, (uint32_t)pSetVidPnSourceAddress->PrimaryAddress.QuadPart,
    5496                        pSetVidPnSourceAddress->VidPnSourceId,
    5497                        pSource->AllocData.SurfDesc.width, pSource->AllocData.SurfDesc.height);
    5498     }
    5499 #endif
    55005502
    55015503    pSource->u8SyncState &= ~VBOXWDDM_HGSYNC_F_SYNCED_LOCATION;
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/Svga.cpp

    r75464 r75655  
    213213                          uint32_t u32Offset,
    214214                          uint32_t u32ScreenId,
     215                          int32_t xOrigin,
     216                          int32_t yOrigin,
    215217                          uint32_t u32Width,
    216218                          uint32_t u32Height)
     
    225227    if (pvCmd)
    226228    {
    227         SvgaCmdDefineScreen(pvCmd, u32ScreenId, u32Width, u32Height, u32Offset);
     229        SvgaCmdDefineScreen(pvCmd, u32ScreenId, true,
     230                            xOrigin, yOrigin, u32Width, u32Height,
     231                            /* fPrimary = */ false, u32Offset, /* fBlank = */ false);
    228232        pvCmd = (uint8_t *)pvCmd + sizeof(uint32_t) + sizeof(SVGAScreenObject);
    229233
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/Svga.h

    r75460 r75655  
    129129                          uint32_t u32Offset,
    130130                          uint32_t u32ScreenId,
     131                          int32_t xOrigin,
     132                          int32_t yOrigin,
    131133                          uint32_t u32Width,
    132134                          uint32_t u32Height);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/SvgaCmd.cpp

    r75443 r75655  
    2525 */
    2626
    27 void SvgaCmdDefineScreen(void *pvCmd, uint32_t u32Id, uint32_t u32Width, uint32_t u32Height, uint32_t u32Offset)
     27void SvgaCmdDefineScreen(void *pvCmd, uint32_t u32Id, bool fActivate,
     28                         int32_t xOrigin, int32_t yOrigin, uint32_t u32Width, uint32_t u32Height,
     29                         bool fPrimary, uint32_t u32VRAMOffset, bool fBlank)
    2830{
    2931    uint32_t *pu32Id = (uint32_t *)pvCmd;
     
    3234    *pu32Id = SVGA_CMD_DEFINE_SCREEN;
    3335
    34     pCommand->screen.structSize = sizeof(SVGAScreenObject);
    35     pCommand->screen.id = u32Id;
    36     pCommand->screen.flags = SVGA_SCREEN_MUST_BE_SET | SVGA_SCREEN_IS_PRIMARY;
    37     pCommand->screen.size.width = u32Width;
     36    pCommand->screen.structSize  = sizeof(SVGAScreenObject);
     37    pCommand->screen.id          = u32Id;
     38    pCommand->screen.flags       = SVGA_SCREEN_MUST_BE_SET;
     39    pCommand->screen.flags      |= fPrimary  ? SVGA_SCREEN_IS_PRIMARY : 0;
     40    pCommand->screen.flags      |= !fActivate? SVGA_SCREEN_DEACTIVATE : 0;
     41    pCommand->screen.flags      |= fBlank    ? SVGA_SCREEN_BLANKING   : 0;
     42    pCommand->screen.size.width  = u32Width;
    3843    pCommand->screen.size.height = u32Height;
    39     pCommand->screen.root.x = 0;
    40     pCommand->screen.root.y = 0;
    41     pCommand->screen.backingStore.ptr.gmrId = SVGA_GMR_FRAMEBUFFER;
    42     pCommand->screen.backingStore.ptr.offset = u32Offset;
    43     pCommand->screen.backingStore.pitch = u32Width * 4;
    44     pCommand->screen.cloneCount = 1;
     44    pCommand->screen.root.x      = xOrigin;
     45    pCommand->screen.root.y      = yOrigin;
     46    pCommand->screen.backingStore.ptr.gmrId  = SVGA_GMR_FRAMEBUFFER;
     47    pCommand->screen.backingStore.ptr.offset = u32VRAMOffset;
     48    pCommand->screen.backingStore.pitch      = u32Width * 4;
     49    pCommand->screen.cloneCount  = 1;
    4550}
    4651
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/SvgaCmd.h

    r75443 r75655  
    2121#include "SvgaHw.h"
    2222
    23 void SvgaCmdDefineScreen(void *pvCmd, uint32_t u32Id, uint32_t u32Width, uint32_t u32Height, uint32_t u32Offset);
     23void SvgaCmdDefineScreen(void *pvCmd, uint32_t u32Id, bool fActivate,
     24                         int32_t xOrigin, int32_t yOrigin, uint32_t u32Width, uint32_t u32Height,
     25                         bool fPrimary, uint32_t u32VRAMOffset, bool fBlank);
    2426void SvgaCmdDestroyScreen(void *pvCmd, uint32_t u32Id);
    2527void SvgaCmdUpdate(void *pvCmd, uint32_t u32X, uint32_t u32Y, uint32_t u32Width, uint32_t u32Height);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaWddm.cpp

    r75487 r75655  
    469469                        uint32_t u32Offset,
    470470                        uint32_t u32ScreenId,
     471                        int32_t xOrigin,
     472                        int32_t yOrigin,
    471473                        uint32_t u32Width,
    472474                        uint32_t u32Height)
    473475{
    474     return SvgaScreenDefine(pGaDevExt->hw.pSvga, u32Offset, u32ScreenId, u32Width, u32Height);
     476    return SvgaScreenDefine(pGaDevExt->hw.pSvga, u32Offset, u32ScreenId, xOrigin, yOrigin, u32Width, u32Height);
    475477}
    476478
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaWddm.h

    r75443 r75655  
    3131                        uint32_t u32Offset,
    3232                        uint32_t u32ScreenId,
     33                        int32_t xOrigin,
     34                        int32_t yOrigin,
    3335                        uint32_t u32Width,
    3436                        uint32_t u32Height);
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