~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to include/VBox/VBoxVideo.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/** @file
2
 
 * VirtualBox Video interface
 
2
 * VirtualBox Video interface.
3
3
 */
4
4
 
5
5
/*
33
33
#include <iprt/cdefs.h>
34
34
#include <iprt/types.h>
35
35
 
 
36
#ifdef VBOX_WITH_HGSMI
 
37
#include <VBox/VMMDev.h>
 
38
#endif /* VBOX_WITH_HGSMI */
 
39
 
36
40
/*
37
41
 * The last 4096 bytes of the guest VRAM contains the generic info for all
38
42
 * DualView chunks: sizes and offsets of chunks. This is filled by miniport.
94
98
 * runtime heapsimple API. Use minimum 2 pages here, because the info area also may
95
99
 * contain other data (for example HGSMIHOSTFLAGS structure).
96
100
 */
97
 
#define VBVA_ADAPTER_INFORMATION_SIZE  (8*_1K)
98
 
#define VBVA_DISPLAY_INFORMATION_SIZE  (8*_1K)
 
101
#define VBVA_ADAPTER_INFORMATION_SIZE  (16*_1K)
 
102
#define VBVA_DISPLAY_INFORMATION_SIZE  (64*_1K)
99
103
#define VBVA_MIN_BUFFER_SIZE           (64*_1K)
100
104
#endif /* VBOX_WITH_HGSMI */
101
105
 
254
258
# ifdef VBOX_WITH_VIDEOHWACCEL
255
259
#pragma pack(1)
256
260
 
 
261
#define VBOXVHWA_VERSION_MAJ 0
 
262
#define VBOXVHWA_VERSION_MIN 0
 
263
#define VBOXVHWA_VERSION_BLD 6
 
264
#define VBOXVHWA_VERSION_RSV 0
 
265
 
257
266
typedef enum
258
267
{
259
268
    VBOXVHWACMD_TYPE_SURF_CANCREATE = 1,
265
274
    VBOXVHWACMD_TYPE_SURF_FLIP,
266
275
    VBOXVHWACMD_TYPE_SURF_OVERLAY_UPDATE,
267
276
    VBOXVHWACMD_TYPE_SURF_OVERLAY_SETPOSITION,
 
277
    VBOXVHWACMD_TYPE_SURF_COLORKEY_SET,
268
278
    VBOXVHWACMD_TYPE_QUERY_INFO1,
269
279
    VBOXVHWACMD_TYPE_QUERY_INFO2,
270
280
    VBOXVHWACMD_TYPE_ENABLE,
271
 
    VBOXVHWACMD_TYPE_DISABLE
 
281
    VBOXVHWACMD_TYPE_DISABLE,
 
282
    VBOXVHWACMD_TYPE_HH_CONSTRUCT,
 
283
    VBOXVHWACMD_TYPE_HH_RESET
272
284
} VBOXVHWACMD_TYPE;
273
285
 
274
286
/* the command processing was asynch, set by the host to indicate asynch command completion
275
287
 * must not be cleared once set, the command completion is performed by issuing a host->guest completion command
276
288
 * while keeping this flag unchanged */
277
 
#define VBOXVHWACMD_FLAG_ASYNCH      0x00000001
 
289
#define VBOXVHWACMD_FLAG_HG_ASYNCH               0x00010000
278
290
/* asynch completion is performed by issuing the event */
279
 
#define VBOXVHWACMD_FLAG_ASYNCH_EVENT 0x00000002
 
291
#define VBOXVHWACMD_FLAG_GH_ASYNCH_EVENT         0x00000001
 
292
/* issue interrupt on asynch completion */
 
293
#define VBOXVHWACMD_FLAG_GH_ASYNCH_IRQ           0x00000002
 
294
/* 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
 
295
 * by setting the VBOXVHWACMD_FLAG_HG_ASYNCH_RETURNED flag */
 
296
#define VBOXVHWACMD_FLAG_GH_ASYNCH_NOCOMPLETION  0x00000004
 
297
/* the host has copied the VBOXVHWACMD_FLAG_GH_ASYNCH_NOCOMPLETION command and returned it to the guest */
 
298
#define VBOXVHWACMD_FLAG_HG_ASYNCH_RETURNED      0x00020000
 
299
/* this is the host->host cmd, i.e. a configuration command posted by the host to the framebuffer */
 
300
#define VBOXVHWACMD_FLAG_HH_CMD                  0x10000000
280
301
 
281
302
typedef struct _VBOXVHWACMD
282
303
{
286
307
    volatile int32_t Flags; /* ored VBOXVHWACMD_FLAG_xxx values */
287
308
    uint64_t GuestVBVAReserved1; /* field internally used by the guest VBVA cmd handling, must NOT be modified by clients */
288
309
    uint64_t GuestVBVAReserved2; /* field internally used by the guest VBVA cmd handling, must NOT be modified by clients */
 
310
    volatile uint32_t cRefs;
 
311
    int32_t Reserved;
289
312
    union
290
313
    {
291
314
        struct _VBOXVHWACMD *pNext;
296
319
} VBOXVHWACMD;
297
320
 
298
321
#define VBOXVHWACMD_HEADSIZE() (RT_OFFSETOF(VBOXVHWACMD, body))
299
 
#define VBOXVHWACMD_SIZE(_tCmd) (VBOXVHWACMD_HEADSIZE() + sizeof(_tCmd))
 
322
#define VBOXVHWACMD_SIZE_FROMBODYSIZE(_s) (VBOXVHWACMD_HEADSIZE() + (_s))
 
323
#define VBOXVHWACMD_SIZE(_tCmd) (VBOXVHWACMD_SIZE_FROMBODYSIZE(sizeof(_tCmd)))
300
324
typedef unsigned int VBOXVHWACMD_LENGTH;
301
325
typedef uint64_t VBOXVHWA_SURFHANDLE;
302
 
#define VBOXVHWACMD_SURFHANDLE_INVALID 0
 
326
#define VBOXVHWA_SURFHANDLE_INVALID 0
303
327
#define VBOXVHWACMD_BODY(_p, _t) ((_t*)(_p)->body)
304
328
#define VBOXVHWACMD_HEAD(_pb) ((VBOXVHWACMD*)((uint8_t *)(_pb) - RT_OFFSETOF(VBOXVHWACMD, body)))
305
329
 
306
330
typedef struct _VBOXVHWA_RECTL
307
331
{
308
 
    int32_t x;
309
 
    int32_t y;
310
 
    uint32_t w;
311
 
    uint32_t h;
 
332
    int32_t left;
 
333
    int32_t top;
 
334
    int32_t right;
 
335
    int32_t bottom;
312
336
} VBOXVHWA_RECTL;
313
337
 
314
338
typedef struct _VBOXVHWA_COLORKEY
344
368
        uint32_t rgbBBitMask;
345
369
        uint32_t yuvVBitMask;
346
370
    } m3;
 
371
 
 
372
    union
 
373
    {
 
374
        uint32_t rgbABitMask;
 
375
    } m4;
 
376
 
 
377
    uint32_t Reserved;
347
378
} VBOXVHWA_PIXELFORMAT;
348
379
 
349
380
typedef struct _VBOXVHWA_SURFACEDESC
352
383
    uint32_t height;
353
384
    uint32_t width;
354
385
    uint32_t pitch;
 
386
    uint32_t sizeX;
 
387
    uint32_t sizeY;
355
388
    uint32_t cBackBuffers;
356
 
    uint32_t Reserved1;
 
389
    uint32_t Reserved;
357
390
    VBOXVHWA_COLORKEY DstOverlayCK;
358
391
    VBOXVHWA_COLORKEY DstBltCK;
359
392
    VBOXVHWA_COLORKEY SrcOverlayCK;
361
394
    VBOXVHWA_PIXELFORMAT PixelFormat;
362
395
    uint32_t surfCaps;
363
396
    uint32_t Reserved2;
 
397
    VBOXVHWA_SURFHANDLE hSurf;
 
398
    uint64_t offSurface;
364
399
} VBOXVHWA_SURFACEDESC;
365
400
 
366
401
typedef struct _VBOXVHWA_BLTFX
379
414
{
380
415
    uint32_t flags;
381
416
    uint32_t Reserved1;
382
 
    uint32_t rotationOp;
 
417
    uint32_t fxFlags;
383
418
    uint32_t Reserved2;
384
419
    VBOXVHWA_COLORKEY DstCK;
385
420
    VBOXVHWA_COLORKEY SrcCK;
386
421
} VBOXVHWA_OVERLAYFX;
387
422
 
388
 
#define VBOXVHWA_CAPS_BLT             0x00000001
389
 
#define VBOXVHWA_CAPS_BLTCOLORFILL    0x00000002
390
 
#define VBOXVHWA_CAPS_BLTFOURCC       0x00000004
391
 
#define VBOXVHWA_CAPS_BLTSTRETCH      0x00000008
392
 
#define VBOXVHWA_CAPS_BLTQUEUE        0x00000010
393
 
 
394
 
#define VBOXVHWA_CAPS_OVERLAY         0x00000100
395
 
#define VBOXVHWA_CAPS_OVERLAYFOURCC   0x00000200
396
 
#define VBOXVHWA_CAPS_OVERLAYSTRETCH  0x00000400
397
 
 
398
 
#define VBOXVHWA_CAPS_COLORKEY        0x00010000
399
 
#define VBOXVHWA_CAPS_COLORKEYHWASSIST         0x00020000
400
 
 
401
 
 
402
 
#define VBOXVHWA_CAPS2_COPYFOURCC   0x00000001
403
 
 
404
 
#define VBOXVHWA_SCAPS_FLIP             0x00000001
405
 
#define VBOXVHWA_SCAPS_PRIMARYSURFACE   0x00000002
406
 
#define VBOXVHWA_SCAPS_OFFSCREENPLAIN   0x00000004
407
 
#define VBOXVHWA_SCAPS_OVERLAY          0x00000008
408
 
#define VBOXVHWA_SCAPS_VISIBLE          0x00000010
409
 
#define VBOXVHWA_SCAPS_VIDEOMEMORY      0x00000020
410
 
#define VBOXVHWA_SCAPS_LOCALVIDMEM      0x00000040
411
 
 
412
 
 
413
 
#define VBOXVHWA_PF_RGB                 0x00000001
414
 
#define VBOXVHWA_PF_RGBTOYUV            0x00000002
415
 
#define VBOXVHWA_PF_YUV                 0x00000008
416
 
#define VBOXVHWA_PF_FOURCC              0x00000010
417
 
 
418
 
#define VBOXVHWA_LOCK_DISCARDCONTENTS   0x00000001
 
423
#define VBOXVHWA_CAPS_BLT               0x00000040
 
424
#define VBOXVHWA_CAPS_BLTCOLORFILL      0x04000000
 
425
#define VBOXVHWA_CAPS_BLTFOURCC         0x00000100
 
426
#define VBOXVHWA_CAPS_BLTSTRETCH        0x00000200
 
427
#define VBOXVHWA_CAPS_BLTQUEUE          0x00000080
 
428
 
 
429
#define VBOXVHWA_CAPS_OVERLAY           0x00000800
 
430
#define VBOXVHWA_CAPS_OVERLAYFOURCC     0x00002000
 
431
#define VBOXVHWA_CAPS_OVERLAYSTRETCH    0x00004000
 
432
#define VBOXVHWA_CAPS_OVERLAYCANTCLIP   0x00001000
 
433
 
 
434
#define VBOXVHWA_CAPS_COLORKEY          0x00400000
 
435
#define VBOXVHWA_CAPS_COLORKEYHWASSIST  0x01000000
 
436
 
 
437
#define VBOXVHWA_SCAPS_BACKBUFFER       0x00000004
 
438
#define VBOXVHWA_SCAPS_COMPLEX          0x00000008
 
439
#define VBOXVHWA_SCAPS_FLIP             0x00000010
 
440
#define VBOXVHWA_SCAPS_FRONTBUFFER      0x00000020
 
441
#define VBOXVHWA_SCAPS_OFFSCREENPLAIN   0x00000040
 
442
#define VBOXVHWA_SCAPS_OVERLAY          0x00000080
 
443
#define VBOXVHWA_SCAPS_PRIMARYSURFACE   0x00000200
 
444
#define VBOXVHWA_SCAPS_SYSTEMMEMORY     0x00000800
 
445
#define VBOXVHWA_SCAPS_VIDEOMEMORY      0x00004000
 
446
#define VBOXVHWA_SCAPS_VISIBLE          0x00008000
 
447
#define VBOXVHWA_SCAPS_LOCALVIDMEM      0x10000000
 
448
 
 
449
#define VBOXVHWA_PF_RGB                 0x00000040
 
450
#define VBOXVHWA_PF_RGBTOYUV            0x00000100
 
451
#define VBOXVHWA_PF_YUV                 0x00000200
 
452
#define VBOXVHWA_PF_FOURCC              0x00000004
 
453
 
 
454
#define VBOXVHWA_LOCK_DISCARDCONTENTS   0x00002000
419
455
 
420
456
#define VBOXVHWA_CFG_ENABLED            0x00000001
421
457
 
422
 
#define VBOXVHWA_SD_BACKBUFFERCOUNT     0x00000001
423
 
#define VBOXVHWA_SD_CAPS                0x00000002
424
 
#define VBOXVHWA_SD_CKDESTBLT           0x00000004
425
 
#define VBOXVHWA_SD_CKDESTOVERLAY       0x00000008
426
 
#define VBOXVHWA_SD_CKSRCBLT            0x00000010
427
 
#define VBOXVHWA_SD_CKSRCOVERLAY        0x00000020
428
 
#define VBOXVHWA_SD_HEIGHT              0x00000040
429
 
#define VBOXVHWA_SD_PITCH               0x00000080
430
 
#define VBOXVHWA_SD_PIXELFORMAT         0x00000100
431
 
//#define VBOXVHWA_SD_REFRESHRATE       0x00000200
432
 
#define VBOXVHWA_SD_WIDTH               0x00000400
 
458
#define VBOXVHWA_SD_BACKBUFFERCOUNT     0x00000020
 
459
#define VBOXVHWA_SD_CAPS                0x00000001
 
460
#define VBOXVHWA_SD_CKDESTBLT           0x00004000
 
461
#define VBOXVHWA_SD_CKDESTOVERLAY       0x00002000
 
462
#define VBOXVHWA_SD_CKSRCBLT            0x00010000
 
463
#define VBOXVHWA_SD_CKSRCOVERLAY        0x00008000
 
464
#define VBOXVHWA_SD_HEIGHT              0x00000002
 
465
#define VBOXVHWA_SD_PITCH               0x00000008
 
466
#define VBOXVHWA_SD_PIXELFORMAT         0x00001000
 
467
//#define VBOXVHWA_SD_REFRESHRATE       0x00040000
 
468
#define VBOXVHWA_SD_WIDTH               0x00000004
433
469
 
434
470
#define VBOXVHWA_CKEYCAPS_DESTBLT                  0x00000001
435
471
#define VBOXVHWA_CKEYCAPS_DESTBLTCLRSPACE          0x00000002
440
476
#define VBOXVHWA_CKEYCAPS_DESTOVERLAYCLRSPACEYUV   0x00000040
441
477
#define VBOXVHWA_CKEYCAPS_DESTOVERLAYONEACTIVE     0x00000080
442
478
#define VBOXVHWA_CKEYCAPS_DESTOVERLAYYUV           0x00000100
443
 
#define VBOXVHWA_CKEYCAPS_NOCOSTOVERLAY            0x00000200
444
 
#define VBOXVHWA_CKEYCAPS_SRCBLT                   0x00000400
445
 
#define VBOXVHWA_CKEYCAPS_SRCBLTCLRSPACE           0x00000800
446
 
#define VBOXVHWA_CKEYCAPS_SRCBLTCLRSPACEYUV        0x00001000
447
 
#define VBOXVHWA_CKEYCAPS_SRCBLTYUV                0x00002000
448
 
#define VBOXVHWA_CKEYCAPS_SRCOVERLAY               0x00004000
449
 
#define VBOXVHWA_CKEYCAPS_SRCOVERLAYCLRSPACE       0x00008000
450
 
#define VBOXVHWA_CKEYCAPS_SRCOVERLAYCLRSPACEYUV    0x00010000
451
 
#define VBOXVHWA_CKEYCAPS_SRCOVERLAYONEACTIVE      0x00020000
452
 
#define VBOXVHWA_CKEYCAPS_SRCOVERLAYYUV            0x00040000
453
 
 
 
479
#define VBOXVHWA_CKEYCAPS_SRCBLT                   0x00000200
 
480
#define VBOXVHWA_CKEYCAPS_SRCBLTCLRSPACE           0x00000400
 
481
#define VBOXVHWA_CKEYCAPS_SRCBLTCLRSPACEYUV        0x00000800
 
482
#define VBOXVHWA_CKEYCAPS_SRCBLTYUV                0x00001000
 
483
#define VBOXVHWA_CKEYCAPS_SRCOVERLAY               0x00002000
 
484
#define VBOXVHWA_CKEYCAPS_SRCOVERLAYCLRSPACE       0x00004000
 
485
#define VBOXVHWA_CKEYCAPS_SRCOVERLAYCLRSPACEYUV    0x00008000
 
486
#define VBOXVHWA_CKEYCAPS_SRCOVERLAYONEACTIVE      0x00010000
 
487
#define VBOXVHWA_CKEYCAPS_SRCOVERLAYYUV            0x00020000
 
488
#define VBOXVHWA_CKEYCAPS_NOCOSTOVERLAY            0x00040000
454
489
 
455
490
#define VBOXVHWA_BLT_COLORFILL                      0x00000400
456
491
#define VBOXVHWA_BLT_DDFX                           0x00000800
464
499
#define VBOXVHWA_BLT_ROP                            0x00020000
465
500
 
466
501
 
467
 
 
468
 
 
469
 
#define VBOXVHWA_OFFSET64_VOID        (~0L)
 
502
#define VBOXVHWA_OVER_DDFX                          0x00080000
 
503
#define VBOXVHWA_OVER_HIDE                          0x00000200
 
504
#define VBOXVHWA_OVER_KEYDEST                       0x00000400
 
505
#define VBOXVHWA_OVER_KEYDESTOVERRIDE               0x00000800
 
506
#define VBOXVHWA_OVER_KEYSRC                        0x00001000
 
507
#define VBOXVHWA_OVER_KEYSRCOVERRIDE                0x00002000
 
508
#define VBOXVHWA_OVER_SHOW                          0x00004000
 
509
 
 
510
#define VBOXVHWA_CKEY_COLORSPACE                    0x00000001
 
511
#define VBOXVHWA_CKEY_DESTBLT                       0x00000002
 
512
#define VBOXVHWA_CKEY_DESTOVERLAY                   0x00000004
 
513
#define VBOXVHWA_CKEY_SRCBLT                        0x00000008
 
514
#define VBOXVHWA_CKEY_SRCOVERLAY                    0x00000010
 
515
 
 
516
#define VBOXVHWA_BLT_ARITHSTRETCHY                  0x00000001
 
517
#define VBOXVHWA_BLT_MIRRORLEFTRIGHT                0x00000002
 
518
#define VBOXVHWA_BLT_MIRRORUPDOWN                   0x00000004
 
519
 
 
520
#define VBOXVHWA_OVERFX_ARITHSTRETCHY               0x00000001
 
521
#define VBOXVHWA_OVERFX_MIRRORLEFTRIGHT             0x00000002
 
522
#define VBOXVHWA_OVERFX_MIRRORUPDOWN                0x00000004
 
523
 
 
524
#define VBOXVHWA_CAPS2_CANRENDERWINDOWED            0x00080000
 
525
#define VBOXVHWA_CAPS2_WIDESURFACES                 0x00001000
 
526
#define VBOXVHWA_CAPS2_COPYFOURCC                   0x00008000
 
527
//#define VBOXVHWA_CAPS2_FLIPINTERVAL                 0x00200000
 
528
//#define VBOXVHWA_CAPS2_FLIPNOVSYNC                  0x00400000
 
529
 
 
530
 
 
531
#define VBOXVHWA_OFFSET64_VOID        (UINT64_MAX)
 
532
 
 
533
typedef struct _VBOXVHWA_VERSION
 
534
{
 
535
    uint32_t maj;
 
536
    uint32_t min;
 
537
    uint32_t bld;
 
538
    uint32_t reserved;
 
539
} VBOXVHWA_VERSION;
470
540
 
471
541
typedef struct _VBOXVHWACMD_QUERYINFO1
472
542
{
473
 
    uint32_t cfgFlags;
474
 
    uint32_t caps;
475
 
    uint32_t colorKeyCaps;
476
 
    uint32_t stretchCaps;
477
 
    uint32_t surfaceCaps;
478
 
    uint32_t numOverlays;
479
 
    uint32_t numFourCC;
480
 
 
 
543
    union
 
544
    {
 
545
        struct
 
546
        {
 
547
            VBOXVHWA_VERSION guestVersion;
 
548
        } in;
 
549
 
 
550
        struct
 
551
        {
 
552
            uint32_t cfgFlags;
 
553
            uint32_t caps;
 
554
 
 
555
            uint32_t caps2;
 
556
            uint32_t colorKeyCaps;
 
557
 
 
558
            uint32_t stretchCaps;
 
559
            uint32_t surfaceCaps;
 
560
 
 
561
            uint32_t numOverlays;
 
562
            uint32_t curOverlays;
 
563
 
 
564
            uint32_t numFourCC;
 
565
            uint32_t reserved;
 
566
        } out;
 
567
    } u;
481
568
} VBOXVHWACMD_QUERYINFO1;
482
569
 
483
570
typedef struct _VBOXVHWACMD_QUERYINFO2
486
573
    uint32_t FourCC[1];
487
574
} VBOXVHWACMD_QUERYINFO2;
488
575
 
489
 
#define VBOXVHWAINFO2_SIZE(_cFourCC) RT_OFFSETOF(VBOXVHWAINFO2, FourCC[_cFourCC])
 
576
#define VBOXVHWAINFO2_SIZE(_cFourCC) RT_OFFSETOF(VBOXVHWACMD_QUERYINFO2, FourCC[_cFourCC])
490
577
 
491
578
typedef struct _VBOXVHWACMD_SURF_CANCREATE
492
579
{
 
580
    VBOXVHWA_SURFACEDESC SurfInfo;
493
581
    union
494
582
    {
495
583
        struct
496
584
        {
497
 
            VBOXVHWA_SURFACEDESC SurfInfo;
498
585
            uint32_t bIsDifferentPixelFormat;
499
586
            uint32_t Reserved;
500
587
        } in;
501
588
 
502
589
        struct
503
590
        {
504
 
            uint32_t ErrInfo;
 
591
            int32_t ErrInfo;
505
592
        } out;
506
593
    } u;
507
594
} VBOXVHWACMD_SURF_CANCREATE;
508
595
 
509
596
typedef struct _VBOXVHWACMD_SURF_CREATE
510
597
{
511
 
    union
512
 
    {
513
 
        struct
514
 
        {
515
 
            VBOXVHWA_SURFACEDESC SurfInfo;
516
 
            uint64_t offSurface;
517
 
        } in;
518
 
 
519
 
        struct
520
 
        {
521
 
            VBOXVHWA_SURFHANDLE hSurf;
522
 
        } out;
523
 
    } u;
 
598
    VBOXVHWA_SURFACEDESC SurfInfo;
524
599
} VBOXVHWACMD_SURF_CREATE;
525
600
 
526
601
typedef struct _VBOXVHWACMD_SURF_DESTROY
556
631
        struct
557
632
        {
558
633
            VBOXVHWA_SURFHANDLE hSurf;
 
634
            uint32_t xUpdatedMemValid;
 
635
            uint32_t reserved;
 
636
            VBOXVHWA_RECTL xUpdatedMemRect;
559
637
        } in;
560
638
    } u;
561
639
} VBOXVHWACMD_SURF_UNLOCK;
575
653
            uint64_t offSrcSurface;
576
654
            VBOXVHWA_RECTL srcRect;
577
655
            uint32_t flags;
578
 
            uint32_t reserved;
 
656
            uint32_t xUpdatedSrcMemValid;
579
657
            VBOXVHWA_BLTFX desc;
 
658
            VBOXVHWA_RECTL xUpdatedSrcMemRect;
580
659
        } in;
581
660
    } u;
582
661
} VBOXVHWACMD_SURF_BLT;
583
662
 
 
663
typedef struct _VBOXVHWACMD_SURF_FLIP
 
664
{
 
665
    uint64_t TargGuestSurfInfo;
 
666
    uint64_t CurrGuestSurfInfo;
 
667
    union
 
668
    {
 
669
        struct
 
670
        {
 
671
            VBOXVHWA_SURFHANDLE hTargSurf;
 
672
            uint64_t offTargSurface;
 
673
            VBOXVHWA_SURFHANDLE hCurrSurf;
 
674
            uint64_t offCurrSurface;
 
675
            uint32_t flags;
 
676
            uint32_t xUpdatedTargMemValid;
 
677
            VBOXVHWA_RECTL xUpdatedTargMemRect;
 
678
        } in;
 
679
    } u;
 
680
} VBOXVHWACMD_SURF_FLIP;
 
681
 
 
682
typedef struct _VBOXVHWACMD_SURF_COLORKEY_SET
 
683
{
 
684
    union
 
685
    {
 
686
        struct
 
687
        {
 
688
            VBOXVHWA_SURFHANDLE hSurf;
 
689
            uint64_t offSurface;
 
690
            VBOXVHWA_COLORKEY CKey;
 
691
            uint32_t flags;
 
692
            uint32_t reserved;
 
693
        } in;
 
694
    } u;
 
695
} VBOXVHWACMD_SURF_COLORKEY_SET;
 
696
 
584
697
typedef struct _VBOXVHWACMD_SURF_OVERLAY_UPDATE
585
698
{
586
699
    union
594
707
            uint64_t offSrcSurface;
595
708
            VBOXVHWA_RECTL srcRect;
596
709
            uint32_t flags;
597
 
            uint32_t reserved;
 
710
            uint32_t xUpdatedSrcMemValid;
598
711
            VBOXVHWA_OVERLAYFX desc;
 
712
            VBOXVHWA_RECTL xUpdatedSrcMemRect;
599
713
        } in;
600
714
    } u;
601
715
}VBOXVHWACMD_SURF_OVERLAY_UPDATE;
618
732
    } u;
619
733
} VBOXVHWACMD_SURF_OVERLAY_SETPOSITION;
620
734
 
 
735
typedef struct _VBOXVHWACMD_HH_CONSTRUCT
 
736
{
 
737
    void * pVM;
 
738
} VBOXVHWACMD_HH_CONSTRUCT;
 
739
 
 
740
typedef DECLCALLBACK(void) FNVBOXVHWA_HH_CALLBACK(void*);
 
741
typedef FNVBOXVHWA_HH_CALLBACK *PFNVBOXVHWA_HH_CALLBACK;
 
742
 
 
743
#define VBOXVHWA_HH_CALLBACK_SET(_pCmd, _pfn, _parg) \
 
744
    do { \
 
745
        (_pCmd)->GuestVBVAReserved1 = (uint64_t)(_pfn); \
 
746
        (_pCmd)->GuestVBVAReserved2 = (uint64_t)(_parg); \
 
747
    }while(0)
 
748
 
 
749
#define VBOXVHWA_HH_CALLBACK_GET(_pCmd) ((PFNVBOXVHWA_HH_CALLBACK)(_pCmd)->GuestVBVAReserved1)
 
750
#define VBOXVHWA_HH_CALLBACK_GET_ARG(_pCmd) ((void*)(_pCmd)->GuestVBVAReserved2)
 
751
 
621
752
#pragma pack()
622
753
# endif /* #ifdef VBOX_WITH_VIDEOHWACCEL */
623
754
 
626
757
/* All structures are without alignment. */
627
758
#pragma pack(1)
628
759
 
629
 
typedef struct _VBVABUFFER
 
760
typedef struct VBVAHOSTFLAGS
630
761
{
631
762
    uint32_t u32HostEvents;
632
763
    uint32_t u32SupportedOrders;
 
764
} VBVAHOSTFLAGS;
 
765
 
 
766
typedef struct _VBVABUFFER
 
767
{
 
768
    VBVAHOSTFLAGS hostFlags;
633
769
 
634
770
    /* The offset where the data start in the buffer. */
635
771
    uint32_t off32Data;
719
855
    uint32_t u32Value;
720
856
} VBVACONF32;
721
857
 
722
 
typedef struct _VBVAINFOVIEW
 
858
typedef struct VBVAINFOVIEW
723
859
{
724
860
    /* Index of the screen, assigned by the guest. */
725
861
    uint32_t u32ViewIndex;
754
890
#define VBVA_SCREEN_F_NONE   0x0000
755
891
#define VBVA_SCREEN_F_ACTIVE 0x0001
756
892
 
757
 
typedef struct _VBVAINFOSCREEN
 
893
typedef struct VBVAINFOSCREEN
758
894
{
759
895
    /* Which view contains the screen. */
760
896
    uint32_t u32ViewIndex;
765
901
    /* Physical Y origin relative to the primary screen. */
766
902
    int32_t i32OriginY;
767
903
 
 
904
    /* Offset of visible framebuffer relative to the framebuffer start. */
 
905
    uint32_t u32StartOffset;
 
906
 
768
907
    /* The scan line size in bytes. */
769
908
    uint32_t u32LineSize;
770
909
 
791
930
{
792
931
    uint32_t u32Flags;
793
932
    uint32_t u32Offset;
 
933
    int32_t  i32Result;
794
934
 
795
935
} VBVAENABLE;
796
936
 
797
937
typedef struct _VBVAMOUSEPOINTERSHAPE
798
938
{
799
939
    /* The host result. */
800
 
    uint32_t u32Result;
 
940
    int32_t i32Result;
801
941
 
802
942
    /* VBOX_MOUSE_POINTER_* bit flags. */
803
943
    uint32_t fu32Flags;