From 5667aa58c49221a919526db08aab7da5bd2b3a5d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 14 Jan 2015 10:01:29 -0500 Subject: radeon: Add a helper function for freeing members of radeon_shader_binary --- src/gallium/drivers/radeonsi/si_compute.c | 4 +--- src/gallium/drivers/radeonsi/si_shader.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/gallium/drivers/radeonsi') diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 4b335bbf2fb..f911e1f7620 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -439,9 +439,7 @@ static void si_delete_compute_state(struct pipe_context *ctx, void* state){ pipe_resource_reference( (struct pipe_resource **)&program->input_buffer, NULL); - FREE(program->binary.code); - FREE(program->binary.config); - FREE(program->binary.rodata); + radeon_shader_binary_free_members(&program->binary); FREE(program); } diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index cf28860a35f..a891bc651d7 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2621,9 +2621,7 @@ int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader, return r; } r = si_shader_binary_read(sscreen, shader, &binary); - FREE(binary.code); - FREE(binary.config); - FREE(binary.rodata); + radeon_shader_binary_free_members(&binary); return r; } -- cgit v1.2.3