diff options
author | Kenneth Graunke <[email protected]> | 2018-01-18 14:01:20 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2018-01-19 11:29:47 -0800 |
commit | 8a5bc304ff1c44a719b24081e16f073101658601 (patch) | |
tree | 9e28bef0c01a40b40cbe490a4cb4235b203d59d3 /src | |
parent | a4be2bcee2f344b864ed133ddde3dac7a266cab8 (diff) |
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program_cache.c | 31 |
1 files 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); |