From 0a6120244e66494db070ce875c0a464fbc5b15a1 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 26 Apr 2012 12:02:31 +0200 Subject: winsys/radeon: simplify buffer map/unmap functions The idea is not to use pb_map and pb_unmap wrappers, calling straight into the winsys. --- src/gallium/drivers/radeonsi/r600_texture.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/gallium/drivers/radeonsi/r600_texture.c') diff --git a/src/gallium/drivers/radeonsi/r600_texture.c b/src/gallium/drivers/radeonsi/r600_texture.c index a1151fe963d..ab11285de85 100644 --- a/src/gallium/drivers/radeonsi/r600_texture.c +++ b/src/gallium/drivers/radeonsi/r600_texture.c @@ -770,20 +770,20 @@ void* r600_texture_transfer_map(struct pipe_context *ctx, { struct r600_context *rctx = (struct r600_context *)ctx; struct r600_transfer *rtransfer = (struct r600_transfer*)transfer; - struct pb_buffer *buf; + struct radeon_winsys_cs_handle *buf; enum pipe_format format = transfer->resource->format; unsigned offset = 0; char *map; if (rtransfer->staging_texture) { - buf = ((struct r600_resource *)rtransfer->staging_texture)->buf; + buf = ((struct r600_resource *)rtransfer->staging_texture)->cs_buf; } else { struct r600_resource_texture *rtex = (struct r600_resource_texture*)transfer->resource; if (rtex->flushed_depth_texture) - buf = ((struct r600_resource *)rtex->flushed_depth_texture)->buf; + buf = ((struct r600_resource *)rtex->flushed_depth_texture)->cs_buf; else - buf = ((struct r600_resource *)transfer->resource)->buf; + buf = ((struct r600_resource *)transfer->resource)->cs_buf; offset = rtransfer->offset + transfer->box.y / util_format_get_blockheight(format) * transfer->stride + @@ -802,17 +802,17 @@ void r600_texture_transfer_unmap(struct pipe_context *ctx, { struct r600_transfer *rtransfer = (struct r600_transfer*)transfer; struct r600_context *rctx = (struct r600_context*)ctx; - struct pb_buffer *buf; + struct radeon_winsys_cs_handle *buf; if (rtransfer->staging_texture) { - buf = ((struct r600_resource *)rtransfer->staging_texture)->buf; + buf = ((struct r600_resource *)rtransfer->staging_texture)->cs_buf; } else { struct r600_resource_texture *rtex = (struct r600_resource_texture*)transfer->resource; if (rtex->flushed_depth_texture) { - buf = ((struct r600_resource *)rtex->flushed_depth_texture)->buf; + buf = ((struct r600_resource *)rtex->flushed_depth_texture)->cs_buf; } else { - buf = ((struct r600_resource *)transfer->resource)->buf; + buf = ((struct r600_resource *)transfer->resource)->cs_buf; } } rctx->ws->buffer_unmap(buf); -- cgit v1.2.3