Commit f3ba98cb authored by Karol Herbst's avatar Karol Herbst 🐧 Committed by Karol Herbst

rename pipe_llvm_program_header to pipe_binary_program_header

We want to use it for other formats as well, so give it a more generic name
Signed-off-by: Karol Herbst's avatarKarol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez's avatarFrancisco Jerez <currojerez@riseup.net>
Reviewed-by: Pierre Moreau's avatarPierre Moreau <pierre.morrow@free.fr>
parent b6c47abe
......@@ -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
......
......@@ -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;
......
......@@ -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[];
......
......@@ -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, {} };
......
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment