Changeset 39288 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Nov 14, 2011 9:58:38 AM (13 years ago)
- Location:
- trunk/src/VBox/GuestHost/OpenGL
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/Makefile.kmk
r39252 r39288 139 139 VBoxOGLhostcrutil_LIBS = $(LIB_RUNTIME) 140 140 ifdef VBOX_WITH_CRHGSMI 141 VBoxOGLhostcrutil_DEFS .win = $(subst VBOX_WITH_CRHGSMI,,$(VBoxOGLcrutil_DEFS.win))141 VBoxOGLhostcrutil_DEFS += VBOX_WITH_CRHGSMI 142 142 VBoxOGLhostcrutil_LIBS.win = $(subst $(VBOX_PATH_ADDITIONS_LIB)/VBoxCrHgsmi$(VBOX_SUFF_LIB),,$(VBoxOGLcrutil_LIBS.win)) 143 143 endif -
trunk/src/VBox/GuestHost/OpenGL/include/cr_net.h
r33714 r39288 106 106 } CRMultiBuffer; 107 107 108 #if defined(VBOX_WITH_CRHGSMI) && defined(IN_GUEST) 108 #ifdef VBOX_WITH_CRHGSMI 109 # ifdef IN_GUEST 109 110 typedef struct CRVBOXHGSMI_CLIENT { 110 111 struct VBOXUHGSMI *pHgsmi; … … 114 115 struct CRBufferPool_t *bufpool; 115 116 } CRVBOXHGSMI_CLIENT, *PCRVBOXHGSMI_CLIENT; 116 #endif 117 #endif /* IN_GUEST */ 118 #endif /* #ifdef VBOX_WITH_CRHGSMI */ 117 119 /** 118 120 * Chromium network connection (bidirectional). … … 238 240 # endif 239 241 # endif 242 #else 243 # ifdef VBOX_WITH_CRHGSMI 244 struct _crclient *pClient; /* back reference, just for simplicity */ 245 CRVBOXHGSMI_CMDDATA CmdData; 246 # endif 240 247 #endif 241 248 /* Used on host side to indicate that we are not allowed to store above pointers for later use … … 277 284 extern DECLEXPORT(void) crNetReadline( CRConnection *conn, void *buf ); 278 285 extern DECLEXPORT(int) crNetRecv( void ); 286 #define CR_WRITEBACK_WAIT() do { \ 287 while (writeback) { \ 288 crNetRecv(); \ 289 } \ 290 } while (0) 279 291 extern DECLEXPORT(void) crNetDefaultRecv( CRConnection *conn, CRMessage *msg, unsigned int len ); 280 292 extern DECLEXPORT(void) crNetDispatchMessage( CRNetReceiveFuncList *rfl, CRConnection *conn, CRMessage *msg, unsigned int len ); -
trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
r37775 r39288 22 22 23 23 #include <VBox/vmm/ssm.h> 24 25 #ifdef VBOX_WITH_CRHGSMI 26 # include <VBox/VBoxVideo.h> 27 #endif 24 28 25 29 #ifdef __cplusplus … … 297 301 extern DECLEXPORT(int32_t) crVBoxServerOutputRedirectSet(const CROutputRedirect *pCallbacks); 298 302 303 #ifdef VBOX_WITH_CRHGSMI 304 /* We moved all CrHgsmi command processing to crserverlib to keep the logic of dealing with CrHgsmi commands in one place. 305 * 306 * For now we need the notion of CrHgdmi commands in the crserver_lib to be able to complete it asynchronously once it is really processed. 307 * This help avoiding the "blocked-client" issues. The client is blocked if another client is doing begin-end stuff. 308 * For now we eliminated polling that could occur on block, which caused a higher-priority thread (in guest) polling for the blocked command complition 309 * to block the lower-priority thread trying to complete the blocking command. 310 * And removed extra memcpy done on blocked command arrival. 311 * 312 * In the future we will extend CrHgsmi functionality to maintain texture data directly in CrHgsmi allocation to avoid extra memcpy-ing with PBO, 313 * implement command completion and stuff necessary for GPU scheduling to work properly for WDDM Windows guests, etc. 314 * 315 * NOTE: it is ALWAYS responsibility of the crVBoxServerCrHgsmiCmd to complete the command! 316 * */ 317 extern DECLEXPORT(int32_t) crVBoxServerCrHgsmiCmd(struct VBOXVDMACMD_CHROMIUM_CMD *pCmd); 318 extern DECLEXPORT(int32_t) crVBoxServerCrHgsmiCtl(struct VBOXVDMACMD_CHROMIUM_CTL *pCtl); 319 #endif 320 299 321 #ifdef __cplusplus 300 322 } -
trunk/src/VBox/GuestHost/OpenGL/include/cr_unpack.h
r15532 r39288 66 66 INCR_DATA_PTR( *((int *) cr_unpackData ) ) 67 67 68 #define SET_RETURN_PTR( offset ) \ 69 crMemcpy( return_ptr, cr_unpackData + (offset), sizeof( *return_ptr ) ); 68 #define SET_RETURN_PTR( offset ) do { \ 69 CRDBGPTR_CHECKZ(return_ptr); \ 70 crMemcpy( return_ptr, cr_unpackData + (offset), sizeof( *return_ptr ) ); \ 71 } while (0); 70 72 71 #define SET_WRITEBACK_PTR( offset ) \ 72 crMemcpy( writeback_ptr, cr_unpackData + (offset), sizeof( *writeback_ptr ) ); 73 74 #define SET_WRITEBACK_PTR( offset ) do { \ 75 CRDBGPTR_CHECKZ(writeback_ptr); \ 76 crMemcpy( writeback_ptr, cr_unpackData + (offset), sizeof( *writeback_ptr ) ); \ 77 } while (0); 73 78 74 79 #ifdef __cplusplus -
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r38314 r39288 1270 1270 msg->header.conn_id = msg->redirptr.pMessage->conn_id; 1271 1271 1272 #if defined(VBOX_WITH_CRHGSMI) && !defined(IN_GUEST) 1273 msg->redirptr.CmdData = conn->CmdData; 1274 CRVBOXHGSMI_CMDDATA_ASSERT_CONSISTENT(&msg->redirptr.CmdData); 1275 CRVBOXHGSMI_CMDDATA_CLEANUP(&conn->CmdData); 1276 #endif 1277 1272 1278 cached_type = msg->redirptr.pMessage->type; 1273 1279 … … 1278 1284 else 1279 1285 { 1286 /* we should NEVER have redir_ptr disabled with HGSMI command now */ 1287 CRASSERT(!conn->CmdData.pCmd); 1280 1288 if ( len <= conn->buffer_size ) 1281 1289 {
Note:
See TracChangeset
for help on using the changeset viewer.