Changeset 24646 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Nov 13, 2009 4:47:47 PM (15 years ago)
- 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 205 205 pVm->fpStart = pDev->layout.offDDRAWHeap; 206 206 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 } 210 218 DISPDBG((0, "fpStart %x fpEnd %x\n", pVm->fpStart, pVm->fpEnd)); 211 219 … … 955 963 DISPDBG((0, "DdMapMemory: Exit GEN, DDHAL_DRIVER_HANDLED\n")); 956 964 965 AssertBreakpoint(); 966 957 967 return(DDHAL_DRIVER_HANDLED); 958 968 } … … 977 987 { 978 988 DISPDBG((0, "Failed IOCTL_VIDEO_UNSHARE_MEMORY\n")); 989 AssertBreakpoint(); 979 990 } 980 991 } … … 1188 1199 if(lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_VISIBLE 1189 1200 || lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE 1201 // || !!(lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_FRONTBUFFER) 1190 1202 || ( !!(lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_OVERLAY) 1191 1203 && pDesc->bVisible … … 1217 1229 } 1218 1230 } 1231 else 1232 { 1233 lpUnlock->ddRVal = DD_OK; 1234 } 1219 1235 #else 1220 1236 lpUnlock->ddRVal = DD_OK; … … 1326 1342 vboxVHWASurfDescFree(pDesc); 1327 1343 1344 lpSurfaceGlobal->dwReserved1 = NULL; 1345 1328 1346 lpDestroySurface->ddRVal = DD_OK; 1329 1347 } … … 1335 1353 else 1336 1354 #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; 1339 1359 } 1340 1360 … … 1728 1748 if(!pSrcDesc->bVisible) 1729 1749 { 1750 #ifdef DEBUG_misha 1751 AssertBreakpoint(); 1752 #endif 1730 1753 lpSetOverlayPosition->ddRVal = DDERR_GENERIC; 1731 1754 return DDHAL_DRIVER_HANDLED; -
trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.h
r19515 r24646 43 43 DWORD APIENTRY DdAddAttachedSurface(PDD_ADDATTACHEDSURFACEDATA lpAddAttachedSurface); 44 44 DWORD APIENTRY DdBlt(PDD_BLTDATA lpBlt); 45 DWORD APIENTRY DdDestroySurface(PDD_DESTROYSURFACEDATA lpDestroySurface);46 45 DWORD APIENTRY DdFlip(PDD_FLIPDATA lpFlip); 47 46 DWORD APIENTRY DdGetBltStatus(PDD_GETBLTSTATUSDATA lpGetBltStatus); -
trunk/src/VBox/Additions/WINNT/Graphics/Display/vhwa.c
r22652 r24646 44 44 #define VBOX_DD_DUMMY_PAIR(_v) {VBOX_DD(_v), 0} 45 45 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 ) 152 139 153 140 void vboxVHWAInit() 154 141 { 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_DDFX199 | VBOXVHWA_OVER_HIDE200 | VBOXVHWA_OVER_KEYDEST201 | VBOXVHWA_OVER_KEYDESTOVERRIDE202 | VBOXVHWA_OVER_KEYSRC203 | VBOXVHWA_OVER_KEYSRCOVERRIDE204 | VBOXVHWA_OVER_SHOW;205 206 g_SupportedCKEYs = VBOXVHWA_CKEY_COLORSPACE207 | VBOXVHWA_CKEY_DESTBLT208 | VBOXVHWA_CKEY_DESTOVERLAY209 | VBOXVHWA_CKEY_SRCBLT210 | VBOXVHWA_CKEY_SRCOVERLAY;211 142 } 212 143 213 144 void vboxVHWATerm() 214 145 { 215 216 146 } 217 147 218 148 uint32_t vboxVHWAUnsupportedDDCAPS(uint32_t caps) 219 149 { 220 return caps & (~ g_SupportedDDCaps);150 return caps & (~VBOXVHWA_SUPPORTED_CAPS); 221 151 } 222 152 223 153 uint32_t vboxVHWAUnsupportedDDSCAPS(uint32_t caps) 224 154 { 225 return caps & (~ g_SupportedDDSCaps);155 return caps & (~VBOXVHWA_SUPPORTED_SCAPS); 226 156 } 227 157 228 158 uint32_t vboxVHWAUnsupportedDDPFS(uint32_t caps) 229 159 { 230 return caps & (~ g_SupportedDDPFs);160 return caps & (~VBOXVHWA_SUPPORTED_PF); 231 161 } 232 162 233 163 uint32_t vboxVHWAUnsupportedDSS(uint32_t caps) 234 164 { 235 return caps & (~ g_SupportedDDSDs);165 return caps & (~VBOXVHWA_SUPPORTED_SD); 236 166 } 237 167 238 168 uint32_t vboxVHWAUnsupportedDDCEYCAPS(uint32_t caps) 239 169 { 240 return caps & (~ g_SupportedDDCKeyCaps);170 return caps & (~VBOXVHWA_SUPPORTED_CKEYCAPS); 241 171 } 242 172 243 173 uint32_t vboxVHWASupportedDDCEYCAPS(uint32_t caps) 244 174 { 245 return caps & ( g_SupportedDDCKeyCaps);175 return caps & (VBOXVHWA_SUPPORTED_CKEYCAPS); 246 176 } 247 177 … … 249 179 uint32_t vboxVHWASupportedDDCAPS(uint32_t caps) 250 180 { 251 return caps & ( g_SupportedDDCaps);181 return caps & (VBOXVHWA_SUPPORTED_CAPS); 252 182 } 253 183 254 184 uint32_t vboxVHWASupportedDDSCAPS(uint32_t caps) 255 185 { 256 return caps & ( g_SupportedDDSCaps);186 return caps & (VBOXVHWA_SUPPORTED_SCAPS); 257 187 } 258 188 259 189 uint32_t vboxVHWASupportedDDPFS(uint32_t caps) 260 190 { 261 return caps & ( g_SupportedDDPFs);191 return caps & (VBOXVHWA_SUPPORTED_PF); 262 192 } 263 193 264 194 uint32_t vboxVHWASupportedDSS(uint32_t caps) 265 195 { 266 return caps & ( g_SupportedDDSDs);196 return caps & (VBOXVHWA_SUPPORTED_SD); 267 197 } 268 198 269 199 uint32_t vboxVHWASupportedOVERs(uint32_t caps) 270 200 { 271 return caps & ( g_SupportedOVERs);201 return caps & (VBOXVHWA_SUPPORTED_OVER); 272 202 } 273 203 274 204 uint32_t vboxVHWAUnsupportedOVERs(uint32_t caps) 275 205 { 276 return caps & (~ g_SupportedOVERs);206 return caps & (~VBOXVHWA_SUPPORTED_OVER); 277 207 } 278 208 279 209 uint32_t vboxVHWASupportedCKEYs(uint32_t caps) 280 210 { 281 return caps & ( g_SupportedCKEYs);211 return caps & (VBOXVHWA_SUPPORTED_CKEY); 282 212 } 283 213 284 214 uint32_t vboxVHWAUnsupportedCKEYs(uint32_t caps) 285 215 { 286 return caps & (~ g_SupportedCKEYs);216 return caps & (~VBOXVHWA_SUPPORTED_CKEY); 287 217 } 288 218 … … 301 231 uint32_t vboxVHWAFromDDCAPS(uint32_t caps) 302 232 { 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; 313 234 } 314 235 315 236 uint32_t vboxVHWAToDDCAPS(uint32_t caps) 316 237 { 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; 327 239 } 328 240 … … 339 251 uint32_t vboxVHWAFromDDSCAPS(uint32_t caps) 340 252 { 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; 351 254 } 352 255 353 256 uint32_t vboxVHWAToDDSCAPS(uint32_t caps) 354 257 { 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; 365 259 } 366 260 367 261 uint32_t vboxVHWAFromDDPFS(uint32_t caps) 368 262 { 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; 379 264 } 380 265 381 266 uint32_t vboxVHWAToDDPFS(uint32_t caps) 382 267 { 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; 393 269 } 394 270 395 271 uint32_t vboxVHWAFromDDCKEYCAPS(uint32_t caps) 396 272 { 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; 407 274 } 408 275 409 276 uint32_t vboxVHWAToDDCKEYCAPS(uint32_t caps) 410 277 { 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; 421 279 } 422 280
Note:
See TracChangeset
for help on using the changeset viewer.