VirtualBox

Ignore:
Timestamp:
Nov 25, 2018 3:59:10 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126914
Message:

Device/Graphics: multiple screens for VMSVGA.

File:
1 edited

Legend:

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

    r74261 r75715  
    816816    }
    817817
    818     /** @todo Only screen 0 for now. */
    819     AssertReturn(idDstScreen == 0, VERR_INTERNAL_ERROR);
     818    VMSVGASCREENOBJECT *pScreen = vmsvgaGetScreenObject(pThis, idDstScreen);
     819    AssertReturn(pScreen, VERR_INTERNAL_ERROR);
     820
    820821    AssertReturn(src.mipmap == 0 && src.face == 0, VERR_INVALID_PARAMETER);
    821822    /** @todo scaling */
     
    829830    box.d    = 1;
    830831
    831     /** @todo SVGA_GMR_FRAMEBUFFER is not the screen object
    832      * and might not point to the start of VRAM as assumed here.
    833      */
    834832    dest.ptr.gmrId  = SVGA_GMR_FRAMEBUFFER;
    835     dest.ptr.offset = pThis->svga.uScreenOffset;
    836     dest.pitch      = pThis->svga.cbScanline;
     833    dest.ptr.offset = pScreen->offVRAM;
     834    dest.pitch      = pScreen->cbPitch;
    837835
    838836    if (cRects == 0)
     
    861859
    862860        /* Update the guest image, which is at box.src. */
    863         vgaR3UpdateDisplay(pThis, box.srcx, box.srcy, box.w, box.h);
     861        vmsvgaUpdateScreen(pThis, pScreen, box.srcx, box.srcy, box.w, box.h);
    864862    }
    865863    else
     
    886884
    887885            /* Update the guest image, which is at box.src. */
    888             vgaR3UpdateDisplay(pThis, box.srcx, box.srcy, box.w, box.h);
     886            vmsvgaUpdateScreen(pThis, pScreen, box.srcx, box.srcy, box.w, box.h);
    889887        }
    890888    }
     
    902900    int rc = vmsvga3dSurfaceFromSid(pState, sid, &pSurface);
    903901    AssertRCReturn(rc, rc);
     902
     903    /** @todo Detect screen from coords? Or split rect to screens? */
     904    VMSVGASCREENOBJECT *pScreen = vmsvgaGetScreenObject(pThis, 0);
     905    AssertReturn(pScreen, VERR_INTERNAL_ERROR);
    904906
    905907    /* If there are no recangles specified, just grab a screenful. */
     
    915917        DummyRect.x = DummyRect.srcx = 0;
    916918        DummyRect.y = DummyRect.srcy = 0;
    917         DummyRect.w = pThis->svga.uWidth;
    918         DummyRect.h = pThis->svga.uHeight;
     919        DummyRect.w = pScreen->cWidth;
     920        DummyRect.h = pScreen->cHeight;
    919921        cRects = 1;
    920922        pRect  = &DummyRect;
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