Changeset 20084 in vbox
- Timestamp:
- May 27, 2009 1:26:41 PM (16 years ago)
- Location:
- trunk/src/VBox/Additions/common/crOpenGL
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/Makefile.kmk
r19099 r20084 351 351 pack/packspu_swapbuf.c \ 352 352 pack/packspu_pixel.c \ 353 pack/packspu_texture.c \ 353 354 $(VBOX_PATH_CROGL_GENFILES)/packspu.c \ 354 355 $(VBOX_PATH_CROGL_GENFILES)/packspu_get.c \ -
trunk/src/VBox/Additions/common/crOpenGL/load.c
r20029 r20084 544 544 if (stub_initialized) 545 545 return true; 546 546 547 547 stubInitVars(); 548 548 -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu.h
r15532 r20084 83 83 extern void packspuHuge( CROpcode opcode, void *buf ); 84 84 85 extern GLboolean packspuSyncOnFlushes(); 86 85 87 extern ThreadInfo *packspuNewThread( unsigned long id ); 86 88 -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_flush_special
r15532 r20084 3 3 # 4 4 # See the file LICENSE.txt for information on redistributing this software. 5 Flush6 5 BarrierCreateCR 7 6 BarrierExecCR -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_get.py
r20083 r20084 86 86 print '\t\tpname == GL_PACK_IMAGE_HEIGHT ||' 87 87 print '#endif' 88 print '\t\tpname == GL_PACK_SKIP_ROWS) {' 88 print '\t\tpname == GL_PACK_SKIP_ROWS' 89 print '\t\t|| pname == GL_DRAW_BUFFER' 90 print '#ifdef CR_OPENGL_VERSION_1_3' 91 print '\t\t|| pname == GL_ACTIVE_TEXTURE' 92 print '#endif' 93 print '#ifdef CR_ARB_multitexture' 94 print '\t\t|| pname == GL_ACTIVE_TEXTURE_ARB' 95 print '#endif' 96 print ') {' 89 97 print '\t\t\tcrState%s( pname, params );' % func_name 90 98 print '\t\t\treturn;' -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c
r20083 r20084 41 41 } 42 42 43 GLboolean packspuSyncOnFlushes() 44 { 45 GLint buffer; 46 crStateGetIntegerv(GL_DRAW_BUFFER, &buffer); 47 /*Usually buffer==GL_BACK, so put this extra check to simplify boolean eval on runtime*/ 48 return (buffer != GL_BACK) 49 && (buffer == GL_FRONT_LEFT 50 || buffer == GL_FRONT_RIGHT 51 || buffer == GL_FRONT 52 || buffer == GL_FRONT_AND_BACK 53 || buffer == GL_LEFT 54 || buffer == GL_RIGHT); 55 } 56 57 void PACKSPU_APIENTRY packspu_DrawBuffer(GLenum mode) 58 { 59 crStateDrawBuffer(mode); 60 crPackDrawBuffer(mode); 61 } 62 43 63 void PACKSPU_APIENTRY packspu_Finish( void ) 44 64 { 45 65 GET_THREAD(thread); 46 66 GLint writeback = pack_spu.thread[0].netServer.conn->actual_network; 47 if (pack_spu.swap) 48 { 49 crPackFinishSWAP( ); 67 68 if (pack_spu.swap) 69 { 70 crPackFinishSWAP(); 71 } 72 else 73 { 74 crPackFinish(); 75 } 76 77 if (packspuSyncOnFlushes()) 78 { 79 packspuFlush( (void *) thread ); 80 50 81 if (writeback) 51 crPackWritebackSWAP( &writeback ); 52 } 53 else 54 { 55 crPackFinish( ); 56 if (writeback) 57 crPackWriteback( &writeback ); 58 } 59 packspuFlush( (void *) thread ); 60 while (writeback) 61 crNetRecv(); 62 } 63 82 if (pack_spu.swap) 83 crPackWritebackSWAP(&writeback); 84 else 85 crPackWriteback(&writeback); 86 87 while (writeback) 88 crNetRecv(); 89 } 90 } 91 92 void PACKSPU_APIENTRY packspu_Flush( void ) 93 { 94 GET_THREAD(thread); 95 if (pack_spu.swap) 96 { 97 crPackFlushSWAP(); 98 } 99 else 100 { 101 crPackFlush(); 102 } 103 104 if (packspuSyncOnFlushes()) 105 { 106 packspuFlush( (void *) thread ); 107 } 108 } 64 109 65 110 GLint PACKSPU_APIENTRY packspu_WindowCreate( const char *dpyName, GLint visBits ) -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_net.c
r15532 r20084 151 151 152 152 if ( buf->holds_BeginEnd ) 153 { 154 /*crDebug("crNetBarf %d, (%d)", len, buf->size);*/ 153 155 crNetBarf( thread->netServer.conn, &(buf->pack), hdr, len ); 156 } 154 157 else 158 { 159 /*crDebug("crNetSend %d, (%d)", len, buf->size);*/ 155 160 crNetSend( thread->netServer.conn, &(buf->pack), hdr, len ); 161 } 156 162 157 163 buf->pack = crNetAlloc( thread->netServer.conn ); -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_special
r15532 r20084 61 61 BufferDataARB 62 62 ZPixCR 63 ActiveTextureARB 64 DrawBuffer 65 Flush -
trunk/src/VBox/Additions/common/crOpenGL/stub.c
r16748 r20084 14 14 #include <X11/extensions/Xfixes.h> 15 15 #endif 16 17 static void crForcedFlush() 18 { 19 GLint buffer; 20 stub.spu->dispatch_table.GetIntegerv(GL_DRAW_BUFFER, &buffer); 21 stub.spu->dispatch_table.DrawBuffer(GL_FRONT); 22 stub.spu->dispatch_table.Flush(); 23 stub.spu->dispatch_table.DrawBuffer(buffer); 24 } 16 25 17 26 /** … … 100 109 } 101 110 #endif 102 stub.spu->dispatch_table.Flush();111 crForcedFlush(); 103 112 104 113 crHashtableDelete(stub.windowTable, window, crFree); … … 303 312 if (stubUpdateWindowGeometry(winInfo, GL_FALSE) || changed) 304 313 { 305 stub.spuDispatch.Flush();314 crForcedFlush(); 306 315 } 307 316 break; … … 317 326 if (stub.trackWindowVisibleRgn && stubUpdateWindowVisibileRegions(winInfo)) 318 327 { 319 stub.spuDispatch.Flush();328 crForcedFlush(); 320 329 } 321 330 break; … … 327 336 { 328 337 crDebug("Visibility info updated due to unknown hooked message (%d)", pMsgInfo->message); 329 stub.spuDispatch.Flush();338 crForcedFlush(); 330 339 } 331 340 break;
Note:
See TracChangeset
for help on using the changeset viewer.