mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 15:10:10 +01:00
mesa/program_cache: remove unused shader-cache functions
These are no longer in use, so let's get rid of them. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22755>
This commit is contained in:
parent
a0683e243a
commit
1fc40c081e
2 changed files with 0 additions and 48 deletions
|
|
@ -162,15 +162,6 @@ _mesa_delete_program_cache(struct gl_context *ctx, struct gl_program_cache *cach
|
|||
FREE(cache);
|
||||
}
|
||||
|
||||
void
|
||||
_mesa_delete_shader_cache(struct gl_context *ctx,
|
||||
struct gl_program_cache *cache)
|
||||
{
|
||||
clear_cache(ctx, cache, GL_TRUE);
|
||||
free(cache->items);
|
||||
FREE(cache);
|
||||
}
|
||||
|
||||
|
||||
struct gl_program *
|
||||
_mesa_search_program_cache(struct gl_program_cache *cache,
|
||||
|
|
@ -228,32 +219,3 @@ _mesa_program_cache_insert(struct gl_context *ctx,
|
|||
c->next = cache->items[hash % cache->size];
|
||||
cache->items[hash % cache->size] = c;
|
||||
}
|
||||
|
||||
void
|
||||
_mesa_shader_cache_insert(struct gl_context *ctx,
|
||||
struct gl_program_cache *cache,
|
||||
const void *key, GLuint keysize,
|
||||
struct gl_shader_program *program)
|
||||
{
|
||||
const GLuint hash = hash_key(key, keysize);
|
||||
struct cache_item *c = CALLOC_STRUCT(cache_item);
|
||||
|
||||
c->hash = hash;
|
||||
|
||||
c->key = malloc(keysize);
|
||||
memcpy(c->key, key, keysize);
|
||||
c->keysize = keysize;
|
||||
|
||||
c->program = (struct gl_program *)program; /* no refcount change */
|
||||
|
||||
if (cache->n_items > cache->size * 1.5) {
|
||||
if (cache->size < 1000)
|
||||
rehash(cache);
|
||||
else
|
||||
clear_cache(ctx, cache, GL_TRUE);
|
||||
}
|
||||
|
||||
cache->n_items++;
|
||||
c->next = cache->items[hash % cache->size];
|
||||
cache->items[hash % cache->size] = c;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,10 +50,6 @@ _mesa_new_program_cache(void);
|
|||
extern void
|
||||
_mesa_delete_program_cache(struct gl_context *ctx, struct gl_program_cache *pc);
|
||||
|
||||
extern void
|
||||
_mesa_delete_shader_cache(struct gl_context *ctx,
|
||||
struct gl_program_cache *cache);
|
||||
|
||||
extern struct gl_program *
|
||||
_mesa_search_program_cache(struct gl_program_cache *cache,
|
||||
const void *key, GLuint keysize);
|
||||
|
|
@ -64,12 +60,6 @@ _mesa_program_cache_insert(struct gl_context *ctx,
|
|||
const void *key, GLuint keysize,
|
||||
struct gl_program *program);
|
||||
|
||||
void
|
||||
_mesa_shader_cache_insert(struct gl_context *ctx,
|
||||
struct gl_program_cache *cache,
|
||||
const void *key, GLuint keysize,
|
||||
struct gl_shader_program *program);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue