mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 00:49:04 +02:00
i965/program_cache: Cast the key to char * before adding key_size
We're about to change the type of key to be brw_base_prog_key and that will mean blindly adding the key size without a cast will lead to the wrong calculation. It's safer to cast to char * first anyway. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
bb14abed18
commit
3a4667e502
1 changed files with 1 additions and 1 deletions
|
|
@ -429,7 +429,7 @@ 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_prog_data = c->key + c->key_size;
|
||||
const void *item_prog_data = ((char *)c->key) + c->key_size;
|
||||
brw_stage_prog_data_free(item_prog_data);
|
||||
}
|
||||
free((void *)c->key);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue