rename pipe_llvm_program_header to pipe_binary_program_header
authorKarol Herbst <kherbst@redhat.com>
Sat, 11 May 2019 12:26:06 +0000 (14:26 +0200)
committerKarol Herbst <karolherbst@gmail.com>
Sat, 21 Sep 2019 08:28:32 +0000 (08:28 +0000)
We want to use it for other formats as well, so give it a more generic name

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Pierre Moreau <pierre.morrow@free.fr>
src/gallium/drivers/r600/evergreen_compute.c
src/gallium/drivers/radeonsi/si_compute.c
src/gallium/include/pipe/p_state.h
src/gallium/state_trackers/clover/llvm/codegen/common.cpp
src/gallium/state_trackers/clover/spirv/invocation.cpp

index 0f6c5c2..419738e 100644 (file)
@@ -429,7 +429,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
index 037b192..9fe2bb5 100644 (file)
@@ -256,7 +256,7 @@ static void *si_create_compute_state(
                                            &sel->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;
 
                program->shader.binary.elf_size = header->num_bytes;
index 4b23824..b0d8eae 100644 (file)
@@ -879,9 +879,9 @@ struct pipe_grid_info
 };
 
 /**
- * Structure used as a header for serialized LLVM programs.
+ * Structure used as a header for serialized compute programs.
  */
-struct pipe_llvm_program_header
+struct pipe_binary_program_header
 {
    uint32_t num_bytes; /**< Number of bytes in the LLVM bytecode program. */
    char blob[];
index 98a9d5f..3879fb6 100644 (file)
@@ -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, {} };
 
index 8691611..620c6b1 100644 (file)
@@ -95,7 +95,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),
@@ -625,7 +625,7 @@ clover::spirv::link_program(const std::vector<module> &modules,
                          sec.type == module::section::text_library;
                }, mod.secs);
 
-      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));