Changeset 20478 in vbox for trunk/include/VBox
- Timestamp:
- Jun 11, 2009 4:54:19 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxVideo.h
r20243 r20478 257 257 typedef enum 258 258 { 259 VBOXVHWACMD_TYPE_SURF_CREATE = 1, 259 VBOXVHWACMD_TYPE_SURF_CANCREATE = 1, 260 VBOXVHWACMD_TYPE_SURF_CREATE, 260 261 VBOXVHWACMD_TYPE_SURF_DESTROY, 261 262 VBOXVHWACMD_TYPE_SURF_LOCK, 262 263 VBOXVHWACMD_TYPE_SURF_UNLOCK, 263 VBOXVHWACMD_TYPE_SURF_BLT 264 VBOXVHWACMD_TYPE_SURF_BLT, 265 VBOXVHWACMD_TYPE_QUERY_INFO1, 266 VBOXVHWACMD_TYPE_QUERY_INFO2 264 267 } VBOXVHWACMD_TYPE; 265 268 269 /* the command processing was asynch, set by the host to indicate asynch command completion 270 * must not be cleared once set, the command completion is performed by issuing a host->guest completion command 271 * while keeping this flag unchanged */ 272 #define VBOXVHWACMD_FLAG_ASYNCH 0x00000001 273 /* asynch completion is performed by issuing the event */ 274 #define VBOXVHWACMD_FLAG_ASYNCH_EVENT 0x00000002 275 266 276 typedef struct _VBOXVHWACMD 267 277 { 268 278 VBOXVHWACMD_TYPE enmCmd; /* command type */ 269 int32_t rc; /* command result */279 volatile int32_t rc; /* command result */ 270 280 int32_t iDisplay; /* display index */ 271 int32_t Reserved; /* reserved, must be null*/281 volatile int32_t Flags; /* ored VBOXVHWACMD_FLAG_xxx values */ 272 282 uint64_t GuestVBVAReserved1; /* field internally used by the guest VBVA cmd handling, must NOT be modified by clients */ 273 283 uint64_t GuestVBVAReserved2; /* field internally used by the guest VBVA cmd handling, must NOT be modified by clients */ … … 275 285 } VBOXVHWACMD; 276 286 277 #define VBOXVHWACMD_SIZE(_tCmd) (RT_OFFSETOF(VBOXVHWACMD_HDR, body) + sizeof(_tCmd)) 287 #define VBOXVHWACMD_HEADSIZE() (RT_OFFSETOF(VBOXVHWACMD, body)) 288 #define VBOXVHWACMD_SIZE(_tCmd) (VBOXVHWACMD_HEADSIZE() + sizeof(_tCmd)) 278 289 typedef unsigned int VBOXVHWACMD_LENGTH; 279 290 typedef uint64_t VBOXVHWA_SURFHANDLE; 280 291 #define VBOXVHWACMD_SURFHANDLE_INVALID 0 281 292 #define VBOXVHWACMD_BODY(_p, _t) ((_t*)(_p)->body) 293 #define VBOXVHWACMD_HEAD(_pb) ((VBOXVHWACMD*)((uint8_t *)(_pb) - RT_OFFSETOF(VBOXVHWACMD, body))) 282 294 283 295 typedef struct _VBOXVHWA_RECTL … … 288 300 uint16_t h; 289 301 } VBOXVHWA_RECTL; 290 291 #define VBOXVHWASURF_PRIMARY 0x00000001292 #define VBOXVHWASURF_OVERLAY 0x00000002293 302 294 303 typedef struct _VBOXVHWA_COLORKEY … … 339 348 uint32_t Reserved; 340 349 } VBOXVHWA_SURFINFO; 350 351 #define VBOXVHWA_CAPS_BLT 0x00000001 352 #define VBOXVHWA_CAPS_BLTCOLORFILL 0x00000002 353 #define VBOXVHWA_CAPS_BLTFOURCC 0x00000004 354 #define VBOXVHWA_CAPS_BLTSTRETCH 0x00000008 355 356 #define VBOXVHWA_CAPS_OVERLAY 0x00000100 357 #define VBOXVHWA_CAPS_OVERLAYFOURCC 0x00000200 358 #define VBOXVHWA_CAPS_OVERLAYSTRETCH 0x00000400 359 360 #define VBOXVHWA_CAPS_COLORKEY 0x00001000 361 //#define VBOXVHWA_CAPS_COLORKEYHWASSIST 0x00002000 /* always set COLORKEYHWASSIST in case host reports colorkey support */ 362 363 #define VBOXVHWA_CAPS2_COPYFOURCC 0x00000001 364 365 #define VBOXVHWA_SCAPS_FLIP 0x00000001 366 #define VBOXVHWA_SCAPS_PRIMARYSURFACE 0x00000002 367 #define VBOXVHWA_SCAPS_OVERLAY 0x00000008 368 369 #define VBOXVHWA_PF_RGB 0x00000001 370 #define VBOXVHWA_PF_RGBTOYUV 0x00000002 371 #define VBOXVHWA_PF_YUV 0x00000008 372 #define VBOXVHWA_PF_FOURCC 0x00000010 373 374 #define VBOXVHWA_CFG_ENABLED 0x00000001 375 376 typedef struct _VBOXVHWACMD_QUERYINFO1 377 { 378 uint32_t cfgFlags; 379 uint32_t caps; 380 uint32_t colorKeyCaps; 381 uint32_t stretchCaps; 382 uint32_t surfaceCaps; 383 uint32_t numOverlays; 384 uint32_t numFourCC; 385 386 } VBOXVHWACMD_QUERYINFO1; 387 388 typedef struct _VBOXVHWACMD_QUERYINFO2 389 { 390 uint32_t numFourCC; 391 uint32_t FourCC[1]; 392 } VBOXVHWACMD_QUERYINFO2; 393 394 #define VBOXVHWAINFO2_SIZE(_cFourCC) RT_OFFSETOF(VBOXVHWAINFO2, FourCC[_cFourCC]) 395 396 typedef struct _VBOXVHWACMD_SURF_CANCREATE 397 { 398 union 399 { 400 struct 401 { 402 VBOXVHWA_SURFINFO SurfInfo; 403 } in; 404 405 struct 406 { 407 uint32_t ErrInfo; 408 } out; 409 } u; 410 } VBOXVHWACMD_SURF_CANCREATE; 341 411 342 412 typedef struct _VBOXVHWACMD_SURF_CREATE … … 447 517 #define VBVA_ENABLE 7 448 518 #define VBVA_MOUSE_POINTER_SHAPE 8 519 #ifdef VBOX_WITH_VIDEOHWACCEL 520 # define VBVA_VHWA_CMD 9 521 #endif /* # ifdef VBOX_WITH_VIDEOHWACCEL */ 522 523 /* host->guest commands */ 524 # define VBVAHG_EVENT 1 525 # define VBVAHG_DISPLAY_CUSTOM 2 526 449 527 # ifdef VBOX_WITH_VIDEOHWACCEL 450 # define VBVA_INFO_VHWA 9 451 # define VBVA_VHWA_CMD 10 452 # endif /* # ifdef VBOX_WITH_VIDEOHWACCEL */ 453 454 /* host->guest commands */ 455 # ifdef VBOX_WITH_VIDEOHWACCEL 456 # define VBVAHG_VHWA_CMDCOMPLETE 1 457 528 #define VBVAHG_DCUSTOM_VHWA_CMDCOMPLETE 1 529 #pragma pack(1) 458 530 typedef struct _VBVAHOSTCMDVHWACMDCOMPLETE 459 531 { 460 532 uint32_t offCmd; 461 533 }VBVAHOSTCMDVHWACMDCOMPLETE; 534 #pragma pack() 462 535 # endif /* # ifdef VBOX_WITH_VIDEOHWACCEL */ 463 536 464 537 #pragma pack(1) 538 typedef enum 539 { 540 VBVAHOSTCMD_OP_EVENT = 1, 541 VBVAHOSTCMD_OP_CUSTOM 542 }VBVAHOSTCMD_OP_TYPE; 543 544 typedef struct _VBVAHOSTCMDEVENT 545 { 546 uint64_t pEvent; 547 }VBVAHOSTCMDEVENT; 548 549 465 550 typedef struct _VBVAHOSTCMD 466 551 { 467 552 /* destination ID if >=0 specifies display index, otherwize the command is directed to the miniport */ 468 553 int32_t iDstID; 469 uint32_t Reserved; 554 int32_t customOpCode; 555 union 556 { 557 struct _VBVAHOSTCMD *pNext; 558 uint64_t Data; /* the body is 64-bit alligned */ 559 } u; 470 560 char body[1]; 471 561 }VBVAHOSTCMD;
Note:
See TracChangeset
for help on using the changeset viewer.