summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-10-07 23:08:33 +0200
committerMarek Olšák <[email protected]>2017-10-09 16:27:02 +0200
commit345f04ed92551d15b324436d7fada9c14f8aee08 (patch)
treef5919aa5ed652e73712d598a00e29a1523e51ddf /src/gallium/drivers/radeon
parentda61946cb1104f76fb483e0091d5e911c5ea5c9e (diff)
radeonsi: remove r600_emit_reloc
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_cs.h15
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c7
-rw-r--r--src/gallium/drivers/radeon/r600_query.c12
3 files changed, 10 insertions, 24 deletions
diff --git a/src/gallium/drivers/radeon/r600_cs.h b/src/gallium/drivers/radeon/r600_cs.h
index 28bdf15b8ad..b4af5a6b633 100644
--- a/src/gallium/drivers/radeon/r600_cs.h
+++ b/src/gallium/drivers/radeon/r600_cs.h
@@ -113,21 +113,6 @@ radeon_add_to_buffer_list_check_mem(struct r600_common_context *rctx,
return radeon_add_to_buffer_list(rctx, ring, rbo, usage, priority);
}
-static inline void r600_emit_reloc(struct r600_common_context *rctx,
- struct r600_ring *ring, struct r600_resource *rbo,
- enum radeon_bo_usage usage,
- enum radeon_bo_priority priority)
-{
- struct radeon_winsys_cs *cs = ring->cs;
- bool has_vm = ((struct r600_common_screen*)rctx->b.screen)->info.has_virtual_memory;
- unsigned reloc = radeon_add_to_buffer_list(rctx, ring, rbo, usage, priority);
-
- if (!has_vm) {
- radeon_emit(cs, PKT3(PKT3_NOP, 0, 0));
- radeon_emit(cs, reloc);
- }
-}
-
static inline void radeon_set_config_reg_seq(struct radeon_winsys_cs *cs, unsigned reg, unsigned num)
{
assert(reg < R600_CONTEXT_REG_OFFSET);
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index a6008a17d9c..262476fc1bb 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -169,9 +169,10 @@ void si_gfx_write_event_eop(struct r600_common_context *ctx,
radeon_emit(cs, 0); /* unused */
}
- if (buf)
- r600_emit_reloc(ctx, &ctx->gfx, buf, RADEON_USAGE_WRITE,
- RADEON_PRIO_QUERY);
+ if (buf) {
+ radeon_add_to_buffer_list(ctx, &ctx->gfx, buf, RADEON_USAGE_WRITE,
+ RADEON_PRIO_QUERY);
+ }
}
unsigned si_gfx_write_fence_dwords(struct r600_common_screen *screen)
diff --git a/src/gallium/drivers/radeon/r600_query.c b/src/gallium/drivers/radeon/r600_query.c
index 3abfe1ebdb8..e4dbb1d8690 100644
--- a/src/gallium/drivers/radeon/r600_query.c
+++ b/src/gallium/drivers/radeon/r600_query.c
@@ -791,8 +791,8 @@ static void r600_query_hw_do_emit_start(struct r600_common_context *ctx,
default:
assert(0);
}
- r600_emit_reloc(ctx, &ctx->gfx, query->buffer.buf, RADEON_USAGE_WRITE,
- RADEON_PRIO_QUERY);
+ radeon_add_to_buffer_list(ctx, &ctx->gfx, query->buffer.buf, RADEON_USAGE_WRITE,
+ RADEON_PRIO_QUERY);
}
static void r600_query_hw_emit_start(struct r600_common_context *ctx,
@@ -884,8 +884,8 @@ static void r600_query_hw_do_emit_stop(struct r600_common_context *ctx,
default:
assert(0);
}
- r600_emit_reloc(ctx, &ctx->gfx, query->buffer.buf, RADEON_USAGE_WRITE,
- RADEON_PRIO_QUERY);
+ radeon_add_to_buffer_list(ctx, &ctx->gfx, query->buffer.buf, RADEON_USAGE_WRITE,
+ RADEON_PRIO_QUERY);
if (fence_va)
si_gfx_write_event_eop(ctx, EVENT_TYPE_BOTTOM_OF_PIPE_TS, 0,
@@ -937,8 +937,8 @@ static void emit_set_predicate(struct r600_common_context *ctx,
radeon_emit(cs, va);
radeon_emit(cs, op | ((va >> 32) & 0xFF));
}
- r600_emit_reloc(ctx, &ctx->gfx, buf, RADEON_USAGE_READ,
- RADEON_PRIO_QUERY);
+ radeon_add_to_buffer_list(ctx, &ctx->gfx, buf, RADEON_USAGE_READ,
+ RADEON_PRIO_QUERY);
}
static void r600_emit_query_predication(struct r600_common_context *ctx,