VirtualBox

Changeset 49474 in vbox


Ignore:
Timestamp:
Nov 14, 2013 6:49:54 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
90613
Message:

crOpenGL: some host bits for buffer-based command submission

Location:
trunk
Files:
13 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
  • trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp

    r44528 r49474  
    2626#include "HGSMI/HGSMIHostHlp.h"
    2727
     28#include <VBox/VBoxVideo3D.h>
     29
    2830#ifdef VBOX_VDMA_WITH_WORKERTHREAD
    2931typedef enum
     
    206208}
    207209
     210static DECLCALLBACK(int) vboxVDMACrCmdCltCmdGet(HVBOXCRCMDCLT hClt, PVBOXCMDVBVA_HDR *ppNextCmd, uint32_t *pcbNextCmd)
     211{
     212    return VERR_NOT_IMPLEMENTED;
     213}
     214
    208215static int vboxVDMACrCtlHgsmiSetup(struct VBOXVDMAHOST *pVdma)
    209216{
     
    213220    if (pCmd)
    214221    {
     222        VBOXCRCMD_CLTINFO CltInfo;
     223        CltInfo.hClient = pVdma;
     224        CltInfo.pfnCmdGet = vboxVDMACrCmdCltCmdGet;
    215225        PVGASTATE pVGAState = pVdma->pVGAState;
    216226        pCmd->pvVRamBase = pVGAState->vram_ptrR3;
    217227        pCmd->cbVRam = pVGAState->vram_size;
     228        pCmd->pCrCmdClientInfo = &CltInfo;
    218229        int rc = vboxVDMACrCtlPost(pVGAState, &pCmd->Hdr, sizeof (*pCmd));
    219230        Assert(RT_SUCCESS(rc) || rc == VERR_NOT_SUPPORTED);
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_protocol.h

    r46966 r49474  
    103103    unsigned int *pcbWriteback;
    104104    unsigned int cbWriteback;
     105    bool fCompleteNeeded;
    105106} CRVBOXHGSMI_CMDDATA, *PCRVBOXHGSMI_CMDDATA;
    106107
     
    140141#endif
    141142
     143#define CRVBOXHGSMI_CMDDATA_IS_COMPLETE_NEEDED(_pData) (!!(_pData)->fCompleteNeeded)
    142144#define CRVBOXHGSMI_CMDDATA_IS_SET(_pData) (!!(_pData)->pCmd)
    143145#define CRVBOXHGSMI_CMDDATA_IS_SETWB(_pData) (!!(_pData)->pWriteback)
     
    149151    } while (0)
    150152
    151 #define CRVBOXHGSMI_CMDDATA_SET(_pData, _pCmd, _pHdr) do { \
     153#define CRVBOXHGSMI_CMDDATA_SET(_pData, _pCmd, _pHdr, _fCompleteNeeded) do { \
    152154        CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(_pData); \
    153155        (_pData)->pCmd = (_pCmd); \
    154156        (_pData)->pCmdRc = &(_pHdr)->result; \
    155         CRVBOXHGSMI_CMDDATA_ASSERT_CONSISTENT(_pData); \
    156     } while (0)
    157 
    158 #define CRVBOXHGSMI_CMDDATA_SETWB(_pData, _pCmd, _pHdr, _pWb, _cbWb, _pcbWb) do { \
    159         CRVBOXHGSMI_CMDDATA_SET(_pData, _pCmd, _pHdr); \
     157        (_pData)->fCompleteNeeded = _fCompleteNeeded; \
     158        CRVBOXHGSMI_CMDDATA_ASSERT_CONSISTENT(_pData); \
     159    } while (0)
     160
     161#define CRVBOXHGSMI_CMDDATA_SETWB(_pData, _pCmd, _pHdr, _pWb, _cbWb, _pcbWb, _fCompleteNeeded) do { \
     162        CRVBOXHGSMI_CMDDATA_SET(_pData, _pCmd, _pHdr, _fCompleteNeeded); \
    160163        (_pData)->pWriteback = (_pWb); \
    161164        (_pData)->pcbWriteback = (_pcbWb); \
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h

    r48099 r49474  
    3434#endif
    3535#include <VBox/Hardware/VBoxVideoVBE.h>
     36#include <VBox/VBoxVideo3D.h>
    3637
    3738#include "cr_vreg.h"
     
    456457    uint32_t fBlitterMode;
    457458    CR_BLITTER Blitter;
     459
     460    VBOXCRCMD_CLTINFO CltInfo;
    458461
    459462    CR_SERVER_RPW RpwWorker;
     
    611614extern DECLEXPORT(int32_t) crVBoxServerCrHgsmiCmd(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd, uint32_t cbCmd);
    612615extern DECLEXPORT(int32_t) crVBoxServerCrHgsmiCtl(struct VBOXVDMACMD_CHROMIUM_CTL *pCtl, uint32_t cbCtl);
     616
     617extern DECLEXPORT(int32_t) crVBoxServerCrCmdNotifyCmds();
    613618#endif
    614619
  • trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp

    r49163 r49474  
    953953    switch (u32Function)
    954954    {
     955        case SHCRGL_HOST_FN_CRCMD_NOTIFY_CMDS:
     956        {
     957            rc = crVBoxServerCrCmdNotifyCmds();
     958        } break;
    955959#ifdef VBOX_WITH_CRHGSMI
    956960        case SHCRGL_HOST_FN_CRHGSMI_CMD:
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h

    r49172 r49474  
    4848
    4949#define VBOXCRHGSMI_CMD_CHECK_COMPLETE(_pData, _rc) do { \
    50         if (CRVBOXHGSMI_CMDDATA_IS_SET(_pData)) { \
     50        if (CRVBOXHGSMI_CMDDATA_IS_COMPLETE_NEEDED(_pData) && CRVBOXHGSMI_CMDDATA_IS_SET(_pData)) { \
    5151            VBOXCRHGSMI_CMD_COMPLETE(_pData, _rc); \
    5252        } \
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c

    r48798 r49474  
    30563056 * NOTE: it is ALWAYS responsibility of the crVBoxServerCrHgsmiCmd to complete the command!
    30573057 * */
    3058 int32_t crVBoxServerCrHgsmiCmd(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd, uint32_t cbCmd)
     3058static int32_t crVBoxServerCrHgsmiCmdProcess(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd, bool fCompleteNeeded)
    30593059{
    30603060    int32_t rc;
     
    30703070    {
    30713071        crWarning("g_pvVRamBase is not initialized");
     3072        if (!fCompleteNeeded)
     3073            return VERR_INVALID_STATE;
     3074
    30723075        crServerCrHgsmiCmdComplete(pCmd, VERR_INVALID_STATE);
    30733076        return VINF_SUCCESS;
     
    30773080    {
    30783081        crWarning("zero buffers passed in!");
     3082        if (!fCompleteNeeded)
     3083            return VERR_INVALID_PARAMETER;
     3084
    30793085        crServerCrHgsmiCmdComplete(pCmd, VERR_INVALID_PARAMETER);
    30803086        return VINF_SUCCESS;
     
    30883094    {
    30893095        crWarning("invalid header buffer!");
     3096        if (!fCompleteNeeded)
     3097            return VERR_INVALID_PARAMETER;
     3098
    30903099        crServerCrHgsmiCmdComplete(pCmd, VERR_INVALID_PARAMETER);
    30913100        return VINF_SUCCESS;
     
    30953104    {
    30963105        crWarning("invalid header buffer size!");
     3106        if (!fCompleteNeeded)
     3107            return VERR_INVALID_PARAMETER;
     3108
    30973109        crServerCrHgsmiCmdComplete(pCmd, VERR_INVALID_PARAMETER);
    30983110        return VINF_SUCCESS;
     
    31443156                pClient->conn->pBuffer = pBuffer;
    31453157                pClient->conn->cbBuffer = cbBuffer;
    3146                 CRVBOXHGSMI_CMDDATA_SET(&pClient->conn->CmdData, pCmd, pHdr);
     3158                CRVBOXHGSMI_CMDDATA_SET(&pClient->conn->CmdData, pCmd, pHdr, fCompleteNeeded);
    31473159                rc = crVBoxServerInternalClientWriteRead(pClient);
    31483160                CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(&pClient->conn->CmdData);
     
    31993211                pClient->conn->pBuffer = pBuffer;
    32003212                pClient->conn->cbBuffer = cbBuffer;
    3201                 CRVBOXHGSMI_CMDDATA_SET(&pClient->conn->CmdData, pCmd, pHdr);
     3213                CRVBOXHGSMI_CMDDATA_SET(&pClient->conn->CmdData, pCmd, pHdr, fCompleteNeeded);
    32023214                rc = crVBoxServerInternalClientWriteRead(pClient);
    32033215                CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(&pClient->conn->CmdData);
     
    32553267                /* the read command is never pended, complete it right away */
    32563268                pHdr->result = rc;
     3269
     3270                if (!fCompleteNeeded)
     3271                    return VINF_SUCCESS;
     3272
    32573273                crServerCrHgsmiCmdComplete(pCmd, VINF_SUCCESS);
    32583274                return VINF_SUCCESS;
     
    33193335                pClient->conn->pBuffer = pBuffer;
    33203336                pClient->conn->cbBuffer = cbBuffer;
    3321                 CRVBOXHGSMI_CMDDATA_SETWB(&pClient->conn->CmdData, pCmd, pHdr, pWriteback, cbWriteback, &pFnCmd->cbWriteback);
     3337                CRVBOXHGSMI_CMDDATA_SETWB(&pClient->conn->CmdData, pCmd, pHdr, pWriteback, cbWriteback, &pFnCmd->cbWriteback, fCompleteNeeded);
    33223338                rc = crVBoxServerInternalClientWriteRead(pClient);
    33233339                CRVBOXHGSMI_CMDDATA_ASSERT_CLEANED(&pClient->conn->CmdData);
     
    33563372    CRASSERT(RT_FAILURE(rc));
    33573373    pHdr->result = rc;
     3374
     3375    if (!fCompleteNeeded)
     3376        return rc;
     3377
    33583378    crServerCrHgsmiCmdComplete(pCmd, VINF_SUCCESS);
    33593379    return rc;
     3380}
     3381
     3382int32_t crVBoxServerCrHgsmiCmd(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd, uint32_t cbCmd)
     3383{
     3384    return crVBoxServerCrHgsmiCmdProcess(pCmd, true);
    33603385}
    33613386
     
    33713396            g_pvVRamBase = (uint8_t*)pSetup->pvVRamBase;
    33723397            g_cbVRam = pSetup->cbVRam;
     3398            cr_server.CltInfo = *pSetup->pCrCmdClientInfo;
    33733399            rc = VINF_SUCCESS;
    33743400            break;
     
    33993425    return rc;
    34003426}
    3401 #endif
     3427
     3428static int32_t crVBoxServerCrCmdProcess(PVBOXCMDVBVA_HDR pCmd, uint32_t cbCmd)
     3429{
     3430    switch (pCmd->u8OpCode)
     3431    {
     3432        case VBOXCMDVBVA_OPTYPE_CRCMD:
     3433        {
     3434            VBOXCMDVBVA_CRCMD *pCrCmdDr = (VBOXCMDVBVA_CRCMD*)pCmd;
     3435            VBOXCMDVBVAOFFSET offCmd = pCrCmdDr->offCmd;
     3436            if (offCmd < g_cbVRam && offCmd + cbCmd < g_cbVRam)
     3437            {
     3438                VBOXVDMACMD_CHROMIUM_CMD *pCrCmd = (VBOXVDMACMD_CHROMIUM_CMD*)(g_pvVRamBase + offCmd);
     3439                crVBoxServerCrHgsmiCmdProcess(pCrCmd, false);
     3440                /* success */
     3441                pCmd->i8Result = 0;
     3442            }
     3443            else
     3444            {
     3445                crWarning("incorrect command info!");
     3446                pCmd->i8Result = -1;
     3447            }
     3448            break;
     3449        }
     3450        default:
     3451            crWarning("unsupported command");
     3452            pCmd->i8Result = -1;
     3453    }
     3454    return VINF_SUCCESS;
     3455}
     3456
     3457int32_t crVBoxServerCrCmdNotifyCmds()
     3458{
     3459    PVBOXCMDVBVA_HDR pCmd = NULL;
     3460    uint32_t cbCmd;
     3461
     3462    for (;;)
     3463    {
     3464        int rc = cr_server.CltInfo.pfnCmdGet(cr_server.CltInfo.hClient, &pCmd, &cbCmd);
     3465        if (rc == VINF_EOF)
     3466            return VINF_SUCCESS;
     3467        if (!RT_SUCCESS(rc))
     3468            return rc;
     3469
     3470        rc = crVBoxServerCrCmdProcess(pCmd, cbCmd);
     3471        if (!RT_SUCCESS(rc))
     3472            return rc;
     3473    }
     3474
     3475    /* should not be here! */
     3476    AssertFailed();
     3477    return VERR_INTERNAL_ERROR;
     3478}
     3479#endif
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c

    r48726 r49474  
    318318}
    319319
    320 static bool crServerVBoxTranslateIntersectRect(CRMuralInfo *mural, const RTRECT *pSrcRect, PRTRECT pDstRect)
    321 {
    322     int32_t xLeft = RT_MAX(mural->gX, pSrcRect->xRight);
    323     int32_t yTop = RT_MAX(mural->gY, pSrcRect->yBottom);
    324     int32_t xRight = RT_MIN(mural->gX + mural->width, pSrcRect->xLeft);
    325     int32_t yBottom = RT_MIN(mural->gY + mural->height, pSrcRect->yTop);
    326 
    327     if (xLeft < xRight && yTop < yBottom)
    328     {
    329         pDstRect->xLeft = xLeft;
    330         pDstRect->yTop = yTop;
    331         pDstRect->xRight = xRight;
    332         pDstRect->yBottom = yBottom;
    333         return true;
    334     }
    335 
    336     return false;
    337 }
    338 
    339320static void crServerVBoxRootVrTranslateForMural(CRMuralInfo *mural)
    340321{
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r49420 r49474  
    150150#endif
    151151#ifdef VBOX_WITH_CRHGSMI
    152     void handleCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd);
    153     void handleCrHgsmiControlProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl);
     152    int handleCrCmdNotifyCmds();
     153    void handleCrHgsmiCommandProcess(PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd);
     154    void handleCrHgsmiControlProcess(PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl);
    154155
    155156    void handleCrHgsmiCommandCompletion(int32_t result, uint32_t u32Function, PVBOXHGCMSVCPARM pParam);
     
    229230
    230231#ifdef VBOX_WITH_CRHGSMI
     232    static DECLCALLBACK(int)  displayCrCmdNotifyCmds(PPDMIDISPLAYCONNECTOR pInterface);
    231233    static DECLCALLBACK(void)  displayCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd);
    232234    static DECLCALLBACK(void)  displayCrHgsmiControlProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl);
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r49420 r49474  
    38603860}
    38613861
    3862 void Display::handleCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd)
     3862int Display::handleCrCmdNotifyCmds()
     3863{
     3864    int rc = VERR_INVALID_FUNCTION;
     3865
     3866    if (mhCrOglSvc)
     3867    {
     3868        VBOXHGCMSVCPARM dummy;
     3869        VMMDev *pVMMDev = mParent->getVMMDev();
     3870        if (pVMMDev)
     3871        {
     3872            /* no completion callback is specified with this call,
     3873             * the CrOgl code will complete the CrHgsmi command once it processes it */
     3874            rc = pVMMDev->hgcmHostFastCallAsync(mhCrOglSvc, SHCRGL_HOST_FN_CRCMD_NOTIFY_CMDS, &dummy, NULL, NULL);
     3875            AssertRC(rc);
     3876        }
     3877        else
     3878            rc = VERR_INVALID_STATE;
     3879    }
     3880
     3881    return rc;
     3882}
     3883
     3884void Display::handleCrHgsmiCommandProcess(PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd)
    38633885{
    38643886    int rc = VERR_INVALID_FUNCTION;
     
    38883910}
    38893911
    3890 void Display::handleCrHgsmiControlProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl)
     3912void Display::handleCrHgsmiControlProcess(PVBOXVDMACMD_CHROMIUM_CTL pCtl, uint32_t cbCtl)
    38913913{
    38923914    int rc = VERR_INVALID_FUNCTION;
     
    39143936}
    39153937
     3938DECLCALLBACK(int)  Display::displayCrCmdNotifyCmds(PPDMIDISPLAYCONNECTOR pInterface)
     3939{
     3940    PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface);
     3941
     3942    return pDrv->pDisplay->handleCrCmdNotifyCmds();
     3943}
    39163944
    39173945DECLCALLBACK(void) Display::displayCrHgsmiCommandProcess(PPDMIDISPLAYCONNECTOR pInterface, PVBOXVDMACMD_CHROMIUM_CMD pCmd, uint32_t cbCmd)
     
    39193947    PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface);
    39203948
    3921     pDrv->pDisplay->handleCrHgsmiCommandProcess(pInterface, pCmd, cbCmd);
     3949    pDrv->pDisplay->handleCrHgsmiCommandProcess(pCmd, cbCmd);
    39223950}
    39233951
     
    39263954    PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface);
    39273955
    3928     pDrv->pDisplay->handleCrHgsmiControlProcess(pInterface, pCmd, cbCmd);
     3956    pDrv->pDisplay->handleCrHgsmiControlProcess(pCmd, cbCmd);
    39293957}
    39303958
     
    44994527#endif
    45004528#ifdef VBOX_WITH_CRHGSMI
     4529    pThis->IConnector.pfnCrCmdNotifyCmds =  Display::displayCrCmdNotifyCmds;
    45014530    pThis->IConnector.pfnCrHgsmiCommandProcess = Display::displayCrHgsmiCommandProcess;
    45024531    pThis->IConnector.pfnCrHgsmiControlProcess = Display::displayCrHgsmiControlProcess;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette