for (i = start ; i <= end ; i++) {
- list[i].in_use = 1;
list[i].age = heap->local_age;
/* remove_from_list(i)
* \param heap Heap whose state is to be updated
* \param offset Byte offset in the heap that has been stolen
* \param size Size, in bytes, of the stolen block
- * \param in_use Non-zero if the block is in-use by another context
+ * \param in_use Non-zero if the block is pinned/reserved by the kernel
*/
static void driTexturesGone( driTexHeap * heap, int offset, int size,
driSwapOutTextureObject( t );
}
else {
- if ( in_use &&
- offset == t->memBlock->ofs && size == t->memBlock->size ) {
- /* Matching placeholder already exists */
- return;
- } else {
- driDestroyTextureObject( t );
- }
+ driDestroyTextureObject( t );
}
}
}
- if ( in_use ) {
+ {
t = (driTextureObject *) CALLOC( heap->texture_object_size );
if ( t == NULL ) return;
return;
}
t->heap = heap;
+ if (in_use)
+ t->bound = 99;
insert_at_head( & heap->texture_objects, t );
}
}
heap->destroy_texture_object = destroy_tex_obj;
/* Force global heap init */
- if (heap->global_age == 0)
+ if (heap->global_age[0] == 0)
heap->local_age = ~0;
else
heap->local_age = 0;