#include <stdio.h>
#include <errno.h>
+#include "ac_binary.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "pipe/p_context.h"
#include "evergreen_compute_internal.h"
#include "compute_memory_pool.h"
#include "sb/sb_public.h"
-#include "radeon/radeon_elf_util.h"
#include <inttypes.h>
/**
assert(size);
buffer = pipe_buffer_create((struct pipe_screen*) screen,
- PIPE_BIND_CUSTOM,
- PIPE_USAGE_IMMUTABLE,
- size);
+ 0, PIPE_USAGE_IMMUTABLE, size);
return (struct r600_resource *)buffer;
}
struct pipe_vertex_buffer *vb = &state->vb[vb_index];
vb->stride = 1;
vb->buffer_offset = offset;
- vb->buffer = buffer;
- vb->user_buffer = NULL;
+ vb->buffer.resource = buffer;
+ vb->is_user_buffer = false;
/* The vertex instructions in the compute shaders use the texture cache,
* so we need to invalidate it. */
#ifdef HAVE_OPENCL
-static void r600_shader_binary_read_config(const struct radeon_shader_binary *binary,
+static void r600_shader_binary_read_config(const struct ac_shader_binary *binary,
struct r600_bytecode *bc,
uint64_t symbol_offset,
boolean *use_kill)
{
unsigned i;
const unsigned char *config =
- radeon_shader_binary_config_start(binary, symbol_offset);
+ ac_shader_binary_config_start(binary, symbol_offset);
for (i = 0; i < binary->config_size_per_symbol; i+= 8) {
unsigned reg =
}
static unsigned r600_create_shader(struct r600_bytecode *bc,
- const struct radeon_shader_binary *binary,
+ const struct ac_shader_binary *binary,
boolean *use_kill)
{
header = cso->prog;
code = cso->prog + sizeof(struct pipe_llvm_program_header);
radeon_shader_binary_init(&shader->binary);
- radeon_elf_read(code, header->num_bytes, &shader->binary);
+ ac_elf_read(code, header->num_bytes, &shader->binary);
r600_create_shader(&shader->bc, &shader->binary, &use_kill);
/* Upload code + ROdata */
if (!shader->kernel_param) {
/* Add space for the grid dimensions */
shader->kernel_param = (struct r600_resource *)
- pipe_buffer_create(ctx->screen, PIPE_BIND_CUSTOM,
+ pipe_buffer_create(ctx->screen, 0,
PIPE_USAGE_IMMUTABLE, input_size);
}