Changeset 43487 in vbox for trunk/src/VBox
- Timestamp:
- Oct 1, 2012 11:53:15 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 81047
- Location:
- trunk/src/VBox
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/context.c
r42520 r43487 108 108 } 109 109 110 void stubConFlush(GLint con) 111 { 112 if (con) 113 stub.spu->dispatch_table.VBoxConFlush(con); 114 else 115 crError("stubConFlush called with null connection"); 116 } 117 110 118 static void stubWindowCleanupForContextsCB(unsigned long key, void *data1, void *data2) 111 119 { … … 190 198 if (stub.bRunningUnderWDDM) 191 199 { 192 crError("Should not be here: WindowCreate/Destroy & VBoxPackGetInjectID re cuire connection id!");200 crError("Should not be here: WindowCreate/Destroy & VBoxPackGetInjectID require connection id!"); 193 201 winInfo->mapped = 0; 194 202 } -
trunk/src/VBox/Additions/common/crOpenGL/defs.py
r42499 r43487 496 496 crSwapBuffers 497 497 crGetProcAddress 498 VBoxCreateContext""" 498 VBoxCreateContext 499 VBoxGetWindowId 500 VBoxFlushToHost""" 499 501 #print "DllMain" -
trunk/src/VBox/Additions/common/crOpenGL/defs64.py
r42499 r43487 477 477 crSwapBuffers 478 478 crGetProcAddress 479 VBoxCreateContext""" 479 VBoxCreateContext 480 VBoxGetWindowId 481 VBoxFlushToHost""" 480 482 #print "DllMain" -
trunk/src/VBox/Additions/common/crOpenGL/load.c
r42536 r43487 974 974 } 975 975 } 976 # endif 976 # endif /* VBOX_WITH_WDDM */ 977 977 978 978 static void stubSyncTrCheckWindowsCB(unsigned long key, void *data1, void *data2) … … 1054 1054 stub.trackWindowVisibleRgn = 0; 1055 1055 stub.bRunningUnderWDDM = true; 1056 #ifdef VBOX_WDDM_MINIPORT_WITH_VISIBLE_RECTS 1057 crError("should not be here, visible rects should be processed in miniport!"); 1058 #endif 1056 1059 } 1057 1060 } … … 1164 1167 return 0; 1165 1168 } 1166 #endif 1169 #endif /* CR_NEWWINTRACK */ 1167 1170 1168 1171 /** … … 1204 1207 disable_sync = 1; 1205 1208 } 1209 #elif defined(WINDOWS) && defined(VBOX_WITH_WDDM) && defined(VBOX_WDDM_MINIPORT_WITH_VISIBLE_RECTS) 1210 if (GetModuleHandle(VBOX_MODNAME_DISPD3D)) 1211 { 1212 disable_sync = 1; 1213 crDebug("running with " VBOX_MODNAME_DISPD3D); 1214 stub.trackWindowVisibleRgn = 0; 1215 stub.bRunningUnderWDDM = true; 1216 } 1206 1217 #endif 1207 1218 … … 1367 1378 #ifdef VDBG_VEHANDLER 1368 1379 static PVOID g_VBoxWDbgVEHandler = NULL; 1380 static DWORD g_VBoxWDbgVEHExit = 1; 1369 1381 LONG WINAPI vboxVDbgVectoredHandler(struct _EXCEPTION_POINTERS *pExceptionInfo) 1370 1382 { … … 1382 1394 case EXCEPTION_ILLEGAL_INSTRUCTION: 1383 1395 CRASSERT(0); 1396 if (g_VBoxWDbgVEHExit) 1397 exit(1); 1384 1398 break; 1385 1399 default: -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c
r42591 r43487 131 131 CRASSERT(thread->packer); 132 132 packspuFlush((void *) thread); 133 #else 134 crError("VBoxConFlush not implemented!"); 133 135 #endif 134 136 } -
trunk/src/VBox/Additions/common/crOpenGL/stub.h
r42518 r43487 355 355 356 356 extern void stubForcedFlush(GLint con); 357 extern void stubConFlush(GLint con); 357 358 extern void APIENTRY stub_GetChromiumParametervCR( GLenum target, GLuint index, GLenum type, GLsizei count, GLvoid *values ); 358 359 -
trunk/src/VBox/Additions/common/crOpenGL/wgl.c
r42499 r43487 325 325 } 326 326 327 GLint WINAPI VBoxGetWindowId( HDC hdc ) 328 { 329 WindowInfo *window = stubGetWindowInfo(hdc); 330 if (!window) 331 { 332 CRASSERT(0); 333 crWarning("stubGetWindowInfo: window not found!"); 334 return 0; 335 } 336 if (!window->spuWindow) 337 { 338 CRASSERT(0); 339 crWarning("stubGetWindowInfo: window is null!"); 340 return 0; 341 } 342 return window->spuWindow; 343 } 344 327 345 HGLRC WINAPI wglCreateContext_prox( HDC hdc ) 328 346 { 329 347 return VBoxCreateContext(hdc, NULL); 348 } 349 350 void WINAPI VBoxFlushToHost ( HGLRC hglrc ) 351 { 352 ContextInfo *context; 353 354 CR_DDI_PROLOGUE(); 355 356 // crHashtableLock(stub.windowTable); 357 crHashtableLock(stub.contextTable); 358 359 context = (ContextInfo *) crHashtableSearch(stub.contextTable, (unsigned long) hglrc); 360 361 if (context) 362 stubConFlush(CR_CTX_CON(context)); 363 364 crHashtableUnlock(stub.contextTable); 365 // crHashtableUnlock(stub.windowTable); 330 366 } 331 367 -
trunk/src/VBox/GuestHost/OpenGL/include/cr_pack.h
r42028 r43487 118 118 extern DECLEXPORT(int) crPackMaxOpcodes( int buffer_size ); 119 119 extern DECLEXPORT(int) crPackMaxData( int buffer_size ); 120 extern DECLEXPORT(void) crPackInitBuffer( CRPackBuffer *buffer, void *buf, int size, int mtu ); 120 extern DECLEXPORT(void) crPackInitBuffer( CRPackBuffer *buffer, void *buf, int size, int mtu 121 #ifdef IN_RING0 122 , unsigned int num_opcodes 123 #endif 124 ); 121 125 extern DECLEXPORT(void) crPackFlushFunc( CRPackContext *pc, CRPackFlushFunc ff ); 122 126 extern DECLEXPORT(void) crPackFlushArg( CRPackContext *pc, void *flush_arg ); -
trunk/src/VBox/GuestHost/OpenGL/packer/pack_buffer.c
r42028 r43487 150 150 CRPackBuffer *buf = pc->currentBuffer; 151 151 CRASSERT(buf); 152 crPackInitBuffer( buf, buf->pack, buf->size, buf->mtu ); 152 crPackInitBuffer( buf, buf->pack, buf->size, buf->mtu 153 #ifdef IN_RING0 154 , 0 155 #endif 156 ); 153 157 pc->buffer.geometry_only = geom_only; /* restore the flag */ 154 158 pc->buffer.holds_BeginEnd = holds_BeginEnd; … … 222 226 * be somewhat smaller than the buffer size. 223 227 */ 224 void crPackInitBuffer( CRPackBuffer *buf, void *pack, int size, int mtu ) 225 { 228 void crPackInitBuffer( CRPackBuffer *buf, void *pack, int size, int mtu 229 #ifdef IN_RING0 230 , unsigned int num_opcodes 231 #endif 232 ) 233 { 234 #ifndef IN_RING0 226 235 unsigned int num_opcodes; 236 #endif 227 237 228 238 CRASSERT(mtu <= size); … … 232 242 buf->pack = pack; 233 243 234 num_opcodes = crPackMaxOpcodes( buf->size ); 244 #ifdef IN_RING0 245 if(!num_opcodes) 246 #endif 247 { 248 num_opcodes = crPackMaxOpcodes( buf->size ); 249 } 235 250 236 251 buf->data_start = -
trunk/src/VBox/GuestHost/OpenGL/packer/pack_visibleregion.c
r33475 r43487 23 23 #endif 24 24 25 void PACK_APIENTRY crPackWindowVisibleRegion( GLint window, GLint cRects, GLint * pRects )25 void PACK_APIENTRY crPackWindowVisibleRegion( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint cRects, GLint * pRects ) 26 26 { 27 27 GLint i, size, cnt; … … 50 50 } 51 51 52 void PACK_APIENTRY crPackWindowVisibleRegionSWAP( GLint window, GLint cRects, GLint * pRects )52 void PACK_APIENTRY crPackWindowVisibleRegionSWAP( CR_PACKER_CONTEXT_ARGDECL GLint window, GLint cRects, GLint * pRects ) 53 53 { 54 54 crError( "crPackWindowVisibleRegionSWAP unimplemented and shouldn't be called" ); -
trunk/src/VBox/GuestHost/OpenGL/packer/packer.py
r33475 r43487 114 114 """Emit a packer function.""" 115 115 if is_swapped: 116 print 'void PACK_APIENTRY crPack%sSWAP( %s )' % (func_name, apiutil.MakeDeclarationString (params))117 else: 118 print 'void PACK_APIENTRY crPack%s( %s )' % (func_name, apiutil.MakeDeclarationString (params))116 print 'void PACK_APIENTRY crPack%sSWAP( %s )' % (func_name, apiutil.MakeDeclarationStringWithContext('CR_PACKER_CONTEXT', params)) 117 else: 118 print 'void PACK_APIENTRY crPack%s( %s )' % (func_name, apiutil.MakeDeclarationStringWithContext('CR_PACKER_CONTEXT', params)) 119 119 print '{' 120 120 print '\tCR_GET_PACKER_CONTEXT(pc);'
Note:
See TracChangeset
for help on using the changeset viewer.