[Mesa-dev] [PATCH 4/8] r600/compute: Free compiled kernels when deleting compute state

Tom Stellard tom at stellard.net
Mon Dec 16 06:19:46 PST 2013


On Thu, Dec 12, 2013 at 04:47:20PM -0600, Aaron Watry wrote:
> ---
>  src/gallium/drivers/r600/evergreen_compute.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
> index f0f537c..25ca5d4 100644
> --- a/src/gallium/drivers/r600/evergreen_compute.c
> +++ b/src/gallium/drivers/r600/evergreen_compute.c
> @@ -238,6 +238,10 @@ void evergreen_delete_compute_state(struct pipe_context *ctx, void* state)
>  	if (!shader)
>  		return;
>  
> +	if (shader->kernels) {
> +		FREE(shader->kernels);
> +	}
> +

This NULL check is not necessary.

>  #ifdef HAVE_OPENCL
>  	if (shader->llvm_ctx){
>  		LLVMContextDispose(shader->llvm_ctx);
> -- 
> 1.8.3.2
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list