diff options
author | Ben Skeggs <[email protected]> | 2008-05-14 18:13:36 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2008-05-14 18:13:36 +1000 |
commit | bc1696862c9ffa8d8f2c11d3120310e82f2e9327 (patch) | |
tree | a212a92776a05fb1ef09d1ea1864d9cc1e315440 /src/mesa/shader/prog_cache.c | |
parent | 666ac923f016b1b231c5a8847cbe084321f697ca (diff) | |
parent | 19f15277d1871b62902031f9fa9aabf2f1bc7c40 (diff) |
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/shader/prog_cache.c')
-rw-r--r-- | src/mesa/shader/prog_cache.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/shader/prog_cache.c b/src/mesa/shader/prog_cache.c index dd0241ef24e..36a25377c55 100644 --- a/src/mesa/shader/prog_cache.c +++ b/src/mesa/shader/prog_cache.c @@ -30,6 +30,7 @@ #include "main/mtypes.h" #include "main/imports.h" #include "shader/prog_cache.h" +#include "shader/program.h" struct cache_item @@ -109,7 +110,7 @@ clear_cache(GLcontext *ctx, struct gl_program_cache *cache) for (c = cache->items[i]; c; c = next) { next = c->next; _mesa_free(c->key); - ctx->Driver.DeleteProgram(ctx, c->program); + _mesa_reference_program(ctx, &c->program, NULL); _mesa_free(c); } cache->items[i] = NULL; @@ -177,7 +178,7 @@ _mesa_program_cache_insert(GLcontext *ctx, c->key = _mesa_malloc(keysize); memcpy(c->key, key, keysize); - c->program = program; + c->program = program; /* no refcount change */ if (cache->n_items > cache->size * 1.5) { if (cache->size < 1000) |