summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2005-01-27 13:10:16 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2005-01-27 13:10:16 +0000
commit2ea7a7dc413c324a6544ea046dab5956fd4627c0 (patch)
tree6a33f37bba9ba12dfcb98329f4423bbd07693b7c
parentd8c1d6bd9958940c4f764ae4ecc471ed832415ad (diff)
remove dead code - there is no global lru
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.h18
-rw-r--r--src/mesa/drivers/dri/unichrome/via_texmem.c62
2 files changed, 0 insertions, 80 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.h b/src/mesa/drivers/dri/unichrome/via_tex.h
index 1b5611a215..603d18a1e9 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.h
+++ b/src/mesa/drivers/dri/unichrome/via_tex.h
@@ -35,18 +35,6 @@
#define VIA_TEX_MAXLEVELS 10
-/* For shared texture space managment, these texture objects may also
- * be used as proxies for regions of texture memory containing other
- * client's textures. Such proxy textures (not to be confused with GL
- * proxy textures) are subject to the same LRU aging we use for our
- * own private textures, and thus we have a mechanism where we can
- * fairly decide between kicking out our own textures and those of
- * other clients.
- *
- * Non-local texture objects have a valid MemBlock to describe the
- * region managed by the other client, and can be identified by
- * 't->globj == 0'
- */
struct via_texture_object_t {
struct via_texture_object_t *next, *prev;
@@ -100,13 +88,7 @@ void viaDestroyTexObj(viaContextPtr vmesa, viaTextureObjectPtr t);
void viaSwapOutTexObj(viaContextPtr vmesa, viaTextureObjectPtr t);
void viaUploadTexImages(viaContextPtr vmesa, viaTextureObjectPtr t);
-void viaResetGlobalLRU(viaContextPtr vmesa);
-void viaTexturesGone(viaContextPtr vmesa,
- GLuint start, GLuint end,
- GLuint in_use);
-
void viaPrintLocalLRU(viaContextPtr vmesa);
-void viaPrintGlobalLRU(viaContextPtr vmesa);
void viaUpdateTexLRU(viaContextPtr vmesa, viaTextureObjectPtr t);
#endif
diff --git a/src/mesa/drivers/dri/unichrome/via_texmem.c b/src/mesa/drivers/dri/unichrome/via_texmem.c
index a2b71afd0d..825ef09f33 100644
--- a/src/mesa/drivers/dri/unichrome/via_texmem.c
+++ b/src/mesa/drivers/dri/unichrome/via_texmem.c
@@ -305,74 +305,12 @@ void viaPrintLocalLRU(viaContextPtr vmesa)
}
}
-void viaPrintGlobalLRU(viaContextPtr vmesa)
-{
- int i, j;
- drm_via_tex_region_t *list = vmesa->sarea->texList;
-
- for (i = 0, j = VIA_NR_TEX_REGIONS; i < VIA_NR_TEX_REGIONS; i++) {
- if (VIA_DEBUG) fprintf(stderr, "list[%d] age %d next %d prev %d\n",
- j, list[j].age, list[j].next, list[j].prev);
- j = list[j].next;
- if (j == VIA_NR_TEX_REGIONS) break;
- }
- if (j != VIA_NR_TEX_REGIONS)
- if (VIA_DEBUG) fprintf(stderr, "Loop detected in global LRU\n");
-}
-
-void viaResetGlobalLRU(viaContextPtr vmesa)
-{
- drm_via_tex_region_t *list = vmesa->sarea->texList;
- int sz = 1 << vmesa->viaScreen->logTextureGranularity;
- int i;
-
- /* (Re)initialize the global circular LRU list. The last element
- * in the array (VIA_NR_TEX_REGIONS) is the sentinal. Keeping it
- * at the end of the array allows it to be addressed rationally
- * when looking up objects at a particular location in texture
- * memory.
- */
- for (i = 0; (i + 1) * sz <= vmesa->viaScreen->textureSize; i++) {
- list[i].prev = i - 1;
- list[i].next = i + 1;
- list[i].age = 0;
- }
-
- i--;
- list[0].prev = VIA_NR_TEX_REGIONS;
- list[i].prev = i - 1;
- list[i].next = VIA_NR_TEX_REGIONS;
- list[VIA_NR_TEX_REGIONS].prev = i;
- list[VIA_NR_TEX_REGIONS].next = 0;
- vmesa->sarea->texAge = 0;
-}
-
void viaUpdateTexLRU(viaContextPtr vmesa, viaTextureObjectPtr t)
{
vmesa->texAge = ++vmesa->sarea->texAge;
move_to_head(&(vmesa->TexObjList), t);
}
-/* Called for every shared texture region which has increased in age
- * since we last held the lock.
- *
- * Figures out which of our textures have been ejected by other clients,
- * and pushes a placeholder texture onto the LRU list to represent
- * the other client's textures.
- */
-void viaTexturesGone(viaContextPtr vmesa,
- GLuint offset,
- GLuint size,
- GLuint inUse)
-{
- viaTextureObjectPtr t, tmp;
- if (VIA_DEBUG) fprintf(stderr, "%s - in\n", __FUNCTION__);
- foreach_s (t, tmp, &vmesa->TexObjList) {
- viaSwapOutTexObj(vmesa, t);
- }
- if (VIA_DEBUG) fprintf(stderr, "%s - out\n", __FUNCTION__);
-}
-
/* This is called with the lock held. May have to eject our own and/or
* other client's texture objects to make room for the upload.
*/