VirtualBox

Ignore:
Timestamp:
Aug 9, 2011 11:50:44 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
73401
Message:

crOpenGL: don't add explicit writebacks to guest buffers

Location:
trunk/src/VBox/Additions/common/crOpenGL/pack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_context.c

    r38143 r38374  
    213213}
    214214
    215 #define PACK_FORCED_SYNC
    216 
    217215void PACKSPU_APIENTRY packspu_MakeCurrent( GLint window, GLint nativeWindow, GLint ctx )
    218216{
     
    240238            if (newCtx->currentThread && newCtx->currentThread != thread)
    241239            {
    242                 int writeback = 1;
    243240                crLockMutex(&_PackMutex);
    244241                /* do a flush for the previusly assigned thread
     
    249246                    && newCtx->currentThread->packer && newCtx->currentThread->packer->currentBuffer)
    250247                {
    251 #ifdef PACK_FORCED_SYNC
    252                     CRPackContext *pc = newCtx->currentThread->packer;
    253                     unsigned char *data_ptr;
    254 
    255                     CR_GET_BUFFERED_POINTER( pc, 16 );
    256                     WRITE_DATA( 0, GLint, 16 );
    257                     WRITE_DATA( 4, GLenum, CR_WRITEBACK_EXTEND_OPCODE );
    258                     WRITE_NETWORK_POINTER( 8, (void *) &writeback );
    259                     WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
    260                     CR_UNLOCK_PACKER_CONTEXT(pc);
    261 #endif
    262248                    packspuFlush((void *) newCtx->currentThread);
    263 
    264 #ifdef PACK_FORCED_SYNC
    265                     while (writeback)
    266                         crNetRecv();
    267 #endif
    268249                }
    269250                crUnlockMutex(&_PackMutex);
  • trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_misc.c

    r38143 r38374  
    104104}
    105105
    106 #define PACK_FORCED_SYNC
    107 
    108106void PACKSPU_APIENTRY packspu_Flush( void )
    109107{
    110108    GET_THREAD(thread);
    111     int writeback = 1;
     109    int writeback=1;
    112110    int found=0;
    113111
     
    136134                && pack_spu.thread[i].packer && pack_spu.thread[i].packer->currentBuffer)
    137135            {
    138 #ifdef PACK_FORCED_SYNC
    139                 CRPackContext *pc = pack_spu.thread[i].packer;
    140                 unsigned char *data_ptr;
    141 
    142                 CR_GET_BUFFERED_POINTER( pc, 16 );
    143                 WRITE_DATA( 0, GLint, 16 );
    144                 WRITE_DATA( 4, GLenum, CR_WRITEBACK_EXTEND_OPCODE );
    145                 WRITE_NETWORK_POINTER( 8, (void *) &writeback );
    146                 WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
    147                 CR_UNLOCK_PACKER_CONTEXT(pc);
    148 #endif
    149136                packspuFlush((void *) &pack_spu.thread[i]);
    150137
     
    154141                }
    155142
    156 #ifdef PACK_FORCED_SYNC
    157                 while (writeback)
    158                     crNetRecv();
    159 #endif
    160143            }
    161144        }
     
    169152        }
    170153
    171 #ifdef PACK_FORCED_SYNC
    172         writeback = 1;
    173         crPackWriteback(&writeback);
    174 #endif
    175154        packspuFlush((void *) thread);
    176155
    177 #ifdef PACK_FORCED_SYNC
    178         while (writeback)
    179             crNetRecv();
    180 #endif
    181156        crUnlockMutex(&_PackMutex);
    182157    }
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