diff options
author | Marek Olšák <[email protected]> | 2012-04-26 12:02:31 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-04-29 14:46:52 +0200 |
commit | 0a6120244e66494db070ce875c0a464fbc5b15a1 (patch) | |
tree | 400b5129e5ae2edbca42039224ee27a22c835816 /src/gallium/drivers/radeonsi/r600_texture.c | |
parent | 8e90913e9f99ff3296a3c3da36e73cd2d4730269 (diff) |
winsys/radeon: simplify buffer map/unmap functions
The idea is not to use pb_map and pb_unmap wrappers, calling straight
into the winsys.
Diffstat (limited to 'src/gallium/drivers/radeonsi/r600_texture.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_texture.c | 16 |
1 files changed, 8 insertions, 8 deletions
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); |