From f6c392a2705322a01ff75d5bdc2c8f7df42b484b Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 6 Aug 2014 22:29:27 +0200 Subject: r600g: use gpu_address from r600_resource MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Christian König Reviewed-by: Alex Deucher --- src/gallium/drivers/r600/r600_state_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/r600/r600_state_common.c') diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 8c37d0d2092..207f07ec9c9 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -1479,7 +1479,7 @@ static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info memcpy(cs->buf+cs->cdw, ib.user_buffer, size_bytes); cs->cdw += size_dw; } else { - uint64_t va = r600_resource_va(ctx->screen, ib.buffer) + ib.offset; + uint64_t va = r600_resource(ib.buffer)->gpu_address + ib.offset; cs->buf[cs->cdw++] = PKT3(PKT3_DRAW_INDEX, 3, rctx->b.predicate_drawing); cs->buf[cs->cdw++] = va; cs->buf[cs->cdw++] = (va >> 32UL) & 0xFF; @@ -1493,7 +1493,7 @@ static void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info } else { if (info.count_from_stream_output) { struct r600_so_target *t = (struct r600_so_target*)info.count_from_stream_output; - uint64_t va = r600_resource_va(&rctx->screen->b.b, (void*)t->buf_filled_size) + t->buf_filled_size_offset; + uint64_t va = t->buf_filled_size->gpu_address + t->buf_filled_size_offset; r600_write_context_reg(cs, R_028B30_VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE, t->stride_in_dw); @@ -2425,7 +2425,7 @@ void r600_trace_emit(struct r600_context *rctx) uint64_t va; uint32_t reloc; - va = r600_resource_va(&rscreen->b.b, (void*)rscreen->b.trace_bo); + va = rscreen->b.trace_bo->gpu_address; reloc = r600_context_bo_reloc(&rctx->b, &rctx->b.rings.gfx, rscreen->b.trace_bo, RADEON_USAGE_READWRITE, RADEON_PRIO_MIN); radeon_emit(cs, PKT3(PKT3_MEM_WRITE, 3, 0)); -- cgit v1.2.3