Changeset 20985 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Jun 26, 2009 3:37:23 PM (16 years ago)
- 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 1433 1433 pBody->SrcGuestSurfInfo = (uint64_t)pSrcDesc; 1434 1434 1435 pBody->u.in.flags = vboxVHWAFromDDBLTs(lpBlt->dwFlags); 1436 vboxVHWAFromDDBLTFX(&pBody->u.in.desc, &lpBlt->bltFX); 1437 1435 1438 ASMAtomicIncU32(&pSrcDesc->cPendingBltsSrc); 1436 1439 ASMAtomicIncU32(&pDestDesc->cPendingBltsDst); … … 1597 1600 return false; 1598 1601 1602 pHALInfo->ddCaps.dwCaps |= vboxVHWAToDDCAPS(pDev->vhwaInfo.caps); 1603 1599 1604 if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT)) 1600 1605 { … … 1604 1609 rops, 1605 1610 sizeof(ropListNT)/sizeof(ropListNT[0])); 1606 1607 // The most basic DirectDraw functionality1608 pHALInfo->ddCaps.dwCaps |= DDCAPS_BLT1609 | DDCAPS_BLTQUEUE;1610 if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLTCOLORFILL))1611 {1612 pHALInfo->ddCaps.dwCaps |= DDCAPS_BLTCOLORFILL;1613 }1614 1611 } 1615 1612 … … 1617 1614 1618 1615 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 1625 1618 //disabled 1626 1619 // pHALInfo->ddCaps.dwCaps |= DDCAPS_3D | … … 1645 1638 // might get restricted by apps to run in fullscreen only 1646 1639 pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANRENDERWINDOWED; 1640 1641 // Also permit surfaces wider than the display buffer. 1642 pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_WIDESURFACES; 1647 1643 //#endif 1648 1644 … … 1669 1665 // 3. Mirroring in X and Y 1670 1666 // 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)) 1672 1668 && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLTSTRETCH)) 1673 1669 { 1674 pHALInfo->ddCaps.dwCaps |= DDCAPS_BLTSTRETCH;1675 1676 1670 // Special effects caps 1677 1671 //TODO: filter them out … … 1701 1695 } 1702 1696 1703 if( VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT)1697 if((VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT) || VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_OVERLAY)) 1704 1698 && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_COLORKEY)) 1705 1699 { 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 1751 1703 // pHALInfo->ddCaps.dwSVBCaps = DDCAPS_BLT; 1752 1704 … … 1777 1729 // pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_MIPMAP; 1778 1730 1779 pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM;1780 1781 1731 { 1782 1732 //#ifdef SUPPORT_VIDEOPORT … … 1797 1747 pHALInfo->ddCaps.dwMaxVisibleOverlays = pDev->vhwaInfo.numOverlays; 1798 1748 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;1823 1749 1824 1750 // Indicates that Perm3 has no stretch ratio limitation … … 1834 1760 //#endif 1835 1761 //#endif 1836 1837 // Also permit surfaces wider than the display buffer.1838 pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_WIDESURFACES;1839 1762 1840 1763 -
trunk/src/VBox/Additions/WINNT/Graphics/Display/driver.h
r20906 r20985 315 315 uint32_t vboxVHWASupportedDDSCAPS(uint32_t caps); 316 316 uint32_t vboxVHWASupportedDDPFS(uint32_t caps); 317 318 uint32_t vboxVHWAUnsupportedDDCEYCAPS(uint32_t caps); 319 uint32_t vboxVHWASupportedDDCEYCAPS(uint32_t caps); 320 321 uint32_t vboxVHWAToDDBLTs(uint32_t caps); 322 uint32_t vboxVHWAFromDDBLTs(uint32_t caps); 323 324 void vboxVHWAFromDDBLTFX(VBOXVHWA_BLTFX *pVHWABlt, DDBLTFX *pDdBlt); 325 326 void vboxVHWAFromDDCOLORKEY(VBOXVHWA_COLORKEY *pVHWACKey, DDCOLORKEY *pDdCKey); 327 317 328 uint32_t vboxVHWAFromDDCAPS(uint32_t caps); 318 329 uint32_t vboxVHWAToDDCAPS(uint32_t caps); … … 321 332 uint32_t vboxVHWAFromDDPFS(uint32_t caps); 322 333 uint32_t vboxVHWAToDDPFS(uint32_t caps); 334 uint32_t vboxVHWAFromDDCKEYCAPS(uint32_t caps); 335 uint32_t vboxVHWAToDDCKEYCAPS(uint32_t caps); 323 336 int vboxVHWAFromDDPIXELFORMAT(VBOXVHWA_PIXELFORMAT *pVHWAFormat, DDPIXELFORMAT *pDdFormat); 324 337 int vboxVHWAFromDDSURFACEDESC(VBOXVHWA_SURFACEDESC *pVHWADesc, DDSURFACEDESC *pDdDesc);
Note:
See TracChangeset
for help on using the changeset viewer.