VirtualBox

Ignore:
Timestamp:
Dec 18, 2009 6:02:38 PM (15 years ago)
Author:
vboxsync
Message:

2d: report linear stretching caps to the guest; cleanup

File:
1 edited

Legend:

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

    r25052 r25507  
    225225    if(pDev->vhwaInfo.bVHWAEnabled)
    226226    {
    227 //        // TODO: filter out hw-unsupported fourccs
    228 //#define FOURCC_YUV422  (MAKEFOURCC('Y','U','Y','2'))
    229 //#define FOURCC_YUV411  (MAKEFOURCC('Y','4','1','1'))
    230 //
    231 //        static DWORD fourCC[] =  { FOURCC_YUV422, FOURCC_YUV411 };  // The FourCC's we support
    232 
    233227        *pdwNumFourCCCodes = pDev->vhwaInfo.numFourCC;
    234228
     
    20092003static DWORD rops[DD_ROP_SPACE] = { 0 };
    20102004
    2011 #if 1
    20122005static bool
    20132006getDDHALInfo(
     
    20382031    }
    20392032
    2040 //                                | DDCAPS_READSCANLINE
    2041 
    2042 
    20432033    pHALInfo->ddCaps.ddsCaps.dwCaps |= vboxVHWAToDDSCAPS(pDev->vhwaInfo.surfaceCaps);
    20442034
    2045 //disabled
    2046 //    pHALInfo->ddCaps.dwCaps |= DDCAPS_3D           |
    2047 //                               DDCAPS_BLTDEPTHFILL;
    2048 //
    2049 //    pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_3DDEVICE |
    2050 //                                       DDSCAPS_ZBUFFER |
    2051 //                                       DDSCAPS_ALPHA;
    20522035    pHALInfo->ddCaps.dwCaps2 = vboxVHWAToDDCAPS2(pDev->vhwaInfo.caps2);
    20532036
    2054 
    2055 
    2056 //#if DX7_TEXMANAGEMENT
    2057     // We need to set this bit up in order to be able to do
    2058     // out own texture management
    2059 //    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANMANAGETEXTURE;
    2060 //#if DX8_DDI
    2061 //    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANMANAGERESOURCE;
    2062 //#endif
    2063 //#endif
    2064 
    2065 //#if DX8_DDI
    2066     // We need to flag we can run in windowed mode, otherwise we
    2067     // might get restricted by apps to run in fullscreen only
    2068 //    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANRENDERWINDOWED;
    2069 
    2070     // Also permit surfaces wider than the display buffer.
    2071 //    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_WIDESURFACES;
    2072 //#endif
    2073 
    2074 //#if DX8_DDI
    2075     // We need to flag we support dynamic textures. That is , apps can
    2076         // lock with high frequency video memory textures without paying a
    2077         // penalty for it. Since on this sample driver we only support
    2078         // linear memory formats for textures we don't need to do anything
    2079         // else for this support. Otherwise we would have to keep two surfaces
    2080         // for textures created with the DDSCAPS2_HINTDYNAMIC hint in order
    2081         // to efficiently do the linear<->swizzled transformation or keep the
    2082         // texture permanantly in an unswizzled state.
    2083 //        pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_DYNAMICTEXTURES;
    2084     #if DX9_DDI
    2085         // Notice that dynamic textures MUST be supported in order to instantiate a DX9 device
    2086     #endif // DX9_DDI
    2087 //#endif
    2088 
    2089 //    pHALInfo->ddCaps.dwFXCaps = 0;
    2090 
    2091     // P3RX can do:
    2092     // 1. Stretching/Shrinking
    2093     // 2. YUV->RGB conversion
    2094     // 3. Mirroring in X and Y
    2095     // 4. ColorKeying from a source color and a source color space
    20962037    if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT)
    20972038            && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLTSTRETCH))
     
    21002041        //TODO: filter them out
    21012042        pHALInfo->ddCaps.dwFXCaps |= DDFXCAPS_BLTSTRETCHY  |
    2102                                     DDFXCAPS_BLTSTRETCHX  |
    2103                                     DDFXCAPS_BLTSTRETCHYN |
    2104                                     DDFXCAPS_BLTSTRETCHXN |
    2105                                     DDFXCAPS_BLTSHRINKY   |
    2106                                     DDFXCAPS_BLTSHRINKX   |
    2107                                     DDFXCAPS_BLTSHRINKYN  |
    2108                                     DDFXCAPS_BLTSHRINKXN;
     2043                                    DDFXCAPS_BLTSTRETCHX   |
     2044                                    DDFXCAPS_BLTSTRETCHYN  |
     2045                                    DDFXCAPS_BLTSTRETCHXN  |
     2046                                    DDFXCAPS_BLTSHRINKY    |
     2047                                    DDFXCAPS_BLTSHRINKX    |
     2048                                    DDFXCAPS_BLTSHRINKYN   |
     2049                                    DDFXCAPS_BLTSHRINKXN   |
     2050                                    DDFXCAPS_BLTARITHSTRETCHY
     2051                                    ;
    21092052
    21102053        //        DDFXCAPS_BLTARITHSTRETCHY
     
    21212064        //TODO: filter them out
    21222065        pHALInfo->ddCaps.dwFXCaps |= DDFXCAPS_OVERLAYSTRETCHY  |
    2123                                     DDFXCAPS_OVERLAYSTRETCHX  |
    2124                                     DDFXCAPS_OVERLAYSTRETCHYN |
    2125                                     DDFXCAPS_OVERLAYSTRETCHXN |
    2126                                     DDFXCAPS_OVERLAYSHRINKY   |
    2127                                     DDFXCAPS_OVERLAYSHRINKX   |
    2128                                     DDFXCAPS_OVERLAYSHRINKYN  |
    2129                                     DDFXCAPS_OVERLAYSHRINKXN;
     2066                                    DDFXCAPS_OVERLAYSTRETCHX   |
     2067                                    DDFXCAPS_OVERLAYSTRETCHYN  |
     2068                                    DDFXCAPS_OVERLAYSTRETCHXN  |
     2069                                    DDFXCAPS_OVERLAYSHRINKY    |
     2070                                    DDFXCAPS_OVERLAYSHRINKX    |
     2071                                    DDFXCAPS_OVERLAYSHRINKYN   |
     2072                                    DDFXCAPS_OVERLAYSHRINKXN   |
     2073                                    DDFXCAPS_OVERLAYARITHSTRETCHY;
    21302074
    21312075        //        DDFXCAPS_OVERLAYARITHSTRETCHY
     
    21362080    }
    21372081
    2138 //    if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT)
    2139 //            && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLTFOURCC))
    2140 //    {
    2141 //        pHALInfo->ddCaps.dwCaps |= DDCAPS_BLTFOURCC;
    2142 //
    2143 //        // Enable copy blts between Four CC formats for DShow acceleration
    2144 //        pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_COPYFOURCC;
    2145 //    }
    2146 
    2147 //    if((VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_BLT) || VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_OVERLAY))
    2148 //            && VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_COLORKEY))
    2149     {
    2150         pHALInfo->ddCaps.dwCKeyCaps = vboxVHWAToDDCKEYCAPS(pDev->vhwaInfo.colorKeyCaps);
    2151     }
    2152 
    2153 //    pHALInfo->ddCaps.dwSVBCaps = DDCAPS_BLT;
    2154 
    2155 //    // We can do a texture from sysmem to video mem.
    2156 //    pHALInfo->ddCaps.dwSVBCKeyCaps |= DDCKEYCAPS_DESTBLT         |
    2157 //                                     DDCKEYCAPS_DESTBLTCLRSPACE;
     2082    pHALInfo->ddCaps.dwCKeyCaps = vboxVHWAToDDCKEYCAPS(pDev->vhwaInfo.colorKeyCaps);
     2083
    21582084    pHALInfo->ddCaps.dwSVBFXCaps = 0;
    21592085
    2160 //    // Fill in the sysmem->vidmem rops (only can copy);
    2161 //    for( i=0;i<DD_ROP_SPACE;i++ )
    2162 //    {
    2163 //        pHALInfo->ddCaps.dwSVBRops[i] = rops[i];
    2164 //    }
    2165 
    2166 
    2167 
    2168 //disabled
    2169 //    pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_TEXTURE;
    2170 
    2171 //#if DX7_STEREO
    2172 //    // Report the stereo capability back to runtime
    2173 //    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_STEREO;
    2174 //    pHALInfo->ddCaps.dwSVCaps = DDSVCAPS_STEREOSEQUENTIAL;
    2175 //#endif
    2176 
    2177     // Z Buffer is only 16 Bits
    2178 //    pHALInfo->ddCaps.dwZBufferBitDepths = DDBD_16;
    2179 //    pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_MIPMAP;
    2180 
    2181     {
    2182 //#ifdef SUPPORT_VIDEOPORT
    2183 //        // We support 1 video port.  Must set CurrVideoPorts to 0
    2184 //        // We can't do interleaved bobbing yet - maybe in the future.
    2185 //        pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_VIDEOPORT            |
    2186 //                                    DDCAPS2_CANBOBNONINTERLEAVED;
    2187 //
    2188 //        pHALInfo->ddCaps.dwMaxVideoPorts = 1;
    2189 //        pHALInfo->ddCaps.dwCurrVideoPorts = 0;
    2190 //
    2191 //
    2192 //#endif // SUPPORT_VIDEOPORT
    2193 
    2194         if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_OVERLAY)) /* no overlay support for now */
    2195         {
    2196             // Overlay is free to use.
    2197             pHALInfo->ddCaps.dwMaxVisibleOverlays = pDev->vhwaInfo.numOverlays;
    2198             pHALInfo->ddCaps.dwCurrVisibleOverlays = 0;
    2199 
    2200             // Indicates that Perm3 has no stretch ratio limitation
    2201             pHALInfo->ddCaps.dwMinOverlayStretch = 1;
    2202             pHALInfo->ddCaps.dwMaxOverlayStretch = 32000;
    2203         }
    2204     }
    2205 
    2206 //#ifdef W95_DDRAW
    2207 //#ifdef USE_DD_CONTROL_COLOR
    2208 //    // Enable colour control asc brightness, contrast, gamma.
    2209 //    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_COLORCONTROLPRIMARY;
    2210 //#endif
    2211 //#endif
    2212 
     2086
     2087    if(VBOXVHWA_CAP(pDev, VBOXVHWA_CAPS_OVERLAY)) /* no overlay support for now */
     2088    {
     2089        // Overlay is free to use.
     2090        pHALInfo->ddCaps.dwMaxVisibleOverlays = pDev->vhwaInfo.numOverlays;
     2091        pHALInfo->ddCaps.dwCurrVisibleOverlays = 0;
     2092
     2093        // Indicates that Perm3 has no stretch ratio limitation
     2094        pHALInfo->ddCaps.dwMinOverlayStretch = 1;
     2095        pHALInfo->ddCaps.dwMaxOverlayStretch = 32000;
     2096    }
    22132097
    22142098    // Won't do Video-Sys mem Blits.
     
    22302114    }
    22312115
    2232     //
    2233     // bit depths supported for alpha and Z
    2234     //
    2235 //    pHALInfo->ddCaps.dwAlphaBltConstBitDepths = DDBD_2 |
    2236 //                                                DDBD_4 |
    2237 //                                                DDBD_8;
    2238 //
    2239 //    pHALInfo->ddCaps.dwAlphaBltPixelBitDepths = DDBD_1 |
    2240 //                                                DDBD_8;
    2241 //    pHALInfo->ddCaps.dwAlphaBltSurfaceBitDepths = DDBD_1 |
    2242 //                                                  DDBD_2 |
    2243 //                                                  DDBD_4 |
    2244 //                                                  DDBD_8;
    2245 
    2246 //disabled
    2247 //    // No alpha blending for overlays, so I'm not sure what these should be.
    2248 //    // Because we support 32bpp overlays, it's just that you can't use the
    2249 //    // alpha bits for blending. Pass.
    2250 //    pHALInfo->ddCaps.dwAlphaBltConstBitDepths = DDBD_2 |
    2251 //                                                DDBD_4 |
    2252 //                                                DDBD_8;
    2253 //
    2254 //    pHALInfo->ddCaps.dwAlphaBltPixelBitDepths = DDBD_1 |
    2255 //                                                DDBD_8;
    2256 //
    2257 //    pHALInfo->ddCaps.dwAlphaBltSurfaceBitDepths = DDBD_1 |
    2258 //                                                  DDBD_2 |
    2259 //                                                  DDBD_4 |
    2260 //                                                  DDBD_8;
    2261 
    2262 
    2263 //Reenable:    // For DX5 and beyond we support this new informational callback.
    2264 //    pHALInfo->GetDriverInfo = DdGetDriverInfo;
    2265 //    pHALInfo->dwFlags |= DDHALINFO_GETDRIVERINFOSET;
    2266 //
    2267 //#if DX8_DDI
    2268 //    // Flag our support for a new class of GUIDs that may come through
    2269 //    // GetDriverInfo for DX8 drivers. (This support will be compulsory)
    2270 //    pHALInfo->dwFlags |= DDHALINFO_GETDRIVERINFO2;
    2271 //#endif DX8_DDI
    2272 
    22732116    return true;
    22742117} // getDDHALInfo
    2275 #else
    2276 bool
    2277 getDDHALInfo2(
    2278     PPDEV pDev,
    2279     DD_HALINFO* pHALInfo)
    2280 {
    2281     int i;
    2282 
    2283 #if 0
    2284     /* TODO: only enable features supported by the host backend & host hw
    2285      * for now this just combines all caps we might use */
    2286 
    2287     // Setup the ROPS we do.
    2288     setupRops( ropListNT,
    2289                  rops,
    2290                  sizeof(ropListNT)/sizeof(ropListNT[0]));
    2291 
    2292     // The most basic DirectDraw functionality
    2293     pHALInfo->ddCaps.dwCaps |=   DDCAPS_BLT
    2294                                  | DDCAPS_BLTQUEUE
    2295                                  | DDCAPS_BLTCOLORFILL
    2296 //                                | DDCAPS_READSCANLINE
    2297                                 ;
    2298 #endif
    2299     pHALInfo->ddCaps.ddsCaps.dwCaps |=   DDSCAPS_OFFSCREENPLAIN
    2300                                          | DDSCAPS_PRIMARYSURFACE
    2301                                          | DDSCAPS_FLIP;
    2302 #if 0
    2303     pHALInfo->ddCaps.dwCaps |= DDCAPS_3D           |
    2304                                DDCAPS_BLTDEPTHFILL;
    2305 
    2306     pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_3DDEVICE |
    2307                                        DDSCAPS_ZBUFFER |
    2308                                        DDSCAPS_ALPHA;
    2309 #endif
    2310     pHALInfo->ddCaps.dwCaps2 = 0;
    2311 
    2312 //#if DX7_TEXMANAGEMENT
    2313     // We need to set this bit up in order to be able to do
    2314     // out own texture management
    2315 //    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANMANAGETEXTURE;
    2316 //#if DX8_DDI
    2317 //    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANMANAGERESOURCE;
    2318 //#endif
    2319 //#endif
    2320 
    2321 //#if DX8_DDI
    2322     // We need to flag we can run in windowed mode, otherwise we
    2323     // might get restricted by apps to run in fullscreen only
    2324     pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_CANRENDERWINDOWED;
    2325 //#endif
    2326 
    2327 //#if DX8_DDI
    2328     // We need to flag we support dynamic textures. That is , apps can
    2329         // lock with high frequency video memory textures without paying a
    2330         // penalty for it. Since on this sample driver we only support
    2331         // linear memory formats for textures we don't need to do anything
    2332         // else for this support. Otherwise we would have to keep two surfaces
    2333         // for textures created with the DDSCAPS2_HINTDYNAMIC hint in order
    2334         // to efficiently do the linear<->swizzled transformation or keep the
    2335         // texture permanantly in an unswizzled state.
    2336 //        pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_DYNAMICTEXTURES;
    2337     #if DX9_DDI
    2338         // Notice that dynamic textures MUST be supported in order to instantiate a DX9 device
    2339     #endif // DX9_DDI
    2340 //#endif
    2341 
    2342 //    pHALInfo->ddCaps.dwFXCaps = 0;
    2343 
    2344     // P3RX can do:
    2345     // 1. Stretching/Shrinking
    2346     // 2. YUV->RGB conversion
    2347     // 3. Mirroring in X and Y
    2348     // 4. ColorKeying from a source color and a source color space
    2349     pHALInfo->ddCaps.dwCaps |=
    2350 #if 0
    2351         DDCAPS_BLTSTRETCH
    2352                                | DDCAPS_BLTFOURCC
    2353                                |
    2354 #endif
    2355                                DDCAPS_COLORKEY
    2356 //                               | DDCAPS_CANBLTSYSMEM
    2357                                ;
    2358 #if 0
    2359     // Special effects caps
    2360     pHALInfo->ddCaps.dwFXCaps |= DDFXCAPS_BLTSTRETCHY  |
    2361                                 DDFXCAPS_BLTSTRETCHX  |
    2362                                 DDFXCAPS_BLTSTRETCHYN |
    2363                                 DDFXCAPS_BLTSTRETCHXN |
    2364                                 DDFXCAPS_BLTSHRINKY   |
    2365                                 DDFXCAPS_BLTSHRINKX   |
    2366                                 DDFXCAPS_BLTSHRINKYN  |
    2367                                 DDFXCAPS_BLTSHRINKXN;
    2368 
    2369     // ColorKey caps
    2370     pHALInfo->ddCaps.dwCKeyCaps |= DDCKEYCAPS_SRCBLT         |
    2371                                   DDCKEYCAPS_SRCBLTCLRSPACE |
    2372                                   DDCKEYCAPS_DESTBLT        |
    2373                                   DDCKEYCAPS_DESTBLTCLRSPACE;
    2374 #endif
    2375 //    pHALInfo->ddCaps.dwSVBCaps = DDCAPS_BLT;
    2376 
    2377 //    // We can do a texture from sysmem to video mem.
    2378 //    pHALInfo->ddCaps.dwSVBCKeyCaps |= DDCKEYCAPS_DESTBLT         |
    2379 //                                     DDCKEYCAPS_DESTBLTCLRSPACE;
    2380     pHALInfo->ddCaps.dwSVBFXCaps = 0;
    2381 
    2382 //    // Fill in the sysmem->vidmem rops (only can copy);
    2383 //    for( i=0;i<DD_ROP_SPACE;i++ )
    2384 //    {
    2385 //        pHALInfo->ddCaps.dwSVBRops[i] = rops[i];
    2386 //    }
    2387 #if 0
    2388     //mirroring with blitting
    2389     pHALInfo->ddCaps.dwFXCaps |= DDFXCAPS_BLTMIRRORUPDOWN  |
    2390                                 DDFXCAPS_BLTMIRRORLEFTRIGHT;
    2391 
    2392     pHALInfo->ddCaps.dwCKeyCaps |=  DDCKEYCAPS_SRCBLTCLRSPACEYUV;
    2393 
    2394     pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_TEXTURE;
    2395 #endif
    2396 //#if DX7_STEREO
    2397 //    // Report the stereo capability back to runtime
    2398 //    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_STEREO;
    2399 //    pHALInfo->ddCaps.dwSVCaps = DDSVCAPS_STEREOSEQUENTIAL;
    2400 //#endif
    2401 
    2402     // Z Buffer is only 16 Bits
    2403 //    pHALInfo->ddCaps.dwZBufferBitDepths = DDBD_16;
    2404 //    pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_MIPMAP;
    2405 
    2406         pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_LOCALVIDMEM;
    2407 
    2408     {
    2409 //#ifdef SUPPORT_VIDEOPORT
    2410 //        // We support 1 video port.  Must set CurrVideoPorts to 0
    2411 //        // We can't do interleaved bobbing yet - maybe in the future.
    2412 //        pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_VIDEOPORT            |
    2413 //                                    DDCAPS2_CANBOBNONINTERLEAVED;
    2414 //
    2415 //        pHALInfo->ddCaps.dwMaxVideoPorts = 1;
    2416 //        pHALInfo->ddCaps.dwCurrVideoPorts = 0;
    2417 //
    2418 //
    2419 //#endif // SUPPORT_VIDEOPORT
    2420 
    2421 
    2422         {
    2423             // Overlay is free to use.
    2424             pHALInfo->ddCaps.dwMaxVisibleOverlays = 1;
    2425             pHALInfo->ddCaps.dwCurrVisibleOverlays = 0;
    2426 
    2427             pHALInfo->ddCaps.dwCaps |=  DDCAPS_OVERLAY          |
    2428                                         DDCAPS_OVERLAYFOURCC    |
    2429                                         DDCAPS_OVERLAYSTRETCH   |
    2430                                         DDCAPS_COLORKEYHWASSIST |
    2431                                         DDCAPS_OVERLAYCANTCLIP;
    2432 
    2433             pHALInfo->ddCaps.dwCKeyCaps |= DDCKEYCAPS_SRCOVERLAY           |
    2434                                            DDCKEYCAPS_SRCOVERLAYONEACTIVE  |
    2435                                            DDCKEYCAPS_SRCOVERLAYYUV        |
    2436                                            DDCKEYCAPS_DESTOVERLAY          |
    2437                                            DDCKEYCAPS_DESTOVERLAYONEACTIVE |
    2438                                            DDCKEYCAPS_DESTOVERLAYYUV;
    2439 
    2440             pHALInfo->ddCaps.ddsCaps.dwCaps |= DDSCAPS_OVERLAY;
    2441 
    2442             pHALInfo->ddCaps.dwFXCaps |= DDFXCAPS_OVERLAYSHRINKX   |
    2443                                          DDFXCAPS_OVERLAYSHRINKXN  |
    2444                                          DDFXCAPS_OVERLAYSHRINKY   |
    2445                                          DDFXCAPS_OVERLAYSHRINKYN  |
    2446                                          DDFXCAPS_OVERLAYSTRETCHX  |
    2447                                          DDFXCAPS_OVERLAYSTRETCHXN |
    2448                                          DDFXCAPS_OVERLAYSTRETCHY  |
    2449                                          DDFXCAPS_OVERLAYSTRETCHYN;
    2450 
    2451             // Indicates that Perm3 has no stretch ratio limitation
    2452             pHALInfo->ddCaps.dwMinOverlayStretch = 1;
    2453             pHALInfo->ddCaps.dwMaxOverlayStretch = 32000;
    2454         }
    2455     }
    2456 
    2457 //#ifdef W95_DDRAW
    2458 //#ifdef USE_DD_CONTROL_COLOR
    2459 //    // Enable colour control asc brightness, contrast, gamma.
    2460 //    pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_COLORCONTROLPRIMARY;
    2461 //#endif
    2462 //#endif
    2463 
    2464     // Also permit surfaces wider than the display buffer.
    2465     pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_WIDESURFACES;
    2466 #if 0
    2467     // Enable copy blts betweemn Four CC formats for DShow acceleration
    2468     pHALInfo->ddCaps.dwCaps2 |= DDCAPS2_COPYFOURCC;
    2469 #endif
    2470     // Won't do Video-Sys mem Blits.
    2471     pHALInfo->ddCaps.dwVSBCaps = 0;
    2472     pHALInfo->ddCaps.dwVSBCKeyCaps = 0;
    2473     pHALInfo->ddCaps.dwVSBFXCaps = 0;
    2474     for( i=0;i<DD_ROP_SPACE;i++ )
    2475     {
    2476         pHALInfo->ddCaps.dwVSBRops[i] = 0;
    2477     }
    2478 
    2479     // Won't do Sys-Sys mem Blits
    2480     pHALInfo->ddCaps.dwSSBCaps = 0;
    2481     pHALInfo->ddCaps.dwSSBCKeyCaps = 0;
    2482     pHALInfo->ddCaps.dwSSBFXCaps = 0;
    2483     for( i=0;i<DD_ROP_SPACE;i++ )
    2484     {
    2485         pHALInfo->ddCaps.dwSSBRops[i] = 0;
    2486     }
    2487 
    2488     //
    2489     // bit depths supported for alpha and Z
    2490     //
    2491 //    pHALInfo->ddCaps.dwAlphaBltConstBitDepths = DDBD_2 |
    2492 //                                                DDBD_4 |
    2493 //                                                DDBD_8;
    2494 //
    2495 //    pHALInfo->ddCaps.dwAlphaBltPixelBitDepths = DDBD_1 |
    2496 //                                                DDBD_8;
    2497 //    pHALInfo->ddCaps.dwAlphaBltSurfaceBitDepths = DDBD_1 |
    2498 //                                                  DDBD_2 |
    2499 //                                                  DDBD_4 |
    2500 //                                                  DDBD_8;
    2501 #if 0
    2502     // No alpha blending for overlays, so I'm not sure what these should be.
    2503     // Because we support 32bpp overlays, it's just that you can't use the
    2504     // alpha bits for blending. Pass.
    2505     pHALInfo->ddCaps.dwAlphaBltConstBitDepths = DDBD_2 |
    2506                                                 DDBD_4 |
    2507                                                 DDBD_8;
    2508 
    2509     pHALInfo->ddCaps.dwAlphaBltPixelBitDepths = DDBD_1 |
    2510                                                 DDBD_8;
    2511 
    2512     pHALInfo->ddCaps.dwAlphaBltSurfaceBitDepths = DDBD_1 |
    2513                                                   DDBD_2 |
    2514                                                   DDBD_4 |
    2515                                                   DDBD_8;
    2516 
    2517     //
    2518     // ROPS supported
    2519     //
    2520     for( i=0;i<DD_ROP_SPACE;i++ )
    2521     {
    2522         pHALInfo->ddCaps.dwRops[i] = rops[i];
    2523     }
    2524 #endif
    2525 //Reenable:    // For DX5 and beyond we support this new informational callback.
    2526 //    pHALInfo->GetDriverInfo = DdGetDriverInfo;
    2527 //    pHALInfo->dwFlags |= DDHALINFO_GETDRIVERINFOSET;
    2528 //
    2529 //#if DX8_DDI
    2530 //    // Flag our support for a new class of GUIDs that may come through
    2531 //    // GetDriverInfo for DX8 drivers. (This support will be compulsory)
    2532 //    pHALInfo->dwFlags |= DDHALINFO_GETDRIVERINFO2;
    2533 //#endif DX8_DDI
    2534 
    2535     return true;
    2536 } // getDDHALInfo
    2537 
    2538 #endif
    25392118
    25402119static DECLCALLBACK(void) vboxVHWASurfBltCompletion(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext)
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