| /xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/util/ |
| u_cache.c | 30 * Improved cache implementation. 76 /** Max entries in the cache */ 82 /** Number of entries in the cache */ 91 ensure_sanity(const struct util_cache *cache); 96 * Create a new cache with 'size' entries. Also provide functions for 105 struct util_cache *cache; local 107 cache = CALLOC_STRUCT(util_cache); 108 if (!cache) 111 cache->hash = hash; 112 cache->compare = compare [all...] |
| u_cache.h | 30 * Simple cache. 48 * Least Recently Used (LRU) cache. 54 * Create a cache. 68 util_cache_set(struct util_cache *cache, 73 util_cache_get(struct util_cache *cache, 77 util_cache_clear(struct util_cache *cache); 80 util_cache_destroy(struct util_cache *cache); 83 util_cache_remove(struct util_cache *cache,
|
| u_vertex_state_cache.c | 46 util_vertex_state_cache_init(struct util_vertex_state_cache *cache, 50 simple_mtx_init(&cache->lock, mtx_plain); 51 cache->set = _mesa_set_create(NULL, key_hash, key_equals); 52 cache->create = create; 53 cache->destroy = destroy; 57 util_vertex_state_cache_deinit(struct util_vertex_state_cache *cache) 59 if (cache->set) { 60 set_foreach(cache->set, entry) { 61 fprintf(stderr, "mesa: vertex state cache should be empty\n"); 62 assert(!"vertex state cache should be empty") [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/gallium/auxiliary/util/ |
| u_cache.c | 30 * Improved cache implementation. 76 /** Max entries in the cache */ 82 /** Number of entries in the cache */ 91 ensure_sanity(const struct util_cache *cache); 96 * Create a new cache with 'size' entries. Also provide functions for 105 struct util_cache *cache; local 107 cache = CALLOC_STRUCT(util_cache); 108 if (!cache) 111 cache->hash = hash; 112 cache->compare = compare [all...] |
| u_cache.h | 30 * Simple cache. 48 * Least Recently Used (LRU) cache. 54 * Create a cache. 68 util_cache_set(struct util_cache *cache, 73 util_cache_get(struct util_cache *cache, 77 util_cache_clear(struct util_cache *cache); 80 util_cache_destroy(struct util_cache *cache); 83 util_cache_remove(struct util_cache *cache,
|
| /xsrc/external/mit/MesaLib/dist/src/panfrost/shared/ |
| pan_minmax_cache.c | 27 /* Index buffer min/max cache. We need to calculate the min/max for arbitrary 29 * be quite expensive, we cache. Conceptually, we just use a hash table mapping 34 * PANFROST_MINMAX_SIZE constant (so this is a tradeoff between cache hit/miss 35 * ratio and cache search speed). Note that keys are adjacent so we get cache 36 * line alignment benefits. Insertion is O(1) and in-order until the cache 44 panfrost_minmax_cache_get(struct panfrost_minmax_cache *cache, unsigned start, unsigned count, 50 if (!cache) 53 for (unsigned i = 0; i < cache->size; ++i) { 54 if (cache->keys[i] == ht_key) [all...] |
| /xsrc/external/mit/MesaLib/dist/src/freedreno/vulkan/ |
| tu_pipeline_cache.c | 48 tu_pipeline_cache_init(struct tu_pipeline_cache *cache, 51 cache->device = device; 52 pthread_mutex_init(&cache->mutex, NULL); 54 cache->modified = false; 55 cache->kernel_count = 0; 56 cache->total_size = 0; 57 cache->table_size = 1024; 58 const size_t byte_size = cache->table_size * sizeof(cache->hash_table[0]); 59 cache->hash_table = malloc(byte_size) 252 struct tu_pipeline_cache *cache; local [all...] |
| /xsrc/external/mit/MesaLib/dist/src/util/ |
| disk_cache.c | 51 /* The cache version should be bumped whenever a change is made to the 52 * structure of cache entries or the index. This will give any 3rd party 53 * applications reading the cache entries a chance to adjust to the changes. 55 * - The cache version is checked internally when reading a cache entry. If we 56 * ever have a mismatch we are in big trouble as this means we had a cache 60 * - There is no strict requirement that cache versions be backwards 76 struct disk_cache *cache = NULL; local 91 cache = rzalloc(NULL, struct disk_cache); 92 if (cache == NULL [all...] |
| /xsrc/external/mit/freetype/dist/src/cache/ |
| ftccache.c | 5 * The FreeType internal cache interface (body). 27 #define FT_COMPONENT cache 41 /***** CACHE NODE DEFINITIONS *****/ 86 /* get a top bucket for specified hash from cache, 87 * body for FTC_NODE_TOP_FOR_HASH( cache, hash ) 90 ftc_get_top_node_for_hash( FTC_Cache cache, 97 idx = hash & cache->mask; 98 if ( idx < cache->p ) 99 idx = hash & ( 2 * cache->mask + 1 ); 100 pnode = cache->buckets + idx 275 FTC_Cache cache; local [all...] |
| /xsrc/external/mit/MesaLib/dist/src/mesa/program/ |
| prog_cache.c | 84 rehash(struct gl_program_cache *cache) 90 cache->last = NULL; 92 size = cache->size * 3; 96 for (i = 0; i < cache->size; i++) 97 for (c = cache->items[i]; c; c = next) { 103 free(cache->items); 104 cache->items = items; 105 cache->size = size; 110 clear_cache(struct gl_context *ctx, struct gl_program_cache *cache, 116 cache->last = NULL 143 struct gl_program_cache *cache = CALLOC_STRUCT(gl_program_cache); local [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/mesa/program/ |
| prog_cache.c | 83 rehash(struct gl_program_cache *cache) 89 cache->last = NULL; 91 size = cache->size * 3; 95 for (i = 0; i < cache->size; i++) 96 for (c = cache->items[i]; c; c = next) { 102 free(cache->items); 103 cache->items = items; 104 cache->size = size; 109 clear_cache(struct gl_context *ctx, struct gl_program_cache *cache, 115 cache->last = NULL 142 struct gl_program_cache *cache = CALLOC_STRUCT(gl_program_cache); local [all...] |
| /xsrc/external/mit/libXfont/dist/src/util/ |
| patcache.c | 64 /* Empty cache (for rehash) */ 66 EmptyFontPatternCache (FontPatternCachePtr cache) 71 cache->buckets[i] = 0; 74 cache->entries[i].next = &cache->entries[i+1]; 75 cache->entries[i].prev = 0; 76 cache->entries[i].pFont = 0; 77 free ((void *) cache->entries[i].pattern); 78 cache->entries[i].pattern = 0; 79 cache->entries[i].patlen = 0 89 FontPatternCachePtr cache; local [all...] |
| /xsrc/external/mit/libXfont2/dist/src/util/ |
| patcache.c | 65 /* Empty cache (for rehash) */ 67 xfont2_empty_font_pattern_cache(xfont2_pattern_cache_ptr cache) 72 cache->buckets[i] = 0; 75 cache->entries[i].next = &cache->entries[i+1]; 76 cache->entries[i].prev = 0; 77 cache->entries[i].pFont = 0; 78 free ((void *) cache->entries[i].pattern); 79 cache->entries[i].pattern = 0; 80 cache->entries[i].patlen = 0 90 xfont2_pattern_cache_ptr cache; local [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/compiler/glsl/tests/ |
| cache_test.c | 24 /* A collection of unit tests for cache.c */ 151 does_cache_contain(struct disk_cache *cache, const cache_key key) 155 result = disk_cache_get(cache, key, NULL); 166 wait_until_file_written(struct disk_cache *cache, const cache_key key) 177 if (does_cache_contain(cache, key)) { 186 cache_exists(struct disk_cache *cache) 191 if (!cache) 194 disk_cache_put(cache, dummy_key, data, sizeof(data), NULL); 195 wait_until_file_written(cache, dummy_key); 196 return disk_cache_get(cache, dummy_key, NULL) 204 struct disk_cache *cache; local 266 struct disk_cache *cache; local 448 struct disk_cache *cache; local [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/util/ |
| xmlconfig.h | 68 /** \brief Option cache 103 /** \brief Initialize option cache from info and parse configuration files 107 void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info, 114 /** \brief Destroy option cache 117 void driDestroyOptionCache (driOptionCache *cache); 120 unsigned char driCheckOption (const driOptionCache *cache, const char *name, 124 unsigned char driQueryOptionb (const driOptionCache *cache, const char *name); 126 int driQueryOptioni (const driOptionCache *cache, const char *name); 128 float driQueryOptionf (const driOptionCache *cache, const char *name); 130 char *driQueryOptionstr (const driOptionCache *cache, const char *name) [all...] |
| /xsrc/external/mit/MesaLib/dist/src/gallium/winsys/virgl/common/ |
| virgl_resource_cache.c | 27 /* Checks whether the resource represented by a cache entry is able to hold 50 virgl_resource_cache_entry_release(struct virgl_resource_cache *cache, 54 cache->entry_release_func(entry, cache->user_data); 58 virgl_resource_cache_destroy_expired(struct virgl_resource_cache *cache, int64_t now) 61 entry, &cache->resources, head) { 67 virgl_resource_cache_entry_release(cache, entry); 72 virgl_resource_cache_init(struct virgl_resource_cache *cache, 78 list_inithead(&cache->resources); 79 cache->timeout_usecs = timeout_usecs [all...] |
| /xsrc/external/mit/MesaLib/dist/src/mesa/drivers/dri/i965/ |
| brw_program_cache.c | 34 * This file implements a simple program cache for 965. The consumers can 37 * data) in return. Objects in the cache may not have relocations 43 * Replacement is not implemented. Instead, when the cache gets too 44 * big we throw out all of the cache data and let it get regenerated. 119 search_cache(struct brw_cache *cache, GLuint hash, 127 for (c = cache->items[hash % cache->size]; c; c = c->next) 130 fprintf(stderr, "bucket %d/%d = %d/%d items\n", hash % cache->size, 131 cache->size, bucketcount, cache->n_items) 370 struct brw_cache *cache = &brw->cache; local 513 const struct brw_cache *cache = &brw->cache; local [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/mesa/drivers/dri/i965/ |
| brw_program_cache.c | 34 * This file implements a simple program cache for 965. The consumers can 37 * data) in return. Objects in the cache may not have relocations 43 * Replacement is not implemented. Instead, when the cache gets too 44 * big we throw out all of the cache data and let it get regenerated. 146 search_cache(struct brw_cache *cache, GLuint hash, 154 for (c = cache->items[hash % cache->size]; c; c = c->next) 157 fprintf(stderr, "bucket %d/%d = %d/%d items\n", hash % cache->size, 158 cache->size, bucketcount, cache->n_items) 397 struct brw_cache *cache = &brw->cache; local 540 const struct brw_cache *cache = &brw->cache; local [all...] |
| /xsrc/external/mit/MesaLib/dist/src/gallium/auxiliary/translate/ |
| translate_cache.c | 42 struct translate_cache *cache = MALLOC_STRUCT(translate_cache); local 43 if (!cache) { 47 cso_hash_init(&cache->hash); 48 return cache; 52 static inline void delete_translates(struct translate_cache *cache) 54 struct cso_hash *hash = &cache->hash; 65 void translate_cache_destroy(struct translate_cache *cache) 67 delete_translates(cache); 68 cso_hash_deinit(&cache->hash); 69 FREE(cache); [all...] |
| translate_cache.h | 29 * Translate cache. 30 * Simply used to cache created translates. Avoids unecessary creation of 42 void translate_cache_destroy(struct translate_cache *cache); 46 * If such a structure doesn't exist in the cache the function 47 * will automatically create it, insert it in the cache and 51 struct translate *translate_cache_find(struct translate_cache *cache,
|
| /xsrc/external/mit/MesaLib.old/dist/src/gallium/auxiliary/translate/ |
| translate_cache.c | 42 struct translate_cache *cache = MALLOC_STRUCT(translate_cache); local 43 if (!cache) { 47 cache->hash = cso_hash_create(); 48 return cache; 52 static inline void delete_translates(struct translate_cache *cache) 54 struct cso_hash *hash = cache->hash; 65 void translate_cache_destroy(struct translate_cache *cache) 67 delete_translates(cache); 68 cso_hash_delete(cache->hash); 69 FREE(cache); [all...] |
| translate_cache.h | 29 * Translate cache. 30 * Simply used to cache created translates. Avoids unecessary creation of 42 void translate_cache_destroy(struct translate_cache *cache); 46 * If such a structure doesn't exist in the cache the function 47 * will automatically create it, insert it in the cache and 51 struct translate *translate_cache_find(struct translate_cache *cache,
|
| /xsrc/external/mit/MesaLib/dist/src/amd/vulkan/ |
| radv_pipeline_cache.c | 46 radv_pipeline_cache_lock(struct radv_pipeline_cache *cache) 48 if (cache->flags & VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT) 51 mtx_lock(&cache->mutex); 55 radv_pipeline_cache_unlock(struct radv_pipeline_cache *cache) 57 if (cache->flags & VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT) 60 mtx_unlock(&cache->mutex); 64 radv_pipeline_cache_init(struct radv_pipeline_cache *cache, struct radv_device *device) 66 vk_object_base_init(&device->vk, &cache->base, VK_OBJECT_TYPE_PIPELINE_CACHE); 68 cache->device = device; 69 mtx_init(&cache->mutex, mtx_plain) 546 struct radv_pipeline_cache *cache; local [all...] |
| /xsrc/external/mit/MesaLib.old/dist/src/gallium/drivers/freedreno/ |
| freedreno_batch_cache.h | 59 #define foreach_batch(batch, cache, mask) \ 60 for (uint32_t _m = (mask); _m && ((batch) = (cache)->batches[u_bit_scan(&_m)]); _m &= (mask)) 62 void fd_bc_init(struct fd_batch_cache *cache); 63 void fd_bc_fini(struct fd_batch_cache *cache); 65 void fd_bc_flush(struct fd_batch_cache *cache, struct fd_context *ctx); 66 void fd_bc_flush_deferred(struct fd_batch_cache *cache, struct fd_context *ctx); 71 struct fd_batch * fd_bc_alloc_batch(struct fd_batch_cache *cache, struct fd_context *ctx, bool nondraw); 73 struct fd_batch * fd_batch_from_fb(struct fd_batch_cache *cache,
|
| /xsrc/external/mit/xorg-server/dist/hw/xwin/glx/ |
| glthunk.c | 43 glWinResolveHelper(PROC * cache, const char *symbol) 48 if ((*cache) == NULL) { 51 (*cache) = (PROC) - 1; 54 (*cache) = proc; 58 else if ((*cache) == (PROC) - 1) { 63 proc = (*cache); 70 static PROC cache = NULL; \ 71 __stdcall proctype proc = (proctype)glWinResolveHelper(&cache, symbol); \
|