From 757ea3e613fffbf7f5ac2bd0d6949fffc8380c4a Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 25 Nov 2017 22:35:27 +0100 Subject: radeonsi: move/remove ac_shader_binary helpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/amd/common/ac_binary.c | 13 +++++++++++++ src/amd/common/ac_binary.h | 1 + 2 files changed, 14 insertions(+) (limited to 'src/amd') 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 */ -- cgit v1.2.3