diff options
author | Marek Olšák <[email protected]> | 2014-08-06 22:29:27 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-08-09 23:41:15 +0200 |
commit | f6c392a2705322a01ff75d5bdc2c8f7df42b484b (patch) | |
tree | 77c6303d1fcb4ef4874ce65cf034b6fb3d42a169 /src/gallium/drivers/r600/r600_state_common.c | |
parent | 1c03a690bfc3265c7fefa7f87e69782a6672a9b2 (diff) |
r600g: use gpu_address from r600_resource
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_state_common.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
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)); |