diff options
author | Marek Olšák <[email protected]> | 2015-12-28 00:53:29 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-01-07 18:26:06 +0100 |
commit | ccd7d7e13d708e6f4128bc09b42dd88bd606d49b (patch) | |
tree | d565544a11691c67973a4bd65233e40d6615297b /src | |
parent | 5c9f104567c3b072aa103902ee5868a08ded4835 (diff) |
radeonsi: add si_shader_destroy_binary
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 14 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 1 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 49882248300..af32bd73d03 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -4218,6 +4218,14 @@ out: return r; } +void si_shader_destroy_binary(struct radeon_shader_binary *binary) +{ + FREE(binary->code); + FREE(binary->rodata); + FREE(binary->relocs); + FREE(binary->disasm_string); +} + void si_shader_destroy(struct si_shader *shader) { if (shader->gs_copy_shader) { @@ -4229,9 +4237,5 @@ void si_shader_destroy(struct si_shader *shader) r600_resource_reference(&shader->scratch_bo, NULL); r600_resource_reference(&shader->bo, NULL); - - FREE(shader->binary.code); - FREE(shader->binary.rodata); - FREE(shader->binary.relocs); - FREE(shader->binary.disasm_string); + si_shader_destroy_binary(&shader->binary); } diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 2220fc7b91b..780383c09ee 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -341,6 +341,7 @@ int si_compile_llvm(struct si_screen *sscreen, struct pipe_debug_callback *debug, unsigned processor); void si_shader_destroy(struct si_shader *shader); +void si_shader_destroy_binary(struct radeon_shader_binary *binary); unsigned si_shader_io_get_unique_index(unsigned semantic_name, unsigned index); int si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader); void si_shader_binary_read(struct si_screen *sscreen, |