aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/shader/prog_cache.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-02 14:47:58 +0000
committermarha <marha@users.sourceforge.net>2010-04-02 14:47:58 +0000
commit7933658107276f9d5491f8736a743cf8f8bbd5f2 (patch)
treef2893a761364e7abc9d934e9c5427e5cf5190c7a /mesalib/src/mesa/shader/prog_cache.c
parent83fa9a9811e2c18cffd83a020757f7fb51ffddaa (diff)
downloadvcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.tar.gz
vcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.tar.bz2
vcxsrv-7933658107276f9d5491f8736a743cf8f8bbd5f2.zip
Updated to following packages:
mesa-7.8
Diffstat (limited to 'mesalib/src/mesa/shader/prog_cache.c')
-rw-r--r--mesalib/src/mesa/shader/prog_cache.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/mesalib/src/mesa/shader/prog_cache.c b/mesalib/src/mesa/shader/prog_cache.c
index 9437e5961..e5b602fc0 100644
--- a/mesalib/src/mesa/shader/prog_cache.c
+++ b/mesalib/src/mesa/shader/prog_cache.c
@@ -87,8 +87,8 @@ rehash(struct gl_program_cache *cache)
cache->last = NULL;
size = cache->size * 3;
- items = (struct cache_item**) _mesa_malloc(size * sizeof(*items));
- _mesa_memset(items, 0, size * sizeof(*items));
+ items = (struct cache_item**) malloc(size * sizeof(*items));
+ memset(items, 0, size * sizeof(*items));
for (i = 0; i < cache->size; i++)
for (c = cache->items[i]; c; c = next) {
@@ -97,7 +97,7 @@ rehash(struct gl_program_cache *cache)
items[c->hash % size] = c;
}
- _mesa_free(cache->items);
+ free(cache->items);
cache->items = items;
cache->size = size;
}
@@ -114,9 +114,9 @@ clear_cache(GLcontext *ctx, struct gl_program_cache *cache)
for (i = 0; i < cache->size; i++) {
for (c = cache->items[i]; c; c = next) {
next = c->next;
- _mesa_free(c->key);
+ free(c->key);
_mesa_reference_program(ctx, &c->program, NULL);
- _mesa_free(c);
+ free(c);
}
cache->items[i] = NULL;
}
@@ -134,9 +134,9 @@ _mesa_new_program_cache(void)
if (cache) {
cache->size = 17;
cache->items = (struct cache_item **)
- _mesa_calloc(cache->size * sizeof(struct cache_item));
+ calloc(1, cache->size * sizeof(struct cache_item));
if (!cache->items) {
- _mesa_free(cache);
+ free(cache);
return NULL;
}
}
@@ -148,8 +148,8 @@ void
_mesa_delete_program_cache(GLcontext *ctx, struct gl_program_cache *cache)
{
clear_cache(ctx, cache);
- _mesa_free(cache->items);
- _mesa_free(cache);
+ free(cache->items);
+ free(cache);
}
@@ -188,7 +188,7 @@ _mesa_program_cache_insert(GLcontext *ctx,
c->hash = hash;
- c->key = _mesa_malloc(keysize);
+ c->key = malloc(keysize);
memcpy(c->key, key, keysize);
c->program = program; /* no refcount change */