Changeset 71592 in vbox for trunk/include/VBox/Graphics
- Timestamp:
- Mar 31, 2018 7:51:41 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 121581
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/Graphics/VBoxVideo.h
r71590 r71592 347 347 } VBOXVHWACMD_TYPE; 348 348 349 /* the command processing was asynch, set by the host to indicate asynch command completion 350 * must not be cleared once set, the command completion is performed by issuing a host->guest completion command 351 * while keeping this flag unchanged */ 352 #define VBOXVHWACMD_FLAG_HG_ASYNCH 0x00010000 353 /* asynch completion is performed by issuing the event */ 354 #define VBOXVHWACMD_FLAG_GH_ASYNCH_EVENT 0x00000001 355 /* issue interrupt on asynch completion */ 356 #define VBOXVHWACMD_FLAG_GH_ASYNCH_IRQ 0x00000002 357 /* guest does not do any op on completion of this command, the host may copy the command and indicate that it does not need the command anymore 349 /** The command processing was asynch, set by the host to indicate asynch 350 * command completion. Must not be cleared once set, the command completion is 351 * performed by issuing a host->guest completion command while keeping this 352 * flag unchanged */ 353 #define VBOXVHWACMD_FLAG_HG_ASYNCH UINT32_C(0x00010000) 354 /** asynch completion is performed by issuing the event */ 355 #define VBOXVHWACMD_FLAG_GH_ASYNCH_EVENT UINT32_C(0x00000001) 356 /** issue interrupt on asynch completion */ 357 #define VBOXVHWACMD_FLAG_GH_ASYNCH_IRQ UINT32_C(0x00000002) 358 /** Guest does not do any op on completion of this command, the host may copy 359 * the command and indicate that it does not need the command anymore 358 360 * by setting the VBOXVHWACMD_FLAG_HG_ASYNCH_RETURNED flag */ 359 #define VBOXVHWACMD_FLAG_GH_ASYNCH_NOCOMPLETION 0x00000004360 /* the host has copied the VBOXVHWACMD_FLAG_GH_ASYNCH_NOCOMPLETION command and returned it to the guest */361 #define VBOXVHWACMD_FLAG_HG_ASYNCH_RETURNED 0x00020000362 /* this is the host->host cmd, i.e. a configuration command posted by the host to the framebuffer */363 #define VBOXVHWACMD_FLAG_HH_CMD 0x10000000361 #define VBOXVHWACMD_FLAG_GH_ASYNCH_NOCOMPLETION UINT32_C(0x00000004) 362 /** the host has copied the VBOXVHWACMD_FLAG_GH_ASYNCH_NOCOMPLETION command and returned it to the guest */ 363 #define VBOXVHWACMD_FLAG_HG_ASYNCH_RETURNED UINT32_C(0x00020000) 364 /** this is the host->host cmd, i.e. a configuration command posted by the host to the framebuffer */ 365 #define VBOXVHWACMD_FLAG_HH_CMD UINT32_C(0x10000000) 364 366 365 367 typedef struct VBOXVHWACMD 366 368 { 367 VBOXVHWACMD_TYPE enmCmd; /*command type */368 volatile int32_t rc; /*command result */369 int32_t iDisplay; /*display index */370 volatile int32_t Flags; /* ored VBOXVHWACMD_FLAG_xxx values */371 uint64_t GuestVBVAReserved1; /* field internally used by the guest VBVA cmd handling, must NOT be modified by clients */372 uint64_t GuestVBVAReserved2; /* field internally used by the guest VBVA cmd handling, must NOT be modified by clients */369 VBOXVHWACMD_TYPE enmCmd; /**< command type */ 370 volatile int32_t rc; /**< command result */ 371 int32_t iDisplay; /**< display index */ 372 volatile int32_t Flags; /**< ORed VBOXVHWACMD_FLAG_xxx values */ 373 uint64_t GuestVBVAReserved1; /**< field internally used by the guest VBVA cmd handling, must NOT be modified by clients */ 374 uint64_t GuestVBVAReserved2; /**< field internally used by the guest VBVA cmd handling, must NOT be modified by clients */ 373 375 volatile uint32_t cRefs; 374 376 int32_t Reserved; … … 376 378 { 377 379 struct VBOXVHWACMD *pNext; 378 uint32_t 379 uint64_t Data; /*the body is 64-bit aligned */380 uint32_t offNext; 381 uint64_t Data; /**< the body is 64-bit aligned */ 380 382 } u; 381 383 char body[1]; 382 384 } VBOXVHWACMD; 383 385 384 #define VBOXVHWACMD_HEADSIZE() (RT_OFFSETOF(VBOXVHWACMD, body))385 #define VBOXVHWACMD_SIZE_FROMBODYSIZE( _s) (VBOXVHWACMD_HEADSIZE() + (_s))386 #define VBOXVHWACMD_SIZE( _tCmd) (VBOXVHWACMD_SIZE_FROMBODYSIZE(sizeof(_tCmd)))386 #define VBOXVHWACMD_HEADSIZE() (RT_OFFSETOF(VBOXVHWACMD, body)) 387 #define VBOXVHWACMD_SIZE_FROMBODYSIZE(a_cbBody) (VBOXVHWACMD_HEADSIZE() + (a_cbBody)) 388 #define VBOXVHWACMD_SIZE(a_tTypeCmd) (VBOXVHWACMD_SIZE_FROMBODYSIZE(sizeof(a_tTypeCmd))) 387 389 typedef unsigned int VBOXVHWACMD_LENGTH; 388 390 typedef uint64_t VBOXVHWA_SURFHANDLE; 389 #define VBOXVHWA_SURFHANDLE_INVALID 0ULL 390 #define VBOXVHWACMD_BODY(_p, _t) ((_t*)(_p)->body) 391 #define VBOXVHWACMD_HEAD(_pb) ((VBOXVHWACMD*)((uint8_t *)(_pb) - RT_OFFSETOF(VBOXVHWACMD, body))) 391 #define VBOXVHWA_SURFHANDLE_INVALID UINT64_C(0) 392 #define VBOXVHWACMD_BODY(a_pHdr, a_TypeBody) ( (a_TypeBody RT_UNTRUSTED_VOLATILE_HSTGST *)&(a_pHdr)->body[0] ) 393 #if !defined(IN_GUEST) && defined(IN_RING3) 394 # define VBOXVHWACMD_BODY_HOST_HEAP(a_pHdr, a_TypeBody) ( (a_TypeBody *)&(a_pHdr)->body[0] ) 395 #endif 396 #define VBOXVHWACMD_HEAD(a_pBody)\ 397 ( (VBOXVHWACMD RT_UNTRUSTED_VOLATILE_HSTGST *)((uint8_t *)(a_pBody) - RT_OFFSETOF(VBOXVHWACMD, body))) 392 398 393 399 typedef struct VBOXVHWA_RECTL … … 968 974 } u; 969 975 char body[1]; 970 }VBVAHOSTCMD; 971 972 #define VBVAHOSTCMD_SIZE(_size) (sizeof(VBVAHOSTCMD) + (_size)) 973 #define VBVAHOSTCMD_BODY(_pCmd, _tBody) ((_tBody*)(_pCmd)->body) 974 #define VBVAHOSTCMD_HDR(_pBody) ((VBVAHOSTCMD*)(((uint8_t*)_pBody) - RT_OFFSETOF(VBVAHOSTCMD, body))) 975 #define VBVAHOSTCMD_HDRSIZE (RT_OFFSETOF(VBVAHOSTCMD, body)) 976 } VBVAHOSTCMD; 977 978 #define VBVAHOSTCMD_SIZE(a_cb) (sizeof(VBVAHOSTCMD) + (a_cb)) 979 #define VBVAHOSTCMD_BODY(a_pCmd, a_TypeBody) ((a_TypeBody RT_UNTRUSTED_VOLATILE_HSTGST *)&(a_pCmd)->body[0]) 980 #define VBVAHOSTCMD_HDR(a_pBody) \ 981 ( (VBVAHOSTCMD RT_UNTRUSTED_VOLATILE_HSTGST *)( (uint8_t *)(a_pBody) - RT_OFFSETOF(VBVAHOSTCMD, body)) ) 982 #define VBVAHOSTCMD_HDRSIZE (RT_OFFSETOF(VBVAHOSTCMD, body)) 976 983 977 984 #pragma pack()
Note:
See TracChangeset
for help on using the changeset viewer.