mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 20:20:09 +01:00
radeonsi: move/remove ac_shader_binary helpers
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
03e2adc990
commit
757ea3e613
6 changed files with 16 additions and 27 deletions
|
|
@ -298,3 +298,16 @@ void ac_shader_binary_read_config(struct ac_shader_binary *binary,
|
|||
conf->scratch_bytes_per_wave = G_00B860_WAVESIZE(wavesize) * 256 * 4;
|
||||
}
|
||||
}
|
||||
|
||||
void ac_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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,5 +96,6 @@ void ac_shader_binary_read_config(struct ac_shader_binary *binary,
|
|||
struct ac_shader_config *conf,
|
||||
unsigned symbol_offset,
|
||||
bool supports_spill);
|
||||
void ac_shader_binary_clean(struct ac_shader_binary *b);
|
||||
|
||||
#endif /* AC_BINARY_H */
|
||||
|
|
|
|||
|
|
@ -39,28 +39,6 @@
|
|||
|
||||
#include <llvm-c/TargetMachine.h>
|
||||
|
||||
|
||||
/*
|
||||
* shader binary helpers.
|
||||
*/
|
||||
void si_radeon_shader_binary_init(struct ac_shader_binary *b)
|
||||
{
|
||||
memset(b, 0, sizeof(*b));
|
||||
}
|
||||
|
||||
void si_radeon_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);
|
||||
}
|
||||
|
||||
/*
|
||||
* pipe_context
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -127,9 +127,6 @@ struct r600_perfcounters;
|
|||
struct tgsi_shader_info;
|
||||
struct r600_qbo_state;
|
||||
|
||||
void si_radeon_shader_binary_init(struct ac_shader_binary *b);
|
||||
void si_radeon_shader_binary_clean(struct ac_shader_binary *b);
|
||||
|
||||
/* Only 32-bit buffer allocations are supported, gallium doesn't support more
|
||||
* at the moment.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ static void si_destroy_screen(struct pipe_screen* pscreen)
|
|||
struct si_shader_part *part = parts[i];
|
||||
|
||||
parts[i] = part->next;
|
||||
si_radeon_shader_binary_clean(&part->binary);
|
||||
ac_shader_binary_clean(&part->binary);
|
||||
FREE(part);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7813,7 +7813,7 @@ void si_shader_destroy(struct si_shader *shader)
|
|||
r600_resource_reference(&shader->bo, NULL);
|
||||
|
||||
if (!shader->is_binary_shared)
|
||||
si_radeon_shader_binary_clean(&shader->binary);
|
||||
ac_shader_binary_clean(&shader->binary);
|
||||
|
||||
free(shader->shader_log);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue