/** for variable-sized keys */
GLuint key_size;
- GLuint aux_size;
+ GLuint prog_data_size;
const void *key;
uint32_t offset;
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;
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;
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 =
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;
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;
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;
}
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);