From 8a5bc304ff1c44a719b24081e16f073101658601 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 18 Jan 2018 14:01:20 -0800 Subject: [PATCH] i965: Rename 'aux' to 'prog_data' in program cache. 'aux' is a very generic name, suggesting it can be a bunch of things. However, it's always the brw_*_prog_data structure. So, call it that. Reviewed-by: Iago Toral Quiroga --- src/mesa/drivers/dri/i965/brw_program_cache.c | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c index adb0cd5a23b..9266273b5da 100644 --- a/src/mesa/drivers/dri/i965/brw_program_cache.c +++ b/src/mesa/drivers/dri/i965/brw_program_cache.c @@ -69,7 +69,7 @@ struct brw_cache_item { /** for variable-sized keys */ GLuint key_size; - GLuint aux_size; + GLuint prog_data_size; const void *key; uint32_t offset; @@ -182,7 +182,7 @@ bool brw_search_cache(struct brw_cache *cache, enum brw_cache_id cache_id, const void *key, GLuint key_size, - uint32_t *inout_offset, void *inout_aux) + uint32_t *inout_offset, void *inout_prog_data) { struct brw_context *brw = cache->brw; struct brw_cache_item *item; @@ -200,12 +200,13 @@ brw_search_cache(struct brw_cache *cache, if (item == NULL) return false; - void *aux = ((char *) item->key) + item->key_size; + void *prog_data = ((char *) item->key) + item->key_size; - if (item->offset != *inout_offset || aux != *((void **) inout_aux)) { + if (item->offset != *inout_offset || + prog_data != *((void **) inout_prog_data)) { brw->ctx.NewDriverState |= (1 << cache_id); *inout_offset = item->offset; - *((void **) inout_aux) = aux; + *((void **) inout_prog_data) = prog_data; } return true; @@ -320,10 +321,10 @@ brw_upload_cache(struct brw_cache *cache, GLuint key_size, const void *data, GLuint data_size, - const void *aux, - GLuint aux_size, + const void *prog_data, + GLuint prog_data_size, uint32_t *out_offset, - void *out_aux) + void *out_prog_data) { struct brw_cache_item *item = CALLOC_STRUCT(brw_cache_item); const struct brw_cache_item *matching_data = @@ -335,7 +336,7 @@ brw_upload_cache(struct brw_cache *cache, item->size = data_size; item->key = key; item->key_size = key_size; - item->aux_size = aux_size; + item->prog_data_size = prog_data_size; hash = hash_key(item); item->hash = hash; @@ -354,11 +355,11 @@ brw_upload_cache(struct brw_cache *cache, memcpy(cache->map + item->offset, data, data_size); } - /* Set up the memory containing the key and aux_data */ - tmp = malloc(key_size + aux_size); + /* Set up the memory containing the key and prog_data */ + tmp = malloc(key_size + prog_data_size); memcpy(tmp, key, key_size); - memcpy(tmp + key_size, aux, aux_size); + memcpy(tmp + key_size, prog_data, prog_data_size); item->key = tmp; @@ -371,7 +372,7 @@ brw_upload_cache(struct brw_cache *cache, cache->n_items++; *out_offset = item->offset; - *(void **)out_aux = (void *)((char *)item->key + item->key_size); + *(void **)out_prog_data = (void *)((char *)item->key + item->key_size); cache->brw->ctx.NewDriverState |= 1 << cache_id; } @@ -412,8 +413,8 @@ brw_clear_cache(struct brw_context *brw, struct brw_cache *cache) c->cache_id == BRW_CACHE_GS_PROG || c->cache_id == BRW_CACHE_FS_PROG || c->cache_id == BRW_CACHE_CS_PROG) { - const void *item_aux = c->key + c->key_size; - brw_stage_prog_data_free(item_aux); + const void *item_prog_data = c->key + c->key_size; + brw_stage_prog_data_free(item_prog_data); } free((void *)c->key); free(c); -- 2.30.2