diff options
author | Marek Olšák <[email protected]> | 2017-11-25 22:35:27 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-11-29 18:21:30 +0100 |
commit | 757ea3e613fffbf7f5ac2bd0d6949fffc8380c4a (patch) | |
tree | 8383ed01f7f81a63a6576de1a4635e442094a166 /src/amd | |
parent | 03e2adc990d239119619f22599204c1b37b83134 (diff) |
radeonsi: move/remove ac_shader_binary helpers
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_binary.c | 13 | ||||
-rw-r--r-- | src/amd/common/ac_binary.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/amd/common/ac_binary.c b/src/amd/common/ac_binary.c index 6ad60468949..fabeb15a204 100644 --- a/src/amd/common/ac_binary.c +++ b/src/amd/common/ac_binary.c @@ -298,3 +298,16 @@ void ac_shader_binary_read_config(struct ac_shader_binary *binary, conf->scratch_bytes_per_wave = G_00B860_WAVESIZE(wavesize) * 256 * 4; } } + +void ac_shader_binary_clean(struct ac_shader_binary *b) +{ + if (!b) + return; + FREE(b->code); + FREE(b->config); + FREE(b->rodata); + FREE(b->global_symbol_offsets); + FREE(b->relocs); + FREE(b->disasm_string); + FREE(b->llvm_ir_string); +} diff --git a/src/amd/common/ac_binary.h b/src/amd/common/ac_binary.h index 24c9ba5f216..4bd86b939f1 100644 --- a/src/amd/common/ac_binary.h +++ b/src/amd/common/ac_binary.h @@ -96,5 +96,6 @@ void ac_shader_binary_read_config(struct ac_shader_binary *binary, struct ac_shader_config *conf, unsigned symbol_offset, bool supports_spill); +void ac_shader_binary_clean(struct ac_shader_binary *b); #endif /* AC_BINARY_H */ |