Skip to content

Commit

Permalink
VertexCache comments & logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cowcat5150 committed Apr 9, 2021
1 parent ced0e76 commit c96bc88
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion neo/renderer/VertexCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ void idVertexCache::Alloc( void *data, int size, vertCache_t **buffer, bool inde
*buffer = NULL;

// if we don't have any remaining unused headers, allocate some more
if ( freeStaticHeaders.next == &freeStaticHeaders ) {
if ( freeStaticHeaders.next == &freeStaticHeaders ) { // Cowcat notes: Huge lag here for MOS - also happens few times than PC version.

common->Printf( "-----Alloc more headers in. Size = %i\n", size );

for ( int i = 0; i < EXPAND_HEADERS; i++ ) {
block = headerAllocator.Alloc();
Expand All @@ -246,10 +248,15 @@ void idVertexCache::Alloc( void *data, int size, vertCache_t **buffer, bool inde

if( !virtualMemory ) {
qglGenBuffersARB( 1, & block->vbo );
//block->size = 0; // don't wrap around ? Cowcat
}
}

common->Printf( "-----Alloc more headers out. Size = %i\n", block->size );
//common->Printf( "-----Alloc more headers out\n");
}

// try to find a matching block to replace so that we're not continually respecifying vbo data each frame
for (vertCache_t *findblock = freeStaticHeaders.next; /**/; findblock = findblock->next) {
if(findblock == &freeStaticHeaders) {
block = freeStaticHeaders.next;
Expand Down

0 comments on commit c96bc88

Please sign in to comment.