VirtualBox

Ignore:
Timestamp:
Nov 13, 2009 4:47:47 PM (15 years ago)
Author:
vboxsync
Message:

2d accel:

  1. performmance: avoid separate drawing of primary surface texture
  2. profiling: fps counter
  3. saved state restore fix
  4. make vhwa command constants values match ddraw contstants
  5. guest driver: set proper ddRVal in DdUnlock
  6. guest driver: return proper value in DdDestroySurface
Location:
trunk/src/VBox/Additions/WINNT/Graphics/Display
Files:
3 edited

Legend:

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

    r24044 r24646  
    205205            pVm->fpStart        = pDev->layout.offDDRAWHeap;
    206206            pVm->fpEnd          = pDev->layout.offDDRAWHeap + pDev->layout.cbDDRAWHeap - 1; /* inclusive */
    207 #ifndef VBOX_WITH_VIDEOHWACCEL
    208             pVm->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
    209 #endif
     207#ifdef VBOX_WITH_VIDEOHWACCEL
     208            if(pDev->vhwaInfo.bVHWAEnabled)
     209            {
     210                pVm->ddsCaps.dwCaps = 0;
     211                pVm->ddsCapsAlt.dwCaps = 0;
     212            }
     213            else
     214#endif
     215            {
     216                pVm->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
     217            }
    210218            DISPDBG((0, "fpStart %x fpEnd %x\n", pVm->fpStart, pVm->fpEnd));
    211219
     
    955963            DISPDBG((0, "DdMapMemory: Exit GEN, DDHAL_DRIVER_HANDLED\n"));
    956964
     965            AssertBreakpoint();
     966
    957967            return(DDHAL_DRIVER_HANDLED);
    958968        }
     
    977987        {
    978988            DISPDBG((0, "Failed IOCTL_VIDEO_UNSHARE_MEMORY\n"));
     989            AssertBreakpoint();
    979990        }
    980991    }
     
    11881199        if(lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_VISIBLE
    11891200                || lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE
     1201//                || !!(lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_FRONTBUFFER)
    11901202                || (    !!(lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_OVERLAY)
    11911203                     && pDesc->bVisible
     
    12171229            }
    12181230        }
     1231        else
     1232        {
     1233            lpUnlock->ddRVal = DD_OK;
     1234        }
    12191235#else
    12201236        lpUnlock->ddRVal = DD_OK;
     
    13261342            vboxVHWASurfDescFree(pDesc);
    13271343
     1344            lpSurfaceGlobal->dwReserved1 = NULL;
     1345
    13281346            lpDestroySurface->ddRVal = DD_OK;
    13291347        }
     
    13351353    else
    13361354#endif
    1337         lpDestroySurface->ddRVal = DD_OK;
    1338     return DDHAL_DRIVER_HANDLED;
     1355    lpDestroySurface->ddRVal = DD_OK;
     1356
     1357    /* we're not managing video memory currently, so return DDHAL_DRIVER_NOTHANDLED */
     1358    return DDHAL_DRIVER_NOTHANDLED;
    13391359}
    13401360
     
    17281748    if(!pSrcDesc->bVisible)
    17291749    {
     1750#ifdef DEBUG_misha
     1751        AssertBreakpoint();
     1752#endif
    17301753        lpSetOverlayPosition->ddRVal = DDERR_GENERIC;
    17311754        return DDHAL_DRIVER_HANDLED;
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.h

    r19515 r24646  
    4343DWORD APIENTRY DdAddAttachedSurface(PDD_ADDATTACHEDSURFACEDATA  lpAddAttachedSurface);
    4444DWORD APIENTRY DdBlt(PDD_BLTDATA  lpBlt);
    45 DWORD APIENTRY DdDestroySurface(PDD_DESTROYSURFACEDATA  lpDestroySurface);
    4645DWORD APIENTRY DdFlip(PDD_FLIPDATA  lpFlip);
    4746DWORD APIENTRY DdGetBltStatus(PDD_GETBLTSTATUSDATA  lpGetBltStatus);
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/vhwa.c

    r22652 r24646  
    4444#define VBOX_DD_DUMMY_PAIR(_v) {VBOX_DD(_v), 0}
    4545
    46 
    47 static const uint32_t g_SupportedCapList[][2] = {
    48         VBOX_DD_VHWA_PAIR(CAPS_BLT),
    49         VBOX_DD_VHWA_PAIR(CAPS_BLTQUEUE),
    50         VBOX_DD_VHWA_PAIR(CAPS_BLTCOLORFILL),
    51         VBOX_DD_VHWA_PAIR(CAPS_BLTFOURCC),
    52         VBOX_DD_VHWA_PAIR(CAPS_BLTSTRETCH),
    53         VBOX_DD_VHWA_PAIR(CAPS_OVERLAY),
    54         VBOX_DD_VHWA_PAIR(CAPS_OVERLAYCANTCLIP),
    55         VBOX_DD_VHWA_PAIR(CAPS_OVERLAYFOURCC),
    56         VBOX_DD_VHWA_PAIR(CAPS_OVERLAYSTRETCH),
    57         VBOX_DD_VHWA_PAIR(CAPS_COLORKEY),
    58         VBOX_DD_VHWA_PAIR(CAPS_COLORKEYHWASSIST)
    59 };
    60 
    61 static const uint32_t g_SupportedCap2List[][2] = {
    62         VBOX_DD_VHWA_PAIR(CAPS2_COPYFOURCC),
    63 };
    64 
    65 
    66 static const uint32_t g_SupportedSCapList[][2] = {
    67         VBOX_DD_VHWA_PAIR(SCAPS_FLIP),
    68         VBOX_DD_VHWA_PAIR(SCAPS_PRIMARYSURFACE),
    69         VBOX_DD_VHWA_PAIR(SCAPS_OVERLAY),
    70         VBOX_DD_VHWA_PAIR(SCAPS_VISIBLE),
    71         VBOX_DD_VHWA_PAIR(SCAPS_VIDEOMEMORY),
    72         VBOX_DD_VHWA_PAIR(SCAPS_OFFSCREENPLAIN),
    73         VBOX_DD_VHWA_PAIR(SCAPS_LOCALVIDMEM),
    74         VBOX_DD_VHWA_PAIR(SCAPS_COMPLEX)
    75 };
    76 
    77 static const uint32_t gSupportedSDList[][2] = {
    78         VBOX_DD_VHWA_PAIR(SD_BACKBUFFERCOUNT),
    79         VBOX_DD_VHWA_PAIR(SD_CAPS),
    80         VBOX_DD_VHWA_PAIR(SD_CKDESTBLT),
    81         VBOX_DD_VHWA_PAIR(SD_CKDESTOVERLAY),
    82         VBOX_DD_VHWA_PAIR(SD_CKSRCBLT),
    83         VBOX_DD_VHWA_PAIR(SD_CKSRCOVERLAY),
    84         VBOX_DD_VHWA_PAIR(SD_HEIGHT),
    85         VBOX_DD_VHWA_PAIR(SD_PITCH),
    86         VBOX_DD_VHWA_PAIR(SD_PIXELFORMAT),
    87         VBOX_DD_VHWA_PAIR(SD_WIDTH),
    88 };
    89 
    90 static const uint32_t g_SupportedPFList[][2] = {
    91         VBOX_DD_VHWA_PAIR(PF_RGB),
    92         VBOX_DD_VHWA_PAIR(PF_RGBTOYUV),
    93         VBOX_DD_VHWA_PAIR(PF_YUV),
    94         VBOX_DD_VHWA_PAIR(PF_FOURCC)
    95 };
    96 
    97 static const uint32_t g_SupportedCKeyCapList[][2] = {
    98         VBOX_DD_VHWA_PAIR(CKEYCAPS_DESTBLT),
    99         VBOX_DD_VHWA_PAIR(CKEYCAPS_DESTBLTCLRSPACE),
    100         VBOX_DD_VHWA_PAIR(CKEYCAPS_DESTBLTCLRSPACEYUV),
    101         VBOX_DD_VHWA_PAIR(CKEYCAPS_DESTBLTYUV),
    102         VBOX_DD_VHWA_PAIR(CKEYCAPS_DESTOVERLAY),
    103         VBOX_DD_VHWA_PAIR(CKEYCAPS_DESTOVERLAYCLRSPACE),
    104         VBOX_DD_VHWA_PAIR(CKEYCAPS_DESTOVERLAYCLRSPACEYUV),
    105         VBOX_DD_VHWA_PAIR(CKEYCAPS_DESTOVERLAYONEACTIVE),
    106         VBOX_DD_VHWA_PAIR(CKEYCAPS_DESTOVERLAYYUV),
    107         VBOX_DD_VHWA_PAIR(CKEYCAPS_NOCOSTOVERLAY),
    108         VBOX_DD_VHWA_PAIR(CKEYCAPS_SRCBLT),
    109         VBOX_DD_VHWA_PAIR(CKEYCAPS_SRCBLTCLRSPACE),
    110         VBOX_DD_VHWA_PAIR(CKEYCAPS_SRCBLTCLRSPACEYUV),
    111         VBOX_DD_VHWA_PAIR(CKEYCAPS_SRCBLTYUV),
    112         VBOX_DD_VHWA_PAIR(CKEYCAPS_SRCOVERLAY),
    113         VBOX_DD_VHWA_PAIR(CKEYCAPS_SRCOVERLAYCLRSPACE),
    114         VBOX_DD_VHWA_PAIR(CKEYCAPS_SRCOVERLAYCLRSPACEYUV),
    115         VBOX_DD_VHWA_PAIR(CKEYCAPS_SRCOVERLAYONEACTIVE),
    116         VBOX_DD_VHWA_PAIR(CKEYCAPS_SRCOVERLAYYUV)
    117 };
    118 
    119 //static const uint32_t g_SupportedOverList[][2] = {
    120 //        VBOX_DD_VHWA_PAIR(OVER_DDFX),
    121 //        VBOX_DD_VHWA_PAIR(OVER_HIDE),
    122 //        VBOX_DD_VHWA_PAIR(OVER_KEYDEST),
    123 //        VBOX_DD_VHWA_PAIR(OVER_KEYDESTOVERRIDE),
    124 //        VBOX_DD_VHWA_PAIR(OVER_KEYSRC),
    125 //        VBOX_DD_VHWA_PAIR(OVER_KEYSRCOVERRIDE),
    126 //        VBOX_DD_VHWA_PAIR(OVER_SHOW)
    127 //};
    128 //
    129 //static const uint32_t g_SupportedCKeyList[][2] = {
    130 //        VBOX_DD_VHWA_PAIR(CKEY_COLORSPACE),
    131 //        VBOX_DD_VHWA_PAIR(CKEY_DESTBLT),
    132 //        VBOX_DD_VHWA_PAIR(CKEY_DESTOVERLAY),
    133 //        VBOX_DD_VHWA_PAIR(CKEY_SRCBLTE),
    134 //        VBOX_DD_VHWA_PAIR(CKEY_SRCOVERLAY)
    135 //};
    136 
    137 static uint32_t g_SupportedVHWACaps;
    138 static uint32_t g_SupportedVHWASCaps;
    139 static uint32_t g_SupportedVHWAPFs;
    140 static uint32_t g_SupportedVHWASDs;
    141 static uint32_t g_SupportedDDCaps;
    142 static uint32_t g_SupportedDDSCaps;
    143 static uint32_t g_SupportedDDPFs;
    144 static uint32_t g_SupportedDDSDs;
    145 
    146 static uint32_t g_SupportedVHWACKeyCaps;
    147 static uint32_t g_SupportedDDCKeyCaps;
    148 
    149 static uint32_t g_SupportedOVERs;
    150 static uint32_t g_SupportedCKEYs;
    151 
     46#define VBOXVHWA_SUPPORTED_CAPS ( \
     47        VBOXVHWA_CAPS_BLT \
     48        | VBOXVHWA_CAPS_BLTCOLORFILL \
     49        | VBOXVHWA_CAPS_BLTFOURCC \
     50        | VBOXVHWA_CAPS_BLTSTRETCH \
     51        | VBOXVHWA_CAPS_BLTQUEUE \
     52        | VBOXVHWA_CAPS_OVERLAY \
     53        | VBOXVHWA_CAPS_OVERLAYFOURCC \
     54        | VBOXVHWA_CAPS_OVERLAYSTRETCH \
     55        | VBOXVHWA_CAPS_OVERLAYCANTCLIP \
     56        | VBOXVHWA_CAPS_COLORKEY \
     57        | VBOXVHWA_CAPS_COLORKEYHWASSIST \
     58        )
     59
     60#define VBOXVHWA_SUPPORTED_SCAPS ( \
     61        VBOXVHWA_SCAPS_BACKBUFFER \
     62        | VBOXVHWA_SCAPS_COMPLEX \
     63        | VBOXVHWA_SCAPS_FLIP \
     64        | VBOXVHWA_SCAPS_FRONTBUFFER \
     65        | VBOXVHWA_SCAPS_OFFSCREENPLAIN \
     66        | VBOXVHWA_SCAPS_OVERLAY \
     67        | VBOXVHWA_SCAPS_PRIMARYSURFACE \
     68        | VBOXVHWA_SCAPS_SYSTEMMEMORY \
     69        | VBOXVHWA_SCAPS_VIDEOMEMORY \
     70        | VBOXVHWA_SCAPS_VISIBLE \
     71        | VBOXVHWA_SCAPS_LOCALVIDMEM \
     72        )
     73
     74#define VBOXVHWA_SUPPORTED_SCAPS2 ( \
     75        VBOXVHWA_CAPS2_CANRENDERWINDOWED \
     76        | VBOXVHWA_CAPS2_WIDESURFACES \
     77        | VBOXVHWA_CAPS2_COPYFOURCC \
     78        )
     79
     80#define VBOXVHWA_SUPPORTED_PF ( \
     81        VBOXVHWA_PF_RGB \
     82        | VBOXVHWA_PF_RGBTOYUV \
     83        | VBOXVHWA_PF_YUV \
     84        | VBOXVHWA_PF_FOURCC \
     85        )
     86
     87#define VBOXVHWA_SUPPORTED_SD ( \
     88        VBOXVHWA_SD_BACKBUFFERCOUNT \
     89        | VBOXVHWA_SD_CAPS \
     90        | VBOXVHWA_SD_CKDESTBLT \
     91        | VBOXVHWA_SD_CKDESTOVERLAY \
     92        | VBOXVHWA_SD_CKSRCBLT \
     93        | VBOXVHWA_SD_CKSRCOVERLAY \
     94        | VBOXVHWA_SD_HEIGHT \
     95        | VBOXVHWA_SD_PITCH \
     96        | VBOXVHWA_SD_PIXELFORMAT \
     97        | VBOXVHWA_SD_WIDTH \
     98        )
     99
     100#define VBOXVHWA_SUPPORTED_CKEYCAPS ( \
     101        VBOXVHWA_CKEYCAPS_DESTBLT \
     102        | VBOXVHWA_CKEYCAPS_DESTBLTCLRSPACE \
     103        | VBOXVHWA_CKEYCAPS_DESTBLTCLRSPACEYUV \
     104        | VBOXVHWA_CKEYCAPS_DESTBLTYUV \
     105        | VBOXVHWA_CKEYCAPS_DESTOVERLAY \
     106        | VBOXVHWA_CKEYCAPS_DESTOVERLAYCLRSPACE \
     107        | VBOXVHWA_CKEYCAPS_DESTOVERLAYCLRSPACEYUV \
     108        | VBOXVHWA_CKEYCAPS_DESTOVERLAYONEACTIVE \
     109        | VBOXVHWA_CKEYCAPS_DESTOVERLAYYUV \
     110        | VBOXVHWA_CKEYCAPS_SRCBLT \
     111        | VBOXVHWA_CKEYCAPS_SRCBLTCLRSPACE \
     112        | VBOXVHWA_CKEYCAPS_SRCBLTCLRSPACEYUV \
     113        | VBOXVHWA_CKEYCAPS_SRCBLTYUV \
     114        | VBOXVHWA_CKEYCAPS_SRCOVERLAY \
     115        | VBOXVHWA_CKEYCAPS_SRCOVERLAYCLRSPACE \
     116        | VBOXVHWA_CKEYCAPS_SRCOVERLAYCLRSPACEYUV \
     117        | VBOXVHWA_CKEYCAPS_SRCOVERLAYONEACTIVE \
     118        | VBOXVHWA_CKEYCAPS_SRCOVERLAYYUV \
     119        | VBOXVHWA_CKEYCAPS_NOCOSTOVERLAY \
     120        )
     121
     122#define VBOXVHWA_SUPPORTED_CKEY ( \
     123        VBOXVHWA_CKEY_COLORSPACE \
     124        | VBOXVHWA_CKEY_DESTBLT \
     125        | VBOXVHWA_CKEY_DESTOVERLAY \
     126        | VBOXVHWA_CKEY_SRCBLT \
     127        | VBOXVHWA_CKEY_SRCOVERLAY \
     128        )
     129
     130#define VBOXVHWA_SUPPORTED_OVER ( \
     131        VBOXVHWA_OVER_DDFX \
     132        | VBOXVHWA_OVER_HIDE \
     133        | VBOXVHWA_OVER_KEYDEST \
     134        | VBOXVHWA_OVER_KEYDESTOVERRIDE \
     135        | VBOXVHWA_OVER_KEYSRC \
     136        | VBOXVHWA_OVER_KEYSRCOVERRIDE \
     137        | VBOXVHWA_OVER_SHOW \
     138        )
    152139
    153140void vboxVHWAInit()
    154141{
    155     int i;
    156     g_SupportedVHWACaps = 0;
    157     g_SupportedVHWASCaps = 0;
    158     g_SupportedVHWAPFs = 0;
    159     g_SupportedVHWASDs = 0;
    160     g_SupportedDDCaps = 0;
    161     g_SupportedDDSCaps = 0;
    162     g_SupportedDDPFs = 0;
    163     g_SupportedDDSDs = 0;
    164 
    165     g_SupportedVHWACKeyCaps = 0;
    166     g_SupportedDDCKeyCaps = 0;
    167 
    168     for(i = 0; i < sizeof(g_SupportedCapList)/sizeof(g_SupportedCapList[0]); i++)
    169     {
    170         g_SupportedDDCaps |= g_SupportedCapList[i][0];
    171         g_SupportedVHWACaps |= g_SupportedCapList[i][1];
    172     }
    173 
    174     for(i = 0; i < sizeof(g_SupportedSCapList)/sizeof(g_SupportedSCapList[0]); i++)
    175     {
    176         g_SupportedDDSCaps |= g_SupportedSCapList[i][0];
    177         g_SupportedVHWASCaps |= g_SupportedSCapList[i][1];
    178     }
    179 
    180     for(i = 0; i < sizeof(g_SupportedPFList)/sizeof(g_SupportedPFList[0]); i++)
    181     {
    182         g_SupportedDDPFs |= g_SupportedPFList[i][0];
    183         g_SupportedVHWAPFs |= g_SupportedPFList[i][1];
    184     }
    185 
    186     for(i = 0; i < sizeof(gSupportedSDList)/sizeof(gSupportedSDList[0]); i++)
    187     {
    188         g_SupportedDDSDs |= gSupportedSDList[i][0];
    189         g_SupportedVHWASDs |= gSupportedSDList[i][1];
    190     }
    191 
    192     for(i = 0; i < sizeof(g_SupportedCKeyCapList)/sizeof(g_SupportedCKeyCapList[0]); i++)
    193     {
    194         g_SupportedDDCKeyCaps |= g_SupportedCKeyCapList[i][0];
    195         g_SupportedVHWACKeyCaps |= g_SupportedCKeyCapList[i][1];
    196     }
    197 
    198     g_SupportedOVERs = VBOXVHWA_OVER_DDFX
    199                        | VBOXVHWA_OVER_HIDE
    200                        | VBOXVHWA_OVER_KEYDEST
    201                        | VBOXVHWA_OVER_KEYDESTOVERRIDE
    202                        | VBOXVHWA_OVER_KEYSRC
    203                        | VBOXVHWA_OVER_KEYSRCOVERRIDE
    204                        | VBOXVHWA_OVER_SHOW;
    205 
    206     g_SupportedCKEYs = VBOXVHWA_CKEY_COLORSPACE
    207                        | VBOXVHWA_CKEY_DESTBLT
    208                        | VBOXVHWA_CKEY_DESTOVERLAY
    209                        | VBOXVHWA_CKEY_SRCBLT
    210                        | VBOXVHWA_CKEY_SRCOVERLAY;
    211142}
    212143
    213144void vboxVHWATerm()
    214145{
    215 
    216146}
    217147
    218148uint32_t vboxVHWAUnsupportedDDCAPS(uint32_t caps)
    219149{
    220     return caps & (~g_SupportedDDCaps);
     150    return caps & (~VBOXVHWA_SUPPORTED_CAPS);
    221151}
    222152
    223153uint32_t vboxVHWAUnsupportedDDSCAPS(uint32_t caps)
    224154{
    225     return caps & (~g_SupportedDDSCaps);
     155    return caps & (~VBOXVHWA_SUPPORTED_SCAPS);
    226156}
    227157
    228158uint32_t vboxVHWAUnsupportedDDPFS(uint32_t caps)
    229159{
    230     return caps & (~g_SupportedDDPFs);
     160    return caps & (~VBOXVHWA_SUPPORTED_PF);
    231161}
    232162
    233163uint32_t vboxVHWAUnsupportedDSS(uint32_t caps)
    234164{
    235     return caps & (~g_SupportedDDSDs);
     165    return caps & (~VBOXVHWA_SUPPORTED_SD);
    236166}
    237167
    238168uint32_t vboxVHWAUnsupportedDDCEYCAPS(uint32_t caps)
    239169{
    240     return caps & (~g_SupportedDDCKeyCaps);
     170    return caps & (~VBOXVHWA_SUPPORTED_CKEYCAPS);
    241171}
    242172
    243173uint32_t vboxVHWASupportedDDCEYCAPS(uint32_t caps)
    244174{
    245     return caps & (g_SupportedDDCKeyCaps);
     175    return caps & (VBOXVHWA_SUPPORTED_CKEYCAPS);
    246176}
    247177
     
    249179uint32_t vboxVHWASupportedDDCAPS(uint32_t caps)
    250180{
    251     return caps & (g_SupportedDDCaps);
     181    return caps & (VBOXVHWA_SUPPORTED_CAPS);
    252182}
    253183
    254184uint32_t vboxVHWASupportedDDSCAPS(uint32_t caps)
    255185{
    256     return caps & (g_SupportedDDSCaps);
     186    return caps & (VBOXVHWA_SUPPORTED_SCAPS);
    257187}
    258188
    259189uint32_t vboxVHWASupportedDDPFS(uint32_t caps)
    260190{
    261     return caps & (g_SupportedDDPFs);
     191    return caps & (VBOXVHWA_SUPPORTED_PF);
    262192}
    263193
    264194uint32_t vboxVHWASupportedDSS(uint32_t caps)
    265195{
    266     return caps & (g_SupportedDDSDs);
     196    return caps & (VBOXVHWA_SUPPORTED_SD);
    267197}
    268198
    269199uint32_t vboxVHWASupportedOVERs(uint32_t caps)
    270200{
    271     return caps & (g_SupportedOVERs);
     201    return caps & (VBOXVHWA_SUPPORTED_OVER);
    272202}
    273203
    274204uint32_t vboxVHWAUnsupportedOVERs(uint32_t caps)
    275205{
    276     return caps & (~g_SupportedOVERs);
     206    return caps & (~VBOXVHWA_SUPPORTED_OVER);
    277207}
    278208
    279209uint32_t vboxVHWASupportedCKEYs(uint32_t caps)
    280210{
    281     return caps & (g_SupportedCKEYs);
     211    return caps & (VBOXVHWA_SUPPORTED_CKEY);
    282212}
    283213
    284214uint32_t vboxVHWAUnsupportedCKEYs(uint32_t caps)
    285215{
    286     return caps & (~g_SupportedCKEYs);
     216    return caps & (~VBOXVHWA_SUPPORTED_CKEY);
    287217}
    288218
     
    301231uint32_t vboxVHWAFromDDCAPS(uint32_t caps)
    302232{
    303     uint32_t vhwaCaps = 0;
    304     int i;
    305     for(i = 0; i < sizeof(g_SupportedCapList)/sizeof(g_SupportedCapList[0]); i++)
    306     {
    307         if(caps & g_SupportedCapList[i][0])
    308         {
    309             vhwaCaps |= g_SupportedCapList[i][1];
    310         }
    311     }
    312     return vhwaCaps;
     233    return caps;
    313234}
    314235
    315236uint32_t vboxVHWAToDDCAPS(uint32_t caps)
    316237{
    317     uint32_t vhwaCaps = 0;
    318     int i;
    319     for(i = 0; i < sizeof(g_SupportedCapList)/sizeof(g_SupportedCapList[0]); i++)
    320     {
    321         if(caps & g_SupportedCapList[i][1])
    322         {
    323             vhwaCaps |= g_SupportedCapList[i][0];
    324         }
    325     }
    326     return vhwaCaps;
     238    return caps;
    327239}
    328240
     
    339251uint32_t vboxVHWAFromDDSCAPS(uint32_t caps)
    340252{
    341     uint32_t vhwaCaps = 0;
    342     int i;
    343     for(i = 0; i < sizeof(g_SupportedSCapList)/sizeof(g_SupportedSCapList[0]); i++)
    344     {
    345         if(caps & g_SupportedSCapList[i][0])
    346         {
    347             vhwaCaps |= g_SupportedSCapList[i][1];
    348         }
    349     }
    350     return vhwaCaps;
     253    return caps;
    351254}
    352255
    353256uint32_t vboxVHWAToDDSCAPS(uint32_t caps)
    354257{
    355     uint32_t vhwaCaps = 0;
    356     int i;
    357     for(i = 0; i < sizeof(g_SupportedSCapList)/sizeof(g_SupportedSCapList[0]); i++)
    358     {
    359         if(caps & g_SupportedSCapList[i][1])
    360         {
    361             vhwaCaps |= g_SupportedSCapList[i][0];
    362         }
    363     }
    364     return vhwaCaps;
     258    return caps;
    365259}
    366260
    367261uint32_t vboxVHWAFromDDPFS(uint32_t caps)
    368262{
    369     uint32_t vhwaCaps = 0;
    370     int i;
    371     for(i = 0; i < sizeof(g_SupportedPFList)/sizeof(g_SupportedPFList[0]); i++)
    372     {
    373         if(caps & g_SupportedPFList[i][0])
    374         {
    375             vhwaCaps |= g_SupportedPFList[i][1];
    376         }
    377     }
    378     return vhwaCaps;
     263    return caps;
    379264}
    380265
    381266uint32_t vboxVHWAToDDPFS(uint32_t caps)
    382267{
    383     uint32_t vhwaCaps = 0;
    384     int i;
    385     for(i = 0; i < sizeof(g_SupportedPFList)/sizeof(g_SupportedPFList[0]); i++)
    386     {
    387         if(caps & g_SupportedPFList[i][1])
    388         {
    389             vhwaCaps |= g_SupportedPFList[i][0];
    390         }
    391     }
    392     return vhwaCaps;
     268    return caps;
    393269}
    394270
    395271uint32_t vboxVHWAFromDDCKEYCAPS(uint32_t caps)
    396272{
    397     uint32_t vhwaCaps = 0;
    398     int i;
    399     for(i = 0; i < sizeof(g_SupportedCKeyCapList)/sizeof(g_SupportedCKeyCapList[0]); i++)
    400     {
    401         if(caps & g_SupportedCKeyCapList[i][0])
    402         {
    403             vhwaCaps |= g_SupportedCKeyCapList[i][1];
    404         }
    405     }
    406     return vhwaCaps;
     273    return caps;
    407274}
    408275
    409276uint32_t vboxVHWAToDDCKEYCAPS(uint32_t caps)
    410277{
    411     uint32_t vhwaCaps = 0;
    412     int i;
    413     for(i = 0; i < sizeof(g_SupportedCKeyCapList)/sizeof(g_SupportedCKeyCapList[0]); i++)
    414     {
    415         if(caps & g_SupportedCKeyCapList[i][1])
    416         {
    417             vhwaCaps |= g_SupportedCKeyCapList[i][0];
    418         }
    419     }
    420     return vhwaCaps;
     278    return caps;
    421279}
    422280
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