[Mesa-dev] [PATCH 11/15] rename pipe_llvm_program_header to pipe_binary_program_header

Francisco Jerez currojerez at riseup.net
Sat May 11 18:53:14 UTC 2019


Karol Herbst <kherbst at redhat.com> writes:

> We want to use it for other formats as well, so give it a more generic name
>
> Signed-off-by: Karol Herbst <kherbst at redhat.com>
> Reviewed-by: Francisco Jerez <currojerez at riseup.net>
> ---
>  src/gallium/drivers/r600/evergreen_compute.c              | 2 +-
>  src/gallium/drivers/radeonsi/si_compute.c                 | 2 +-
>  src/gallium/include/pipe/p_state.h                        | 2 +-
>  src/gallium/state_trackers/clover/llvm/codegen/common.cpp | 2 +-
>  src/gallium/state_trackers/clover/spirv/invocation.cpp    | 4 ++--
>  5 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
> index 34e5755696f..2f4d84405db 100644
> --- a/src/gallium/drivers/r600/evergreen_compute.c
> +++ b/src/gallium/drivers/r600/evergreen_compute.c
> @@ -410,7 +410,7 @@ static void *evergreen_create_compute_state(struct pipe_context *ctx,
>  	struct r600_context *rctx = (struct r600_context *)ctx;
>  	struct r600_pipe_compute *shader = CALLOC_STRUCT(r600_pipe_compute);
>  #ifdef HAVE_OPENCL
> -	const struct pipe_llvm_program_header *header;
> +	const struct pipe_binary_program_header *header;
>  	void *p;
>  	boolean use_kill;
>  #endif
> diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
> index ae10709f2f1..72fc3a197e7 100644
> --- a/src/gallium/drivers/radeonsi/si_compute.c
> +++ b/src/gallium/drivers/radeonsi/si_compute.c
> @@ -232,7 +232,7 @@ static void *si_create_compute_state(
>  					    &program->compiler_ctx_state,
>  					    program, si_create_compute_state_async);
>  	} else {
> -		const struct pipe_llvm_program_header *header;
> +		const struct pipe_binary_program_header *header;
>  		header = cso->prog;
>  
>  		ac_elf_read(header->blob, header->num_bytes, &program->shader.binary);
> diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
> index 27350091b82..c94dfb0ba78 100644
> --- a/src/gallium/include/pipe/p_state.h
> +++ b/src/gallium/include/pipe/p_state.h
> @@ -881,7 +881,7 @@ struct pipe_grid_info
>  /**
>   * Structure used as a header for serialized LLVM programs.

Don't forget to update the comment here and below.

>   */
> -struct pipe_llvm_program_header
> +struct pipe_binary_program_header
>  {
>     uint32_t num_bytes; /**< Number of bytes in the LLVM bytecode program. */
>     char blob[];
> diff --git a/src/gallium/state_trackers/clover/llvm/codegen/common.cpp b/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
> index 98a9d5ffb5e..3879fb61a02 100644
> --- a/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
> +++ b/src/gallium/state_trackers/clover/llvm/codegen/common.cpp
> @@ -177,7 +177,7 @@ namespace {
>  
>     module::section
>     make_text_section(const std::vector<char> &code) {
> -      const pipe_llvm_program_header header { uint32_t(code.size()) };
> +      const pipe_binary_program_header header { uint32_t(code.size()) };
>        module::section text { 0, module::section::text_executable,
>                               header.num_bytes, {} };
>  
> diff --git a/src/gallium/state_trackers/clover/spirv/invocation.cpp b/src/gallium/state_trackers/clover/spirv/invocation.cpp
> index 2fd5a876a32..5f71e94bf42 100644
> --- a/src/gallium/state_trackers/clover/spirv/invocation.cpp
> +++ b/src/gallium/state_trackers/clover/spirv/invocation.cpp
> @@ -103,7 +103,7 @@ namespace {
>     module::section
>     make_text_section(const std::vector<char> &code,
>                       enum module::section::type section_type) {
> -      const pipe_llvm_program_header header { uint32_t(code.size()) };
> +      const pipe_binary_program_header header { uint32_t(code.size()) };
>        module::section text { 0, section_type, header.num_bytes, {} };
>  
>        text.data.insert(text.data.end(), reinterpret_cast<const char *>(&header),
> @@ -649,7 +649,7 @@ clover::spirv::link_program(const std::vector<module> &modules,
>           assert(false);
>        }
>  
> -      const auto c_il = ((struct pipe_llvm_program_header*)msec->data.data())->blob;
> +      const auto c_il = ((struct pipe_binary_program_header*)msec->data.data())->blob;
>        const auto length = msec->size;
>  
>        sections.push_back(reinterpret_cast<const uint32_t *>(c_il));
> -- 
> 2.21.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190511/2aec08d4/attachment.sig>


More information about the mesa-dev mailing list