VirtualBox

Ignore:
Timestamp:
Jun 26, 2009 3:37:23 PM (16 years ago)
Author:
vboxsync
Message:

video hw accel: colorkey support in guest driver, checking gl caps (version & extension) in QGL gramebuffer, some bugfixes

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Display
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.c

    r20692 r20985  
    14331433            pBody->SrcGuestSurfInfo = (uint64_t)pSrcDesc;
    14341434
     1435            pBody->u.in.flags = vboxVHWAFromDDBLTs(lpBlt->dwFlags);
     1436            vboxVHWAFromDDBLTFX(&pBody->u.in.desc, &lpBlt->bltFX);
     1437
    14351438            ASMAtomicIncU32(&pSrcDesc->cPendingBltsSrc);
    14361439            ASMAtomicIncU32(&pDestDesc->cPendingBltsDst);
     
    15971600        return false;
    15981601
     1602    pHALInfo->ddCaps.dwCaps |= vboxVHWAToDDCAPS(pDev->vhwaInfo.caps);
     1603
    15991604    if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT))
    16001605    {
     
    16041609                     rops,
    16051610                     sizeof(ropListNT)/sizeof(ropListNT[0]));
    1606 
    1607         // The most basic DirectDraw functionality
    1608         pHALInfo->ddCaps.dwCaps |=   DDCAPS_BLT
    1609                                      | DDCAPS_BLTQUEUE;
    1610         if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLTCOLORFILL))
    1611         {
    1612             pHALInfo->ddCaps.dwCaps |= DDCAPS_BLTCOLORFILL;
    1613         }
    16141611    }
    16151612
     
    16171614
    16181615
    1619     pHALInfo->ddCaps.ddsCaps.dwCaps |=   DDSCAPS_OFFSCREENPLAIN
    1620                                          | DDSCAPS_PRIMARYSURFACE;
    1621     if(pDev->vhwaInfo.surfaceCaps & VBOXVHWA_SCAPS_FLIP)
    1622     {
    1623         pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_FLIP;
    1624     }
     1616    pHALInfo->ddCaps.ddsCaps.dwCaps |= vboxVHWAToDDSCAPS(pDev->vhwaInfo.surfaceCaps);
     1617
    16251618//disabled
    16261619//    pHALInfo->ddCaps.dwCaps |= DDCAPS_3D           |
     
    16451638    // might get restricted by apps to run in fullscreen only
    16461639    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANRENDERWINDOWED;
     1640
     1641    // Also permit surfaces wider than the display buffer.
     1642    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_WIDESURFACES;
    16471643//#endif
    16481644
     
    16691665    // 3. Mirroring in X and Y
    16701666    // 4. ColorKeying from a source color and a source color space
    1671     if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT)
     1667    if((VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT) || VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_OVERLAY))
    16721668            && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLTSTRETCH))
    16731669    {
    1674         pHALInfo->ddCaps.dwCaps |= DDCAPS_BLTSTRETCH;
    1675 
    16761670        // Special effects caps
    16771671        //TODO: filter them out
     
    17011695    }
    17021696
    1703     if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT)
     1697    if((VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT) || VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_OVERLAY))
    17041698            && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_COLORKEY))
    17051699    {
    1706         pHALInfo->ddCaps.dwCaps |= DDCAPS_COLORKEY;
    1707 //                               | DDCAPS_CANBLTSYSMEM
    1708 
    1709         // ColorKey caps
    1710         //TODO: filter them out
    1711         pHALInfo->ddCaps.dwCKeyCaps |= DDCKEYCAPS_SRCBLT         |
    1712                                       DDCKEYCAPS_SRCBLTCLRSPACE |
    1713                                       DDCKEYCAPS_DESTBLT        |
    1714                                       DDCKEYCAPS_DESTBLTCLRSPACE;
    1715 
    1716         pHALInfo->ddCaps.dwCKeyCaps |=  DDCKEYCAPS_SRCBLTCLRSPACEYUV
    1717                                         | DDCKEYCAPS_DESTBLTCLRSPACEYUV;
    1718 
    1719 #if 0
    1720         DDCKEYCAPS_DESTBLT Supports transparent blitting with a color key that identifies the replaceable bits of the destination surface for RGB colors.
    1721         DDCKEYCAPS_DESTBLTCLRSPACE Supports transparent blitting with a color space that identifies the replaceable bits of the destination surface for RGB colors.
    1722         DDCKEYCAPS_DESTBLTCLRSPACEYUV Supports transparent blitting with a color space that identifies the replaceable bits of the destination surface for YUV colors.
    1723         DDCKEYCAPS_DESTBLTYUV Supports transparent blitting with a color key that identifies the replaceable bits of the destination surface for YUV colors.
    1724 
    1725         DDCKEYCAPS_SRCBLT Supports transparent blitting using the color key for the source with this surface for RGB colors.
    1726         DDCKEYCAPS_SRCBLTCLRSPACE Supports transparent blitting using a color space for the source with this surface for RGB colors.
    1727         DDCKEYCAPS_SRCBLTCLRSPACEYUV Supports transparent blitting using a color space for the source with this surface for YUV colors.
    1728         DDCKEYCAPS_SRCBLTYUV Supports transparent blitting using the color key for the source with this surface for YUV colors.
    1729 #endif
    1730 
    1731     }
    1732 
    1733     if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_OVERLAY)
    1734             && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_COLORKEY))
    1735     {
    1736 #if 0
    1737         DDCKEYCAPS_DESTOVERLAY Supports overlaying with color keying of the replaceable bits of the destination surface being overlaid for RGB colors.
    1738         DDCKEYCAPS_DESTOVERLAYCLRSPACE Supports a color space as the color key for the destination of RGB colors.
    1739         DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV Supports a color space as the color key for the destination of YUV colors.
    1740         DDCKEYCAPS_DESTOVERLAYONEACTIVE Supports only one active destination color key value for visible overlay surfaces.
    1741         DDCKEYCAPS_DESTOVERLAYYUV Supports overlaying using color keying of the replaceable bits of the destination surface being overlaid for YUV colors.
    1742         DDCKEYCAPS_NOCOSTOVERLAY Indicates that there are no bandwidth tradeoffs for using the color key with an overlay.
    1743 
    1744         DDCKEYCAPS_SRCOVERLAY Supports overlaying using the color key for the source with this overlay surface for RGB colors.
    1745         DDCKEYCAPS_SRCOVERLAYCLRSPACE Supports overlaying using a color space as the source color key for the overlay surface for RGB colors.
    1746         DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV Supports overlaying using a color space as the source color key for the overlay surface for YUV colors.
    1747         DDCKEYCAPS_SRCOVERLAYONEACTIVE Supports only one active source color key value for visible overlay surfaces.
    1748         DDCKEYCAPS_SRCOVERLAYYUV Supports overlaying using the color key for the source with this overlay surface for YUV colors.
    1749 #endif
    1750     }
     1700        pHALInfo->ddCaps.dwCKeyCaps = vboxVHWAToDDCKEYCAPS(pDev->vhwaInfo.colorKeyCaps);
     1701    }
     1702
    17511703//    pHALInfo->ddCaps.dwSVBCaps = DDCAPS_BLT;
    17521704
     
    17771729//    pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_MIPMAP;
    17781730
    1779         pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM;
    1780 
    17811731    {
    17821732//#ifdef SUPPORT_VIDEOPORT
     
    17971747            pHALInfo->ddCaps.dwMaxVisibleOverlays = pDev->vhwaInfo.numOverlays;
    17981748            pHALInfo->ddCaps.dwCurrVisibleOverlays = 0;
    1799 
    1800             pHALInfo->ddCaps.dwCaps |=  DDCAPS_OVERLAY          |
    1801                                         DDCAPS_OVERLAYFOURCC    |
    1802                                         DDCAPS_OVERLAYSTRETCH   |
    1803                                         DDCAPS_COLORKEYHWASSIST |
    1804                                         DDCAPS_OVERLAYCANTCLIP;
    1805 
    1806             pHALInfo->ddCaps.dwCKeyCaps |= DDCKEYCAPS_SRCOVERLAY           |
    1807                                            DDCKEYCAPS_SRCOVERLAYONEACTIVE  |
    1808                                            DDCKEYCAPS_SRCOVERLAYYUV        |
    1809                                            DDCKEYCAPS_DESTOVERLAY          |
    1810                                            DDCKEYCAPS_DESTOVERLAYONEACTIVE |
    1811                                            DDCKEYCAPS_DESTOVERLAYYUV;
    1812 
    1813             pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_OVERLAY;
    1814 
    1815             pHALInfo->ddCaps.dwFXCaps |= DDFXCAPS_OVERLAYSHRINKX   |
    1816                                          DDFXCAPS_OVERLAYSHRINKXN  |
    1817                                          DDFXCAPS_OVERLAYSHRINKY   |
    1818                                          DDFXCAPS_OVERLAYSHRINKYN  |
    1819                                          DDFXCAPS_OVERLAYSTRETCHX  |
    1820                                          DDFXCAPS_OVERLAYSTRETCHXN |
    1821                                          DDFXCAPS_OVERLAYSTRETCHY  |
    1822                                          DDFXCAPS_OVERLAYSTRETCHYN;
    18231749
    18241750            // Indicates that Perm3 has no stretch ratio limitation
     
    18341760//#endif
    18351761//#endif
    1836 
    1837     // Also permit surfaces wider than the display buffer.
    1838     pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_WIDESURFACES;
    18391762
    18401763
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/driver.h

    r20906 r20985  
    315315uint32_t vboxVHWASupportedDDSCAPS(uint32_t caps);
    316316uint32_t vboxVHWASupportedDDPFS(uint32_t caps);
     317
     318uint32_t vboxVHWAUnsupportedDDCEYCAPS(uint32_t caps);
     319uint32_t vboxVHWASupportedDDCEYCAPS(uint32_t caps);
     320
     321uint32_t vboxVHWAToDDBLTs(uint32_t caps);
     322uint32_t vboxVHWAFromDDBLTs(uint32_t caps);
     323
     324void vboxVHWAFromDDBLTFX(VBOXVHWA_BLTFX *pVHWABlt, DDBLTFX *pDdBlt);
     325
     326void vboxVHWAFromDDCOLORKEY(VBOXVHWA_COLORKEY *pVHWACKey, DDCOLORKEY  *pDdCKey);
     327
    317328uint32_t vboxVHWAFromDDCAPS(uint32_t caps);
    318329uint32_t vboxVHWAToDDCAPS(uint32_t caps);
     
    321332uint32_t vboxVHWAFromDDPFS(uint32_t caps);
    322333uint32_t vboxVHWAToDDPFS(uint32_t caps);
     334uint32_t vboxVHWAFromDDCKEYCAPS(uint32_t caps);
     335uint32_t vboxVHWAToDDCKEYCAPS(uint32_t caps);
    323336int vboxVHWAFromDDPIXELFORMAT(VBOXVHWA_PIXELFORMAT *pVHWAFormat, DDPIXELFORMAT *pDdFormat);
    324337int vboxVHWAFromDDSURFACEDESC(VBOXVHWA_SURFACEDESC *pVHWADesc, DDSURFACEDESC *pDdDesc);
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