VirtualBox

Changeset 33988 in vbox for trunk/src/VBox/GuestHost/OpenGL


Ignore:
Timestamp:
Nov 11, 2010 1:03:17 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67651
Message:

crOpenGL/wddm: more multithreading fixes, vista expirience index works now

Location:
trunk/src/VBox/GuestHost/OpenGL
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/glapi_parser/APIspec.txt

    r33540 r33988  
    85168516chromium    nopack
    85178517
     8518name        VBoxPackAttachThread
     8519return      void
     8520category    VBox
     8521chromium    nopack
     8522
     8523name        VBoxPackDetachThread
     8524return      void
     8525category    VBox
     8526chromium    nopack
     8527
    85188528# OpenGL 1.5
    85198529
  • trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h

    r33750 r33988  
    2626#endif
    2727
    28 #define SHCROGL_SSM_VERSION 21
     28#define SHCROGL_SSM_VERSION 22
    2929
    3030#define CR_MAX_WINDOWS 100
     
    7878    CRConnection *conn;       /**< network connection from the client */
    7979    int number;        /**< a unique number for each client */
     80    uint64_t pid;      /*guest pid*/
    8081    GLint currentContextNumber;
    8182    CRContext *currentCtx;
     
    8990} CRClient;
    9091
     92typedef struct _crclientnode {
     93    CRClient *pClient;
     94    struct _crclientnode *prev, *next;
     95} CRClientNode;
     96
    9197typedef struct CRPoly_t {
    9298    int npoints;
     
    127133    CRClient *clients[CR_MAX_CLIENTS];  /**< array [numClients] */
    128134    CRClient *curClient;
     135    CRClientNode *pCleanupClient;  /*list of clients with pending clean up*/
    129136    CRCurrentStatePointers current;
    130137
     
    238245extern DECLEXPORT(int32_t) crVBoxServerClientRead(uint32_t u32ClientID, uint8_t *pBuffer, uint32_t *pcbBuffer);
    239246extern DECLEXPORT(int32_t) crVBoxServerClientSetVersion(uint32_t u32ClientID, uint32_t vMajor, uint32_t vMinor);
     247extern DECLEXPORT(int32_t) crVBoxServerClientSetPID(uint32_t u32ClientID, uint64_t pid);
    240248
    241249extern DECLEXPORT(int32_t) crVBoxServerSaveState(PSSMHANDLE pSSM);
  • trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c

    r33929 r33988  
    3535#include "cr_threads.h"
    3636#include "net_internals.h"
     37#include "cr_process.h"
    3738
    3839#include <iprt/thread.h>
     
    12501251}
    12511252
     1253static int crVBoxHGCMSetPID(CRConnection *conn, CRpid pid)
     1254{
     1255    CRVBOXHGCMSETPID parms;
     1256    int rc;
     1257
     1258    parms.hdr.result      = VERR_WRONG_ORDER;
     1259    parms.hdr.u32ClientID = conn->u32ClientID;
     1260    parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_PID;
     1261    parms.hdr.cParms      = SHCRGL_CPARMS_SET_PID;
     1262
     1263    parms.u64PID.type     = VMMDevHGCMParmType_64bit;
     1264    parms.u64PID.u.value64 = (uintptr_t) pid;
     1265
     1266    rc = crVBoxHGCMCall(&parms, sizeof(parms));
     1267
     1268    if (RT_FAILURE(rc) || RT_FAILURE(parms.hdr.result))
     1269    {
     1270        Assert(0);
     1271
     1272        crWarning("SHCRGL_GUEST_FN_SET_PID failed!");
     1273        return FALSE;
     1274    }
     1275
     1276    return TRUE;
     1277}
     1278
    12521279/**
    12531280 * The function that actually connects.  This should only be called by clients,
     
    13221349    if (ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &Hdr) >= 0)
    13231350#else
    1324     /*@todo it'd fail */
    13251351    if (ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &info, sizeof (info)) >= 0)
    13261352#endif
     
    13281354        if (info.result == VINF_SUCCESS)
    13291355        {
     1356            int rc;
    13301357            conn->u32ClientID = info.u32ClientID;
    13311358            crDebug("HGCM connect was successful: client id =0x%x\n", conn->u32ClientID);
    13321359
     1360            rc = crVBoxHGCMSetVersion(conn, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR);
     1361            if (!rc)
     1362            {
     1363                return rc;
     1364            }
     1365            rc = crVBoxHGCMSetPID(conn, crGetPID());
    13331366            VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
    1334             return crVBoxHGCMSetVersion(conn, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR);
     1367            return rc;
    13351368        }
    13361369        else
  • trunk/src/VBox/GuestHost/OpenGL/util/vboxhgsmi.c

    r33595 r33988  
    3737#include "cr_threads.h"
    3838#include "net_internals.h"
     39#include "cr_process.h"
    3940
    4041#include <iprt/thread.h>
     
    11711172}
    11721173
     1174static int crVBoxHGSMISetPID(CRConnection *conn, CRpid pid)
     1175{
     1176    CRVBOXHGCMSETPID parms;
     1177    int rc;
     1178
     1179    parms.hdr.result      = VERR_WRONG_ORDER;
     1180    parms.hdr.u32ClientID = conn->u32ClientID;
     1181    parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_PID;
     1182    parms.hdr.cParms      = SHCRGL_CPARMS_SET_PID;
     1183
     1184    parms.u64PID.type     = VMMDevHGCMParmType_64bit;
     1185    parms.u64PID.u.value64 = (uintptr_t) pid;
     1186
     1187    rc = crVBoxHGCMCall(&parms, sizeof(parms));
     1188
     1189    if (RT_FAILURE(rc) || RT_FAILURE(parms.hdr.result))
     1190    {
     1191        Assert(0);
     1192
     1193        crWarning("SHCRGL_GUEST_FN_SET_PID failed!");
     1194        return FALSE;
     1195    }
     1196
     1197    return TRUE;
     1198}
     1199
    11731200/**
    11741201 * The function that actually connects.  This should only be called by clients,
     
    12421269    if (ioctl(g_crvboxhgsmi.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &Hdr) >= 0)
    12431270#else
    1244     /*@todo it'd fail */
    12451271    if (ioctl(g_crvboxhgsmi.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &info, sizeof (info)) >= 0)
    12461272#endif
     
    12531279
    12541280            rc = crVBoxHGSMISetVersion(conn, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR);
     1281            if (!rc)
     1282            {
     1283                return rc;
     1284            }
     1285            rc = crVBoxHGCMSetPID(conn, crGetPID());
    12551286            VBOXCRHGSMIPROFILE_FUNC_EPILOGUE();
    12561287            return rc;
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