diff options
author | marha <marha@users.sourceforge.net> | 2010-04-12 09:53:17 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-04-12 09:53:17 +0000 |
commit | 29b86f9852b2b7ecc31cdfee56679537e40bc6e2 (patch) | |
tree | 1e6ec8ccf2dbf773260a1953b8e13c49f9b7c5f5 /mesalib/src/mesa/shader/prog_cache.c | |
parent | 529236591df7366479a6fac30b387667678fd1ba (diff) | |
download | vcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.tar.gz vcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.tar.bz2 vcxsrv-29b86f9852b2b7ecc31cdfee56679537e40bc6e2.zip |
svn merge -r524:HEAD "^/branches/released" .
Diffstat (limited to 'mesalib/src/mesa/shader/prog_cache.c')
-rw-r--r-- | mesalib/src/mesa/shader/prog_cache.c | 20 |
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 */ |