They are no longer used by radeonsi or radv.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
extern "C" {
#endif
-struct ac_shader_reloc {
- char name[32];
- uint64_t offset;
-};
-
-struct ac_shader_binary {
- unsigned code_size;
- unsigned config_size;
- /** The number of bytes of config information for each global symbol.
- */
- unsigned config_size_per_symbol;
- unsigned rodata_size;
- unsigned global_symbol_count;
- unsigned reloc_count;
-
- /** Shader code */
- unsigned char *code;
-
- /** Config/Context register state that accompanies this shader.
- * This is a stream of dword pairs. First dword contains the
- * register address, the second dword contains the value.*/
- unsigned char *config;
-
-
- /** Constant data accessed by the shader. This will be uploaded
- * into a constant buffer. */
- unsigned char *rodata;
-
- /** List of symbol offsets for the shader */
- uint64_t *global_symbol_offsets;
-
- struct ac_shader_reloc *relocs;
-
- /** Disassembled shader in a string. */
- char *disasm_string;
- char *llvm_ir_string;
-};
-
struct ac_shader_config {
unsigned num_sgprs;
unsigned num_vgprs;
extern "C" {
#endif
-struct ac_shader_binary;
struct ac_compiler_passes;
enum ac_func_attr {
*/
+MAYBE_UNUSED
+static void radeon_shader_binary_init(struct r600_shader_binary *b)
+{
+ memset(b, 0, sizeof(*b));
+}
+
+MAYBE_UNUSED
+static void radeon_shader_binary_clean(struct r600_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);
+}
+
struct r600_resource *r600_compute_buffer_alloc_vram(struct r600_screen *screen,
unsigned size)
{
#ifdef HAVE_OPENCL
static void parse_symbol_table(Elf_Data *symbol_table_data,
const GElf_Shdr *symbol_table_header,
- struct ac_shader_binary *binary)
+ struct r600_shader_binary *binary)
{
GElf_Sym symbol;
unsigned i = 0;
static void parse_relocs(Elf *elf, Elf_Data *relocs, Elf_Data *symbols,
unsigned symbol_sh_link,
- struct ac_shader_binary *binary)
+ struct r600_shader_binary *binary)
{
unsigned i;
return;
}
binary->relocs = CALLOC(binary->reloc_count,
- sizeof(struct ac_shader_reloc));
+ sizeof(struct r600_shader_reloc));
for (i = 0; i < binary->reloc_count; i++) {
GElf_Sym symbol;
GElf_Rel rel;
char *symbol_name;
- struct ac_shader_reloc *reloc = &binary->relocs[i];
+ struct r600_shader_reloc *reloc = &binary->relocs[i];
gelf_getrel(relocs, i, &rel);
gelf_getsym(symbols, GELF_R_SYM(rel.r_info), &symbol);
}
static void r600_elf_read(const char *elf_data, unsigned elf_size,
- struct ac_shader_binary *binary)
+ struct r600_shader_binary *binary)
{
char *elf_buffer;
Elf *elf;
}
static const unsigned char *r600_shader_binary_config_start(
- const struct ac_shader_binary *binary,
+ const struct r600_shader_binary *binary,
uint64_t symbol_offset)
{
unsigned i;
return binary->config;
}
-static void r600_shader_binary_read_config(const struct ac_shader_binary *binary,
+static void r600_shader_binary_read_config(const struct r600_shader_binary *binary,
struct r600_bytecode *bc,
uint64_t symbol_offset,
boolean *use_kill)
}
static unsigned r600_create_shader(struct r600_bytecode *bc,
- const struct ac_shader_binary *binary,
+ const struct r600_shader_binary *binary,
boolean *use_kill)
{
#include <llvm-c/Core.h>
#endif
+struct r600_shader_reloc {
+ char name[32];
+ uint64_t offset;
+};
+
+struct r600_shader_binary {
+ unsigned code_size;
+ unsigned config_size;
+ /** The number of bytes of config information for each global symbol.
+ */
+ unsigned config_size_per_symbol;
+ unsigned rodata_size;
+ unsigned global_symbol_count;
+ unsigned reloc_count;
+
+ /** Shader code */
+ unsigned char *code;
+
+ /** Config/Context register state that accompanies this shader.
+ * This is a stream of dword pairs. First dword contains the
+ * register address, the second dword contains the value.*/
+ unsigned char *config;
+
+
+ /** Constant data accessed by the shader. This will be uploaded
+ * into a constant buffer. */
+ unsigned char *rodata;
+
+ /** List of symbol offsets for the shader */
+ uint64_t *global_symbol_offsets;
+
+ struct r600_shader_reloc *relocs;
+
+ /** Disassembled shader in a string. */
+ char *disasm_string;
+};
+
struct r600_pipe_compute {
struct r600_context *ctx;
- struct ac_shader_binary binary;
+ struct r600_shader_binary binary;
enum pipe_shader_ir ir_type;
} gfx_unflushed;
};
-/*
- * shader binary helpers.
- */
-void radeon_shader_binary_init(struct ac_shader_binary *b)
-{
- memset(b, 0, sizeof(*b));
-}
-
-void 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
*/
#include <stdio.h>
-#include "amd/common/ac_binary.h"
-
#include "radeon/radeon_winsys.h"
#include "util/disk_cache.h"
#include "util/u_threaded_context.h"
struct u_log_context;
-
#define ATI_VENDOR_ID 0x1002
#define R600_RESOURCE_FLAG_TRANSFER (PIPE_RESOURCE_FLAG_DRV_PRIV << 0)
struct tgsi_shader_info;
struct r600_qbo_state;
-void radeon_shader_binary_init(struct ac_shader_binary *b);
-void radeon_shader_binary_clean(struct ac_shader_binary *b);
-
/* Only 32-bit buffer allocations are supported, gallium doesn't support more
* at the moment.
*/