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);
+}
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 */
#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
*/
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.
*/
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);
}
}
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);
}