From 8fba8d2018643444fc17c590f3e8732e1a76c6b8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 24 Sep 2007 09:55:16 -0700 Subject: Remove the old i915 driver now that i915tex works without TTM. --- src/mesa/drivers/dri/i915/intel_texmem.c | 72 -------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 src/mesa/drivers/dri/i915/intel_texmem.c (limited to 'src/mesa/drivers/dri/i915/intel_texmem.c') diff --git a/src/mesa/drivers/dri/i915/intel_texmem.c b/src/mesa/drivers/dri/i915/intel_texmem.c deleted file mode 100644 index 09beec95b8..0000000000 --- a/src/mesa/drivers/dri/i915/intel_texmem.c +++ /dev/null @@ -1,72 +0,0 @@ -#include "texmem.h" -#include "simple_list.h" -#include "imports.h" -#include "macros.h" - -#include "intel_tex.h" - -static GLuint -driLog2( GLuint n ) -{ - GLuint log2; - - for ( log2 = 1 ; n > 1 ; log2++ ) { - n >>= 1; - } - - return log2; -} - -static void calculate_heap_size( driTexHeap * heap, unsigned size, - unsigned nr_regions, unsigned alignmentShift ) -{ - unsigned l; - - l = driLog2( (size - 1) / nr_regions ); - if ( l < alignmentShift ) - { - l = alignmentShift; - } - - heap->logGranularity = l; - heap->size = size & ~((1L << l) - 1); -} - - -GLboolean -intel_driReinitTextureHeap( driTexHeap *heap, - unsigned size ) -{ - driTextureObject *t, *tmp; - - /* Kick out everything: - */ - foreach_s ( t, tmp, & heap->texture_objects ) { - if ( t->tObj != NULL ) { - driSwapOutTextureObject( t ); - } - else { - driDestroyTextureObject( t ); - } - } - - /* Destroy the memory manager: - */ - mmDestroy( heap->memory_heap ); - - /* Recreate the memory manager: - */ - calculate_heap_size(heap, size, heap->nrRegions, heap->alignmentShift); - heap->memory_heap = mmInit( 0, heap->size ); - if ( heap->memory_heap == NULL ) { - fprintf(stderr, "driReinitTextureHeap: couldn't recreate memory heap\n"); - FREE( heap ); - return GL_FALSE; - } - - make_empty_list( & heap->texture_objects ); - - return GL_TRUE; -} - - -- cgit v1.2.3