VirtualBox

Changeset 49474 in vbox for trunk/include


Ignore:
Timestamp:
Nov 14, 2013 6:49:54 AM (11 years ago)
Author:
vboxsync
Message:

crOpenGL: some host bits for buffer-based command submission

Location:
trunk/include/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/HostServices/VBoxCrOpenGLSvc.h

    r46783 r49474  
    4444#define SHCRGL_HOST_FN_VIEWPORT_CHANGED (15)
    4545#define SHCRGL_HOST_FN_SET_OUTPUT_REDIRECT (20)
     46#define SHCRGL_HOST_FN_CRCMD_NOTIFY_CMDS    (21)
    4647/* crOpenGL guest functions */
    4748#define SHCRGL_GUEST_FN_WRITE       (2)
     
    6970#define SHCRGL_CPARMS_WRITE_READ_BUFFERED (3)
    7071#define SHCRGL_CPARMS_SET_OUTPUT_REDIRECT (1)
     72#define SHCRGL_CPARMS_CRCMD_NOTIFY_CMDS (0)
    7173#define SHCRGL_CPARMS_VIEWPORT_CHANGED (5)
    7274#define SHCRGL_CPARMS_GET_CAPS (1)
  • trunk/include/VBox/VBoxVideo.h

    r49365 r49474  
    14581458    };
    14591459    uint64_t cbVRam;
     1460    struct VBOXCRCMD_CLTINFO *pCrCmdClientInfo;
    14601461} VBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP, *PVBOXVDMACMD_CHROMIUM_CTL_CRHGSMI_SETUP;
    14611462
     
    15671568
    15681569/* CrHgsmi command */
    1569 #define VBOXCMDVBVA_OPTYPE_CRCMD 1
    1570 /* blit command (e.g. shadow to primary) */
    1571 #define VBOXCMDVBVA_OPTYPE_BLT   2
     1570#define VBOXCMDVBVA_OPTYPE_CRCMD                        1
     1571/* special case for blitting to primary */
     1572#define VBOXCMDVBVA_OPTYPE_BLT_TOPRIMARY                2
     1573/* blit command that does blitting of allocations identified by VRAM offset or host id
     1574 * for VRAM-offset ones the size and format are same as primary */
     1575#define VBOXCMDVBVA_OPTYPE_BLT_OFFPRIMSZFMT_OR_ID       3
     1576/* allocation paging transfer request */
     1577#define VBOXCMDVBVA_OPTYPE_PAGING_TRANSFER              4
     1578/* allocation paging fill request */
     1579#define VBOXCMDVBVA_OPTYPE_PAGING_FILL                  5
    15721580/* nop - is a one-bit command. The buffer size to skip is determined by VBVA buffer size */
    1573 #define VBOXCMDVBVA_OPTYPE_NOP   0x80
     1581#define VBOXCMDVBVA_OPTYPE_NOP                          0x80
     1582
     1583/* u8Flags flags */
     1584/* source allocation is specified with the host id. if not set - source allocation is specified with VRAM offset */
     1585#define VBOXCMDVBVA_OPF_ALLOC_SRCID                     0x80
     1586/* destination allocation is specified with the host id. if not set - destination allocation is specified with VRAM offset */
     1587#define VBOXCMDVBVA_OPF_ALLOC_DSTID                     0x40
     1588
     1589/* transfer from RAM to Allocation */
     1590#define VBOXCMDVBVA_OPF_PAGING_TRANSFER_IN              0x20
     1591
    15741592
    15751593/* trying to make the header as small as possible,
     
    15801598    /* one VBOXCMDVBVA_OPTYPE_XXX, ecxept NOP, see comments above */
    15811599    uint8_t u8OpCode;
    1582     /* reserved, must be null */
    1583     uint8_t u8Reserved;
     1600    /* command-specific
     1601     * VBOXCMDVBVA_OPTYPE_CRCMD - must be null
     1602     * VBOXCMDVBVA_OPTYPE_BLT_TOPRIMARY - OR-ed VBOXCMDVBVA_OPF_ALLOC_XXX flags
     1603     * VBOXCMDVBVA_OPTYPE_BLT_OFFPRIMSZFMT_OR_ID - OR-ed VBOXCMDVBVA_OPF_ALLOC_XXX flags
     1604     * VBOXCMDVBVA_OPTYPE_NOP - must be null */
     1605    uint8_t u8Flags;
    15841606    /* one of VBOXCMDVBVA_STATE_XXX*/
    15851607    volatile uint8_t u8State;
    1586     /* result, 0 on success, otherwise contains the failure code TBD */
    1587     int8_t u8Result;
     1608    union
     1609    {
     1610        /* result, 0 on success, otherwise contains the failure code TBD */
     1611        int8_t i8Result;
     1612        uint8_t u8PrimaryID;
     1613    };
    15881614    /* DXGK DDI fence ID */
    15891615    uint32_t u32FenceID;
    15901616} VBOXCMDVBVA_HDR;
    15911617
     1618typedef uint32_t VBOXCMDVBVAOFFSET;
     1619typedef uint64_t VBOXCMDVBVAPHADDR;
     1620
    15921621typedef struct VBOXCMDVBVA_CRCMD
    15931622{
    15941623    VBOXCMDVBVA_HDR Hdr;
    1595     VBOXVIDEOOFFSET offCmd;
     1624    VBOXCMDVBVAOFFSET offCmd;
    15961625} VBOXCMDVBVA_CRCMD;
     1626
     1627typedef struct VBOXCMDVBVA_ALLOCINFO
     1628{
     1629    union
     1630    {
     1631        VBOXCMDVBVAOFFSET offVRAM;
     1632        uint32_t id;
     1633    };
     1634} VBOXCMDVBVA_ALLOCINFO;
     1635
     1636typedef struct VBOXCMDVBVA_RECT
     1637{
     1638   /** Coordinates of affected rectangle. */
     1639   int16_t x;
     1640   int16_t y;
     1641   uint16_t w;
     1642   uint16_t h;
     1643} VBOXCMDVBVA_RECT;
     1644
     1645typedef struct VBOXCMDVBVA_BLT_TOPRIMARY
     1646{
     1647    VBOXCMDVBVA_HDR Hdr;
     1648    VBOXCMDVBVA_ALLOCINFO src;
     1649    /* the rects count is determined from the command size */
     1650    VBOXCMDVBVA_RECT aRects[1];
     1651} VBOXCMDVBVA_BLT_TOPRIMARY;
     1652
     1653typedef struct VBOXCMDVBVA_BLT_OFFPRIMSZFMT_OR_ID
     1654{
     1655    VBOXCMDVBVA_HDR Hdr;
     1656    VBOXCMDVBVA_ALLOCINFO src;
     1657    VBOXCMDVBVA_ALLOCINFO dst;
     1658    /* the rects count is determined from the command size */
     1659    VBOXCMDVBVA_RECT aRects[1];
     1660} VBOXCMDVBVA_BLT_OFFPRIMSZFMT_OR_ID;
     1661
     1662typedef struct VBOXCMDVBVA_PAGING_TRANSFER
     1663{
     1664    VBOXCMDVBVA_HDR Hdr;
     1665    VBOXCMDVBVAPHADDR Addr;
     1666    /* for now can only contain offVRAM.
     1667     * paging transfer can NOT be initiated for allocations having host 3D object (hostID) associated */
     1668    VBOXCMDVBVA_ALLOCINFO Alloc;
     1669} VBOXCMDVBVA_PAGING_TRANSFER;
     1670
     1671typedef struct VBOXCMDVBVA_PAGING_FILL
     1672{
     1673    VBOXCMDVBVA_HDR Hdr;
     1674    uint32_t cbFill;
     1675    uint32_t Pattern;
     1676    /* paging transfer can NOT be initiated for allocations having host 3D object (hostID) associated */
     1677    VBOXCMDVBVAOFFSET offVRAM;
     1678} VBOXCMDVBVA_PAGING_FILL;
    15971679
    15981680# pragma pack()
  • trunk/include/VBox/VBoxVideo3D.h

    r48491 r49474  
    140140#define VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA 2
    141141
     142
     143/* interface between the VGA device and 3D Server Backend
     144 * VGA device and 3D backend work together in processing the VBVA-based ring buffer commands comming from guest.
     145 * With this interaction VGA device acts like a client, while 3D backend acts as a server.
     146 * VGA device can process some commands itself, while some of them are delegated to the 3D backend.
     147 *
     148 * */
     149/* client handle, passed to client callbacks (see below) */
     150typedef struct VBOXVDMAHOST *HVBOXCRCMDCLT;
     151
     152
     153typedef struct VBOXCMDVBVA_HDR *PVBOXCMDVBVA_HDR;
     154
     155/* server queries client for the next command,
     156 * the obtained command must be returned to the client right after it gets processed,
     157 * the next PFNVBOXCRCMD_CLT_CMDGET call completes the previously submitted command,
     158 * Must not be called from the EMT thread.*/
     159typedef DECLCALLBACKPTR(int, PFNVBOXCRCMD_CLT_CMDGET)(HVBOXCRCMDCLT hClt, PVBOXCMDVBVA_HDR *ppNextCmd, uint32_t *pcbNextCmd);
     160
     161/* Client callbacks (i.e. those client exposes to the server) */
     162typedef struct VBOXCRCMD_CLTINFO
     163{
     164    HVBOXCRCMDCLT hClient;
     165    PFNVBOXCRCMD_CLT_CMDGET pfnCmdGet;
     166} VBOXCRCMD_CLTINFO;
     167
     168
     169
    142170#endif /* #ifndef ___VBox_VBoxVideo3D_h */
  • trunk/include/VBox/vmm/pdmifs.h

    r49420 r49474  
    750750     * @thread  The emulation thread.
    751751     */
     752    DECLR3CALLBACKMEMBER(int, pfnCrCmdNotifyCmds, (PPDMIDISPLAYCONNECTOR pInterface));
     753
     754    /**
     755     * Process the guest chromium command.
     756     *
     757     * @param   pInterface          Pointer to this interface.
     758     * @param   pCmd                Video HW Acceleration Command to be processed.
     759     * @thread  The emulation thread.
     760     */
    752761    DECLR3CALLBACKMEMBER(void, pfnCrHgsmiCommandProcess, (PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd));
    753762
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