Changeset 33988 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Nov 11, 2010 1:03:17 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 67651
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/glapi_parser/APIspec.txt
r33540 r33988 8516 8516 chromium nopack 8517 8517 8518 name VBoxPackAttachThread 8519 return void 8520 category VBox 8521 chromium nopack 8522 8523 name VBoxPackDetachThread 8524 return void 8525 category VBox 8526 chromium nopack 8527 8518 8528 # OpenGL 1.5 8519 8529 -
trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
r33750 r33988 26 26 #endif 27 27 28 #define SHCROGL_SSM_VERSION 2 128 #define SHCROGL_SSM_VERSION 22 29 29 30 30 #define CR_MAX_WINDOWS 100 … … 78 78 CRConnection *conn; /**< network connection from the client */ 79 79 int number; /**< a unique number for each client */ 80 uint64_t pid; /*guest pid*/ 80 81 GLint currentContextNumber; 81 82 CRContext *currentCtx; … … 89 90 } CRClient; 90 91 92 typedef struct _crclientnode { 93 CRClient *pClient; 94 struct _crclientnode *prev, *next; 95 } CRClientNode; 96 91 97 typedef struct CRPoly_t { 92 98 int npoints; … … 127 133 CRClient *clients[CR_MAX_CLIENTS]; /**< array [numClients] */ 128 134 CRClient *curClient; 135 CRClientNode *pCleanupClient; /*list of clients with pending clean up*/ 129 136 CRCurrentStatePointers current; 130 137 … … 238 245 extern DECLEXPORT(int32_t) crVBoxServerClientRead(uint32_t u32ClientID, uint8_t *pBuffer, uint32_t *pcbBuffer); 239 246 extern DECLEXPORT(int32_t) crVBoxServerClientSetVersion(uint32_t u32ClientID, uint32_t vMajor, uint32_t vMinor); 247 extern DECLEXPORT(int32_t) crVBoxServerClientSetPID(uint32_t u32ClientID, uint64_t pid); 240 248 241 249 extern DECLEXPORT(int32_t) crVBoxServerSaveState(PSSMHANDLE pSSM); -
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r33929 r33988 35 35 #include "cr_threads.h" 36 36 #include "net_internals.h" 37 #include "cr_process.h" 37 38 38 39 #include <iprt/thread.h> … … 1250 1251 } 1251 1252 1253 static 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 1252 1279 /** 1253 1280 * The function that actually connects. This should only be called by clients, … … 1322 1349 if (ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &Hdr) >= 0) 1323 1350 #else 1324 /*@todo it'd fail */1325 1351 if (ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &info, sizeof (info)) >= 0) 1326 1352 #endif … … 1328 1354 if (info.result == VINF_SUCCESS) 1329 1355 { 1356 int rc; 1330 1357 conn->u32ClientID = info.u32ClientID; 1331 1358 crDebug("HGCM connect was successful: client id =0x%x\n", conn->u32ClientID); 1332 1359 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()); 1333 1366 VBOXCRHGSMIPROFILE_FUNC_EPILOGUE(); 1334 return crVBoxHGCMSetVersion(conn, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR);1367 return rc; 1335 1368 } 1336 1369 else -
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgsmi.c
r33595 r33988 37 37 #include "cr_threads.h" 38 38 #include "net_internals.h" 39 #include "cr_process.h" 39 40 40 41 #include <iprt/thread.h> … … 1171 1172 } 1172 1173 1174 static 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 1173 1200 /** 1174 1201 * The function that actually connects. This should only be called by clients, … … 1242 1269 if (ioctl(g_crvboxhgsmi.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &Hdr) >= 0) 1243 1270 #else 1244 /*@todo it'd fail */1245 1271 if (ioctl(g_crvboxhgsmi.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CONNECT, &info, sizeof (info)) >= 0) 1246 1272 #endif … … 1253 1279 1254 1280 rc = crVBoxHGSMISetVersion(conn, CR_PROTOCOL_VERSION_MAJOR, CR_PROTOCOL_VERSION_MINOR); 1281 if (!rc) 1282 { 1283 return rc; 1284 } 1285 rc = crVBoxHGCMSetPID(conn, crGetPID()); 1255 1286 VBOXCRHGSMIPROFILE_FUNC_EPILOGUE(); 1256 1287 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.