diff options
author | Tom Stellard <[email protected]> | 2012-09-13 14:37:53 +0000 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-09-19 14:58:53 -0400 |
commit | 69d814885bbb274d3223f44c421293e7591f51c0 (patch) | |
tree | 934fc538caa937a78d3d00df89cb7dc34bc5b630 /src/gallium/drivers/r600/evergreen_compute.c | |
parent | 6bd11bc9d5053b2a6889e82de1ced1e4b8aa017b (diff) |
r600g: Add some comments and debug printfs to compute code
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_compute.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_compute.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index 1fb63d608a2..1056cf297a0 100644 --- a/src/gallium/drivers/r600/evergreen_compute.c +++ b/src/gallium/drivers/r600/evergreen_compute.c @@ -452,7 +452,7 @@ static void evergreen_launch_grid( { struct r600_context *ctx = (struct r600_context *)ctx_; - COMPUTE_DBG("PC: %i\n", pc); + COMPUTE_DBG("*** evergreen_launch_grid: pc = %u\n", pc); evergreen_compute_upload_input(ctx_, block_layout, grid_layout, input); compute_emit_cs(ctx, block_layout, grid_layout); @@ -814,12 +814,15 @@ void* r600_compute_global_transfer_map( uint32_t* map; ///TODO: do it better, mapping is not possible if the pool is too big + COMPUTE_DBG("* r600_compute_global_transfer_map()\n"); + if (!(map = ctx->ws->buffer_map(buffer->chunk->pool->bo->cs_buf, ctx->cs, transfer->usage))) { return NULL; } - COMPUTE_DBG("buffer start: %lli\n", buffer->chunk->start_in_dw); + COMPUTE_DBG("Buffer: %p + %u (buffer offset in global memory) " + "+ %u (box.x)\n", map, buffer->chunk->start_in_dw, transfer->box.x); return ((char*)(map + buffer->chunk->start_in_dw)) + transfer->box.x; } @@ -834,6 +837,8 @@ void r600_compute_global_transfer_unmap( struct r600_resource_global* buffer = (struct r600_resource_global*)transfer->resource; + COMPUTE_DBG("* r600_compute_global_transfer_unmap()\n"); + ctx->ws->buffer_unmap(buffer->chunk->pool->bo->cs_buf); } @@ -853,6 +858,12 @@ struct pipe_transfer * r600_compute_global_get_transfer( struct r600_context *rctx = (struct r600_context*)ctx_; struct pipe_transfer *transfer = util_slab_alloc(&rctx->pool_transfers); + COMPUTE_DBG("* r600_compute_global_get_transfer()\n" + "level = %u, usage = %u, box(x = %u, y = %u, z = %u " + "width = %u, height = %u, depth = %u)\n", level, usage, + box->x, box->y, box->z, box->width, box->height, + box->depth); + transfer->resource = resource; transfer->level = level; transfer->usage = usage; |