[Mesa-dev] [PATCH 1/6] radeonsi: remove redundant parameter in si_shader_binary_read

Tom Stellard tom at stellard.net
Thu Jul 16 10:25:43 PDT 2015


On Thu, Jul 16, 2015 at 06:55:26PM +0200, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

> ---
>  src/gallium/drivers/radeonsi/si_compute.c | 2 +-
>  src/gallium/drivers/radeonsi/si_shader.c  | 8 +++-----
>  src/gallium/drivers/radeonsi/si_shader.h  | 3 +--
>  3 files changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
> index 89bef2e..0361c99 100644
> --- a/src/gallium/drivers/radeonsi/si_compute.c
> +++ b/src/gallium/drivers/radeonsi/si_compute.c
> @@ -144,7 +144,7 @@ static void *si_create_compute_state(
>  	 * the shader code to the GPU.
>  	 */
>  	init_scratch_buffer(sctx, program);
> -	si_shader_binary_read(sctx->screen, &program->shader, &program->shader.binary);
> +	si_shader_binary_read(sctx->screen, &program->shader);
>  
>  #endif
>  	program->input_buffer =	si_resource_create_custom(sctx->b.b.screen,
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index 75a29ae..b988f6d 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -2686,11 +2686,9 @@ void si_shader_apply_scratch_relocs(struct si_context *sctx,
>  	}
>  }
>  
> -int si_shader_binary_read(struct si_screen *sscreen,
> -			struct si_shader *shader,
> -			const struct radeon_shader_binary *binary)
> +int si_shader_binary_read(struct si_screen *sscreen, struct si_shader *shader)
>  {
> -
> +	const struct radeon_shader_binary *binary = &shader->binary;
>  	unsigned i;
>  	unsigned code_size;
>  	unsigned char *ptr;
> @@ -2750,7 +2748,7 @@ int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader,
>  	if (r) {
>  		return r;
>  	}
> -	r = si_shader_binary_read(sscreen, shader, &shader->binary);
> +	r = si_shader_binary_read(sscreen, shader);
>  
>  	FREE(shader->binary.config);
>  	FREE(shader->binary.rodata);
> diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
> index 8d309b4..1e8b52b 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.h
> +++ b/src/gallium/drivers/radeonsi/si_shader.h
> @@ -191,8 +191,7 @@ int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader,
>  		    LLVMTargetMachineRef tm, LLVMModuleRef mod);
>  void si_shader_destroy(struct pipe_context *ctx, struct si_shader *shader);
>  unsigned si_shader_io_get_unique_index(unsigned semantic_name, unsigned index);
> -int si_shader_binary_read(struct si_screen *sscreen, struct si_shader *shader,
> -		const struct radeon_shader_binary *binary);
> +int si_shader_binary_read(struct si_screen *sscreen, struct si_shader *shader);
>  void si_shader_apply_scratch_relocs(struct si_context *sctx,
>  			struct si_shader *shader,
>  			uint64_t scratch_va);
> -- 
> 2.1.0
> 
> _______________________________________________
> 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