summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-06-16 20:03:41 +0100
committerEmil Velikov <[email protected]>2017-06-17 11:37:58 +0100
commit7e1c42cf89bcbc670747d2ca95851873cbb7be39 (patch)
tree64bff8ce54d0dc62e196f9a0fb12d0bfa8a43145 /src/gallium/drivers/r600
parent84bf7e5ad6f496aff75b10c305259bf89bace38f (diff)
r600, radeon: move radeon_shader_binary_{init,clean} back to radeon
Those are used by r600 and radeonsi, so moving them within the former was a bad idea. Fixes: d96a210842b ("r600g,compute: provide local copy of functions from ac_binary.c") Cc: Jan Vesely <[email protected]> Cc: Aaron Watry <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Tested-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/evergreen_compute.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
index 1f1e08374fb..37cfed4497b 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -180,27 +180,6 @@ static void evergreen_cs_set_constant_buffer(struct r600_context *rctx,
#define R_028850_SQ_PGM_RESOURCES_PS 0x028850
#ifdef HAVE_OPENCL
-/*
- * shader binary helpers.
- */
-static void r600_shader_binary_init(struct ac_shader_binary *b)
-{
- memset(b, 0, sizeof(*b));
-}
-
-static void r600_shader_binary_clean(struct ac_shader_binary *b)
-{
- if (!b)
- return;
- FREE(b->code);
- FREE(b->config);
- FREE(b->rodata);
- FREE(b->global_symbol_offsets);
- FREE(b->relocs);
- FREE(b->disasm_string);
- FREE(b->llvm_ir_string);
-}
-
static void parse_symbol_table(Elf_Data *symbol_table_data,
const GElf_Shdr *symbol_table_header,
struct ac_shader_binary *binary)
@@ -435,7 +414,7 @@ static void *evergreen_create_compute_state(struct pipe_context *ctx,
COMPUTE_DBG(rctx->screen, "*** evergreen_create_compute_state\n");
header = cso->prog;
code = cso->prog + sizeof(struct pipe_llvm_program_header);
- r600_shader_binary_init(&shader->binary);
+ radeon_shader_binary_init(&shader->binary);
r600_elf_read(code, header->num_bytes, &shader->binary);
r600_create_shader(&shader->bc, &shader->binary, &use_kill);
@@ -467,7 +446,7 @@ static void evergreen_delete_compute_state(struct pipe_context *ctx, void *state
return;
#ifdef HAVE_OPENCL
- r600_shader_binary_clean(&shader->binary);
+ radeon_shader_binary_clean(&shader->binary);
#endif
r600_destroy_shader(&shader->bc);